I've seen a question like this but it didn't have an answer.
All I want to do is make a change to the code and then compile and run on the target without the debugger, ideally with a simple keyboard shortcut.
Simple example using the ST NUCLEO-F030R8 board and a Keil project auto-generated using ST's STM32CubeMX tool.while (1) { HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin); HAL_Delay(200);}
while (1)
{
HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
HAL_Delay(200);
}
Let's say I edit the delay and want to quickly experiment with values without running the debugger. I just want to compile, load and run in one step every time I make a change.
I tried setting this option:
Options for Target > Debug > ST-Link Debugger Settings > Flash Download > Reset and Run
An odd thing happens. When I hit F8 to load, it loads and then it looks like it holds the processor in reset; in other words, it never runs.
The odd part is that if I don't touch anything and return to that dialog, the instant I click on the "Settings" button for the ST-Link Debugger the target start running. This is very weird and I wonder if it is a bug.
Here's a video. Tell me if I am doing anything wrong.
https://youtu.be/pB0Rgmr-5A4
Is there a way to compile-load-reset-run without the debugger all in one step?
Thanks.
You should try to open your project with command line "UV4" with option "-b" for building, and then a new command line "UV4" with "-f" option it will flash your code.
You also have to activate the option "Reset and run" when flashing, in Keil IDE go to "Target option -> Debug ->Settings -> Flash Download -> Reset and run"
If you try to Flash with this option you should see something like "Apllication running..." in the Build Output Window.