2019-05-18 05:12 PM
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.
2019-05-19 05:13 AM
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.
2019-05-27 02:48 AM
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.
2021-07-02 08:55 AM
Found issue with st-link, use openOCD instead
2024-06-18 06:45 AM
......issue like this?.......
Error in final launch sequence:
Failed to execute MI command:
add -symbol -file E:\Projects\Test Area\Prova_Led\Debug\Prova_Led.elf 0x080080bc
Error message from debugger back end:
Ambiguous command "add -symbol -file E:\Projects\Test Area\Prova_Led\Debug\Prova_Led.elf 0x080080bc": add-auto-load-safe-path, add-auto-load-scripts-directory, add-inferior, add-symbol-file.
2024-06-28 09:14 AM
Thank you for the very clear and concise document. It saved me quite a bit of effort!