Skip to main content
AKoek.1
Associate
February 19, 2020
Question

Debug bootloader and application

  • February 19, 2020
  • 2 replies
  • 1374 views

I am trying to create a custom bootloader and having trouble debugging where in the application it jumps to.

Both projects are in the IDE.

If needed. The MCU I use is a STM32F103RET6

This topic has been closed for replies.

2 replies

Piranha
Principal III
February 19, 2020

Better do it with a much simpler and better approach compared to a typical one from ST's examples. Look for my comment here:

https://community.st.com/s/question/0D50X0000AFpTmUSQV/using-nvicsystemreset-in-bootloaderapplication-jumps

AKoek.1
AKoek.1Author
Associate
February 20, 2020

I have seen the example but I cannot figure out how to implement it myself.

My experience with assembly is none

Tesla DeLorean
Guru
February 20, 2020

Not using CubeIDE here, but should be able to at least step across the transition in a disassembly view. Make sure it is getting to the right place. Use the .MAP file from the linker to understand where Reset_Handler, main, etc are situated in the application image.

Perhaps look at IAP (In-App Programming) examples.

If the clocks and PLL are already up, I would not perform that step again. Make sure the vector table is set in SCB->VTOR correctly, check SystemInit(). Ideally have a UART working so you can output some telemetry as you leave loader and enter application.

>>My experience with assembly is none

Might want to get a better understanding of how the MCUs work, it will help with the implementational detail, and following what's happening.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..