# GNU ARM Eclipse - flash and run without debug

I have successfully installed and configured Eclipse for ARM development according to this excellent tutorial:

http://gnuarmeclipse.github.io/

Almost all the tutorials (including the one above) I have seen provide instructions on how to set up debugging, but I cannot figure out how to just load program to the flash memory without attaching the debugger (e.g. release version of the firmware).

One tutorial solves this problem by installing and calling st-link utility from Eclipse environment, but my current setup is already able to flash the MCU - why should I install anything else? I just want to make GDB flash the memory and exit.

So guys, how do you upload release versions of the firmware to your ARMs? Thank you for your suggestions :)

• I use ST-Link. What is your 'current hardware' ? Are you talking about a bootloader? – Daniel Apr 4 '16 at 15:02
• In your build selection, do you have "Debug" and "Release" configurations? – uint128_t Apr 4 '16 at 15:24
• Currently I am working with STM32f429 discovery with integrated st-link debugger. I use both Debug and Release configurations. Now I realized the generic tutorial example Blinky uses ARM semihosting - this could be the reason why the program execution stops when I quit the debugger. – klasyc Apr 5 '16 at 6:52

Finally I found the solution myself:

1. Disable semihosting - it seems when the firmware is loaded via OpenOCD, MCU detects that semihosting interface is available and after disconnecting of the debugger the MCU hangs when it tries to write the semihosting interface.

To make firmware running again it is necessary to replug the ST-link USB connector or leave the debugger running all the time.

I am not experienced in semihosting too much, therefore I just removed all semihosting debug messages to get rid of it :)

2. In Eclipse go to Run -> Run Configurations...

a) Make a copy of your Debug configuration.

b) On the Debugger tab update Config options of OpenOCD like this:

-f board/stm32f429discovery.cfg -c "program Debug/blinky.elf verify reset exit"


(of course replace the board definition by your board and also replace the Debug/blinky.elf by your binary file name).

c) On Startup page uncheck all the options to leave GDB alone.

d) Save.

After doing the steps above, Eclipse will only program the board without running debugger.