Skip to content

Debug configuration for mutilple targets adds wrong overrideLaunchCommands #383

@JojoS62

Description

@JojoS62

for VSCode:
The generated debug configuration launch.json contains a wrong entry for overrideLaunchCommands in the 2nd target (same as for 1st target), causing to load a wrong program:

 {
    "configurations": [
	// Debug launch for target Hello.
	{
	    "type": "cortex-debug",
	    "name": "Debug Hello FK743M5_XIH6 debug",
	    "executable": "/home/jojo/projects/mbed/mbed-ce-H7/build/FK743M5_XIH6_STM32CUBE-Debug/app_hello/Hello.elf",
	    "cwd": "${workspaceRoot}",
	    "gdbPath": "/opt/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gdb",
		"objdumpPath": "/opt/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objdump",
		"servertype": "external",
		"gdbTarget": "127.0.0.1:23331",
		"request": "launch",
		"preLaunchTask": "Build Hello and start GDB server",
		// Override the command sequences used by VS Code to be correct for this GDB server
		"overrideLaunchCommands": ["monitor reset", "load \"/home/jojo/projects/mbed/mbed-ce-H7/build/FK743M5_XIH6_STM32CUBE-Debug/app_hello/Hello.hex\"", "tbreak main", "monitor reset"],
		"overrideRestartCommands": ["monitor reset"],
	},
	// Debug launch for target test_display.
	{
	    "type": "cortex-debug",
	    "name": "Debug test_display FK743M5_XIH6 debug",
	    "executable": "/home/jojo/projects/mbed/mbed-ce-H7/build/FK743M5_XIH6_STM32CUBE-Debug/app_test_display/test_display.elf",
	    "cwd": "${workspaceRoot}",
	    "gdbPath": "/opt/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gdb",
		"objdumpPath": "/opt/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objdump",
		"servertype": "external",
		"gdbTarget": "127.0.0.1:23331",
		"request": "launch",
		"preLaunchTask": "Build test_display and start GDB server",
		// Override the command sequences used by VS Code to be correct for this GDB server
		"overrideLaunchCommands": ["monitor reset", "load \"/home/jojo/projects/mbed/mbed-ce-H7/build/FK743M5_XIH6_STM32CUBE-Debug/app_hello/Hello.hex\"", "tbreak main", "monitor reset"],
		"overrideRestartCommands": ["monitor reset"],
	},
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDis is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions