2021-11-02 09:44 AM
Our project requires some post-processing of the SREC at compile time. I would like to load the regular ELF file for symbols, but write the SREC to memory. It seems the IDE only accepts ELF files, which I cannot generate. How do I program an SREC as part of launching a debug configuration? I am using a Segger JLINK Ultra +
Solved! Go to Solution.
2021-11-05 02:34 AM
The CubeIDE debugger relies on the GDB load command to dispatch task of loading binaries to the currently used GDB-server.
In this way the debugger does not really have to know/care much about which target is connected. We trust that the GDB-server has the awareness. And in that
This gives us a clean interface between CubeIDE and the debugger back-end and the benefit of less maintenance and code duplication.
The down-side is that the load command of GDB does not support loading srec-files.
Still what you want to do can be achieved relying on other features in the IDE. My advice would be to:
This could work depending on what your "elf-->srec" script does...
Could this work for you?
2021-11-02 12:14 PM
But srec files do not have debug info, you're going to need the elf anyway.
Note that CubeIDE debugger can load only the debug info from the elf file, and load multiple binaries without debug info.
2021-11-02 12:27 PM
The OP is talking about a block of arbitrary data, why on earth could this not be loaded by a debug script? I could do it with a LOAD command in Keil (Intel Hex, for sure).
2021-11-02 12:35 PM
Ya, I am going down the route of doing a JLinkCommander script, but it would be much nicer if I can just do this all at debug time instead of making it a manual task.
2021-11-05 02:34 AM
The CubeIDE debugger relies on the GDB load command to dispatch task of loading binaries to the currently used GDB-server.
In this way the debugger does not really have to know/care much about which target is connected. We trust that the GDB-server has the awareness. And in that
This gives us a clean interface between CubeIDE and the debugger back-end and the benefit of less maintenance and code duplication.
The down-side is that the load command of GDB does not support loading srec-files.
Still what you want to do can be achieved relying on other features in the IDE. My advice would be to:
This could work depending on what your "elf-->srec" script does...
Could this work for you?
2021-11-05 11:12 AM
Yes, this is also the answer that I landed on from what I could patch together. I have not gotten it working completely yet, but its close. Thanks.