2025-03-13 9:01 AM
I apologize in advance, but I've searched and searched with no luck for the following question.
I create an SREC file after a debug build in CubeIDE. I use srec_cat to add a CRC to the end of FLASH space. All good. What I would like to do is debug the app by using a launch group.
1) first, download the SREC file with some external tool inside of CubeIDE (the SREC contains the CRC)
2) then "download" the elf file, actually don't download it, but use the symbolic information from it for debugging purposes.
I am totally confused on how to add an external tool (such as STM32 Programmer) as an external tool into a launch group. It seems to look for .launch files.
I'm sure that I'm not the first to encounter this issue, but I can't seem to find any documentation on how to accomplish this. I believe STM32CubeIDE does not natively support downloading anything other than elf files into FLASH
Thank You!
2025-03-13 9:23 AM
"launch groups" came up in this thread - but everyone went quiet on any documentation about how to do it ...
2025-03-13 10:16 AM - edited 2025-03-13 10:17 AM
@dsmail1 What you've described is not a "launch group". It is just a normal debug session with several files.
Open the debug settings (launch) dialog and add there as many images as you want. For every image you can specify to load the binary or only to read debug info. Specify your srec to load and the original .elf for the symbols.
2025-03-13 3:30 PM
I appreciate the quick response, but I believe I tried what you described, and its NOT working. Attached is an image of my setup in the Debug configuration when working with the elf file only (debugs as expected)
Here is an example of when debugging is not working(using SREC file along with the elf file. Ialso switched the order and it still doesn't work
This is the screen I get after clicking "Debug"
I've verified that the SREC file can be programmed with STM32 Cube Programmer and the firmware executes as expected
A concrete example of how to do this type of debugging would be greatly appreciated.
2025-03-13 5:06 PM
@dsmail1 What you did (the 2nd screenshot) is the correct way and it should work. So either the srec file after manipulation is broken or debugger in your CubeIDE version is broken. Please try to break immediately after load (in the Startup tab set breakpoint on Reset_Handler instead of main) and see what code is loaded.