microsoft/MIEngine

GDB and Executable: load file.elf in GDB impossible

TomasDresler opened this issue · 0 comments

Dears, I am trying to debug STM32 project in Visual Studio Pro 2019 using stm32-gdb-server from STM32CubeIDE. So far so good, however I'd like to automate loading the .elf file into the target MCU. This raises few questions or suggestions:

The debug starts with Debug.MIDebugLaunch /Executable:<file.elf> /OptionsFile:<file.xml>, but it doesn't pass the executable filename to GDB itself to guarantee that a 'load file.elf' command can be launched, followed by 'monitor reset'. It could be added to GDB arguments via MIDebuggerArgs, only if the OptionsFile content was parsed and some strings replaced.

I suggest to introduce a macro $(Executable) and replace its content in the options file content, when launching the debug process, incl. path separator adjustments.