I have a bootloader + application solution on STM32F4 where i have trouble running application from Eclipse. In application linker script (.ld) file i have changed the ROM start address to have an offset of 0xC000 and i have reduced the ROM usable size. In map file it’s all fine and the application actually works when i downloaded it with bootloader.
But for faster programming i’d like to run the application from Eclipse and let the OpenOCD program it directly to MCU flash. The problem is that then the bootloader area gets overwritten by the application elf file content. I mean literally the same bytes as are in application elf file get written, not the true binary instruction data. I checked it with STM32 ST-Link utility. I have tried all kinds of offset options in Eclipse run/debugger settings and none helps. I’m not sure if the issue is in the OpenSTM32 toolchain or in OpenOCD. Does anybody have a clue?
I checked with Process Monitor utility with what arguments openocd.exe is invoked. Skipping the paths and exact names it is:
openocd.exe -f application.cfg -s ApplicationPath -s plugin\resources\openocd\scripts -c “program Debug/application.elf verify reset exit”