cancel
Showing results for 
Search instead for 
Did you mean: 

How to compile and run in a single command? Keil Bug?

martincho
Associate II

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);
}

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?

0 REPLIES 0