How to use STM Cubeprogrammer and stling server for debugging in other IDE than cube IDE
Hi. I try to use an external IDE, code::blocks in this case, but have some issues attaching to target. First, i took the gnutools and ST Link GDB server from CubeIDE 1.5.0 etc. (Since i know some needs to ask why I wont't use CubeIDE, the answser i simple, I simply do not like eclipse and eclipse does not like me)
When initializing a debug session from CubeIDE, it runs the Cubeprogrammer after the debugger is attached and which loads the memory
But it referees to a .srec file I do not find (ST-LINK_GDB_server_bwMwVC.srec)
What and where is this file?
I also try to find the command parameters sent to the cubeprogrammer, but Have no luck so far.
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_bwMwVC.srec
File : ST-LINK_GDB_server_bwMwVC.srec
Size : 264405 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 2]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:04.866
Verifying ..For now I am only able to start the ST LINK gdb server and to start the gdb, I may run the code and pause it, but no breakpoints are loaded and I may not see the code since the above part is still missing in my code::blocks setup.
I need to figure out the parameters sent to the cube-programmer to load memory etc. the same way cubeide does it.
EDIT:
I managed to copy the .srec intermediate file from temp folder while it existed. But I do not understand why CubeIDE must create a Motorola S record file to load the device? Shouldn't the cubeprogrammer be able to use other formats like hex, bin and elf?
I have also played with the cube programmer parametres, but I have dificulties attaching to stlink using the -c option. For usb, which port to use. I have tried several but the target is not found. Below example is the last one i tested to se if port usb could be used as an input for the programmer to find any device connected to usb, which is a methode used by other debuggers, but to no help.
STM32_Programmer_CLI -c port=usb