cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE Debug Application with BootLoader

Stephen28
Associate III

I am porting over an application from SystemWorkbench to CubeIDE. This application has a bootloader and application. The application is loaded at 0x08008000. With SystemWorkbench I added a linker flag of -nmagic, but in CubeIDE that throws an error. When I try to debug the app, it breaks at an address inside the bootloader memory space and gets stuck there, never reaching the application at 0x08008000. Can someone point me to some documentation on how to make this work?

Thanks.

3 REPLIES 3

While this gets added to the list, consider if you can just change the PC in the debugger to App ResetHandler, make the loader startup vector straight to the app SP/PC, or code a simple debugger script to make it happen.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ethan HUANG
ST Employee

​Hi Stephen,

I happened to write a document of this topic last week for a local workshop:

https://github.com/ethanhuanginst/STM32CubeIDE-Workshop-2019/tree/master/hands-on/09_BOOT-APP

In short, to make your application (starting from 0x08008000), the process is pretty straightforward as long as FLASH ORIGIN in linker script and VECT_TAB_OFFSET in system_stm32xxxx.c are managed well.

To debug the application, you have the following two options which are also described in the same document. Those are mostly what Clive mentioned in previous thread.

  • Running Debug Session of BOOT.elf with Breakpoints in APP.elf
  • Running Debug Session of APP.elf with Breakpoints in BOOT.elf

CLe.1
Associate

Found issue with st-link, use openOCD instead