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:
- Setup an external tools configuration, where you invoke JlinkCommander to carry out the srec load.
- Then make sure that the debug configuration points to use the elf-file, but has unchecked the download check-box or we will overwrite the srec...
- You can then setup a Launch group which will allow you to chain the external tools config as a first step. Once finished the Debug config will be launched. You should probably also disable auto-build in the debug config which does not make sense to have between the external tools config and the debug config.
This could work depending on what your "elf-->srec" script does...
Could this work for you?
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.