cancel
Showing results for 
Search instead for 
Did you mean: 

Custom bootloader and debugger issues

JR2963
Senior

Hello,

I am using an STM32WB with a custom bootloader, which is currently simple and only knows how to jump to a specific address to start the application. I upload firmware using debuggers (STLink V3 and JLink). When I upload the bootloader and the application separately, then make reset of MCU everything works – the bootloader launches the application, and it seems to run fine. However, if I have the bootloader already uploaded and I upload only the application via the debugger, it often happens that the application does not start (in debug mode). The bootloader seems to be active, probably sending a command to jump to the application (that's just my guess), and in debug mode, I see that the application gets stuck right at the reset handler, and nothing can be done with it. Sometimes switching from JLink to STLink or vice versa helps. It's very frustrating to debug software when most of the time it doesn't work. Do you have any idea what could be the issue?

Thank you.

 

 

2 REPLIES 2
Radosław
Senior II

1 solution,  marge bootloader to  aplication.

2. load bootloader  when debug is started (see lauch configuration)

SMarie
Associate III

Hello,

Did you update your linker script with the start address of your application and applied it in Properties>C/C++ Build>Settings>MCU GCC Linker>General ?

Then, did you add the start address in your debug configuration ?