Skip to main content
Associate
Question

How do you organise debug configurations for a bootloader plus application project?

I am working on a project with a small bootloader and a separate application, both built in STM32CubeIDE, and I am trying to settle on a clean way to debug the two parts together.

 

At the moment I have one debug configuration for the bootloader and one for the application, but switching between them and keeping the right binary flashed feels a bit fragile. I have been building manually first, then launching the configuration for the part I want to debug.

 

How do other people organise this? Do you keep separate debug configurations for each part, use one configuration and change the flashed binary by hand, or debug the application only and test the bootloader separately? I would be interested to hear what has worked well in practice, especially any small habits that make it harder to accidentally debug against a stale binary.

3 replies

AScha.3
Super User

Hi,

At first a question: what is the difference in your configurations you call "debug" or not?

What is the difference in the settings you use?

If you feel a post has answered your question, please click on " Best Answer ".
Andrew Neil
Super User

your configurations you call "debug" or not?

I think he’s talking about the CubeIDE “Debug Configurations” which configure the debugger:

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
unsigned_char_array
Lead III

Usually the application has a linker file for writing it directly on FLASH and one with an offset that can be written by a bootloader.
Each of these versions can have a Debug and release build.
So you can have 4 potential build configurations:

  1. Debug for FLASH
  2. Release for FLASH
  3. Debug for bootloader
  4. Release for bootloader

With #3 you generally want to disable flashing by the IDE.

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."