2014-12-07 01:54 PM
When I program the discovery board with openocd and reset the board I can see the program running.
But when I turn off the board I need to connect with the openocd to run the program.I Dont know why I need to use the command 'reset' of the openocd to run the code if the program is in the flash and on the address 0x0800.0000.
#discovery #startup #stm32f4072014-12-08 04:41 AM
Yes it should start to run directly from flash with BOOT0 low in the default state.
You'll need to examine more carefully your code, and what the linker has generated. Without the debugger you would want to make sure you enable clocks you need, and loops may complete faster, so watch timeout counts. The debugger typically enables clocks and features it needs to work correctly, if your code depends on this there can be problems. Explicitly enable things you need or expect to be working. Consider using GPIO/LED signalling to understand how far into the code it's getting, or use a USART to output diagnostic information.