MSPM0G3507: TI Embedded debug VSCODE extension not working

Part Number: MSPM0G3507
Other Parts Discussed in Thread: TMDSEMU110-U, UNIFLASH

Tool/software:

Hello,

In an effort to move our complete development environment, I have been trying to get the VSCODE debugging extension to work. I am using a .out built using ccs theia.


I have installed the following extensions:

- TI Embedded debug
- Cortex-Debug
Cortex-Debug: Device Support Pack - Texas Instruments MSPM0

Hardware: MSPM0G3507 & XDS110 debug probe. 



Debugging works in theia using attached configuration file.

Debugging fails in VSCODE using following configuration file, with following error log: "Failed to launch GDB: Remote communication error. Target disconnected: error while reading: Invalid argument. (from target-select extended-remote localhost:50003)"

<projectname> and <user> are replaced with valid naming and paths in my local copy.

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Flash And Debug with XDS",
            "type": "ccs-debug",
            "request": "launch",
            "projectInfo": {
                "name": "<projectname>",
                "resourceId": "/<projectname>"
            },
            "device": "MSPM0G3507",
            "cwd": "${workspaceFolder}",
            "executable": "${workspaceFolder}/Build/<projectname>.out",
            "runToEntryPoint": "main",
            "verbose": true,
            "debuggerSettings": {
                "targetConfigs/MSPM0G3507.ccxml": {
                    "Texas Instruments XDS110 USB Debug Probe/CS_DAP_0": {
                        "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues/>\n"
                    },
                    "Texas Instruments XDS110 USB Debug Probe/CORTEX_M0P": {
                        "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"FlashEraseSelection\">\n    <curValue>Erase MAIN and NONMAIN necessary sectors only (see warning above)</curValue>\n  </property>\n\n  <property id=\"FlashVerboseMode\">\n    <curValue>1</curValue>\n  </property>\n\n</PropertyValues>\n"
                    }
                }
            }
        },
        {
            "name": "<projectname>",
            "type": "ccs-debug",
            "request": "launch",
            "projectInfo": {
                "name": "<projectname>",
                "resourceId": "/<projectname>"
            },
            "debuggerSettings": {
                "targetConfigs/MSPM0G3507.ccxml": {
                    "Texas Instruments XDS110 USB Debug Probe/CS_DAP_0": {
                        "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues/>\n"
                    },
                    "Texas Instruments XDS110 USB Debug Probe/CORTEX_M0P": {
                        "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"FlashEraseSelection\">\n    <curValue>Erase MAIN and NONMAIN necessary sectors only (see warning above)</curValue>\n  </property>\n\n  <property id=\"FlashVerboseMode\">\n    <curValue>1</curValue>\n  </property>\n\n</PropertyValues>\n"
                    }
                }
            }
        }
    ]
}
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: [https://go.microsoft.com/fwlink/?linkid=830387]
    "version": "0.2.0",
    "configurations": [
        {
            "cwd": "C:/git/<user>/<projectname>/",
            "gdbPath": "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-gdb.exe",
            "executable": "C:/<user>/gby/chargeguard-msw/Build/<projectname>.out",
            "name": "Debug with TI Embedded Debug for VS Code",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            
            "configFiles": [
                    "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts/interface/xds110.cfg",
                    "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts/board/ti_mspm0_launchpad.cfg"
                ],
            "searchDir": [
                "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
            ],
            "runToEntryPoint": "main",
            "showDevDebugOutput": "raw",
            "device": "MSPM0G3507",
            "serverArgs": [
                "-c",
                "adapter speed 1000",
                "-c",
                "transport select swd",
                "-c",
                "init",
                "-c",
                "halt",
                "-d"
            ],
            "preLaunchCommands": [
                "reset halt",
                "load"
            ],
        }
    ]
}

Can you provide support ? 


  • Hi,

    Let me assign the thread to the SDTO Team for help.

    Best Regards,
    Peter

  • Can you try using this launch example for VS Code instead?

        "configurations": [
            {
                "name": "Debug with TI Embedded Debug for VS Code",
                "cwd": "C:/git/<user>/<projectname>",
                "executable": "C:/<user>/gby/chargeguard-msw/Build/<projectname>.out",
                "request": "launch",
                "type": "cortex-debug",
                "servertype": "openocd",
                "configFiles": [
                    "./interface/xds110.cfg",
                    "./board/ti_mspm0_launchpad.cfg"
                ],
                "searchDir": [
                    "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
                ],
                "runToEntryPoint": "main",
                "showDevDebugOutput": "none",
                "deviceName": "MSPM0G3507"
            }
        ]

  • Hello and thank you for your answer.

    I tried with your configuration file and had the same result; find attached the config file, debug console output and terminal output.

    Launch.json

    {
      "version": "0.2.0",
      "configurations": [
        {
            "name": "SDTO Debug with TI Embedded Debug for VS Code",
            "cwd": "C:/git/<user>/<projectname>",
            "executable": "C:/git/<user>/<projectname>/Build/<projectname>.out",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            "configFiles": [
                "./interface/xds110.cfg",
                "./board/ti_mspm0_launchpad.cfg"
            ],
            "searchDir": [
                "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
            ],
            "runToEntryPoint": "main",
            "showDevDebugOutput": "raw",
            "deviceName": "MSPM0G3507"
        }
        ]
    }
    


    Terminal output
    [2025-08-07T07:09:38.816Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
    "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe" -c "gdb_port 50003" -c "tcl_port 50004" -c "telnet_port 50005" -s "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts" -f "c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
    Open On-Chip Debugger 0.12.0+dev-gae70877b5-dirty (2025-01-31-10:10)
    Licensed under GNU GPL v2
    For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
    CDLiveWatchSetup
    Warn : Interface already configured, ignoring
    cortex_m reset_config sysresetreq
    Info : Listening on port 50004 for tcl connections
    Info : Listening on port 50005 for telnet connections
    Info : XDS110: connected
    Info : XDS110: vid/pid = 0451/bef3
    Info : XDS110: firmware version = 3.0.0.38
    Info : XDS110: hardware version = 0x0021
    Info : XDS110: connected to target via SWD
    Info : XDS110: SWCLK set to 2500 kHz
    Info : clock speed 10000 kHz
    Info : SWD DPIDR 0x6ba02477
    Info : [mspm0x.cpu] Cortex-M0+ r0p1 processor detected
    Info : [mspm0x.cpu] target has 4 breakpoints, 2 watchpoints
    Info : [mspm0x.cpu] Examination succeed
    Info : starting gdb server for mspm0x.cpu on 50003
    Info : Listening on port 50003 for gdb connections
    Info : accepting 'gdb' connection on tcp/50003
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0x81000000 pc: 0x01001f28 msp: 0x20007fe4
    [2025-08-07T07:09:43.714Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
    GDB server session ended. This terminal will be reused, waiting for next session to start...

    debug console output (raw enabled):

    Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
    "configuration": {
        "name": "SDTO Debug with TI Embedded Debug for VS Code",
        "cwd": "C:/git/<user>/<projectname>",
        "executable": "C:/git/<user>/<projectname>/Build/<projectname>.out",
        "request": "launch",
        "type": "cortex-debug",
        "servertype": "openocd",
        "configFiles": [
            "./interface/xds110.cfg",
            "./board/ti_mspm0_launchpad.cfg"
        ],
        "searchDir": [
            "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
        ],
        "runToEntryPoint": "main",
        "showDevDebugOutput": "raw",
        "deviceName": "MSPM0G3507",
        "__configurationTarget": 6,
        "gdbServerConsolePort": 55878,
        "pvtAvoidPorts": [],
        "chainedConfigurations": {
            "enabled": false
        },
        "debuggerArgs": [],
        "swoConfig": {
            "enabled": false,
            "decoders": [],
            "cpuFrequency": 0,
            "swoFrequency": 0,
            "source": "probe"
        },
        "rttConfig": {
            "enabled": false,
            "decoders": []
        },
        "graphConfig": [],
        "preLaunchCommands": [],
        "postLaunchCommands": [],
        "preAttachCommands": [],
        "postAttachCommands": [],
        "preRestartCommands": [],
        "postRestartCommands": [],
        "preResetCommands": [],
        "postResetCommands": [],
        "serverpath": "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe",
        "toolchainPath": "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\arm-none-eabi-gdb\\14.2.rel1.1",
        "toolchainPrefix": "arm-none-eabi",
        "extensionPath": "c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1",
        "registerUseNaturalFormat": true,
        "variableUseNaturalFormat": true,
        "pvtVersion": "1.12.1",
        "__sessionId": "3c1c1d00-c484-4a88-800b-d82dbe6eff95",
        "pvtShowDevDebugOutput": "raw"
    }
    Reading symbols from C:/Users/<user>/Appdata/Local/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-objdump.exe --syms -C -h -w C:/git/<user>/<projectname>/Build/<projectname>.out
    Reading symbols from c:/users/<user>/appdata/local/texas instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-nm.exe --defined-only -S -l -C -p C:/git/<user>/<projectname>/Build/<projectname>.out
    Launching GDB: "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\arm-none-eabi-gdb\\14.2.rel1.1\\arm-none-eabi-gdb.exe" -q --interpreter=mi2
    1-gdb-version
    Launching gdb-server: "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe" -c "gdb_port 50003" -c "tcl_port 50004" -c "telnet_port 50005" -s "C:/Users/<user>/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts" -f "c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
        Please check TERMINAL tab (gdb-server) for output from C:\Users\<user>\Appdata\Local\Texas Instruments\ti-embedded-debug\openocd\20250414\bin\openocd.exe
    Finished reading symbols from objdump: Time: 79 ms
    -> =thread-group-added,id="i1"
    -> ~"GNU gdb (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 15.2.90.20241130-git\n"
    -> ~"Copyright (C) 2024 Free Software Foundation, Inc.\n"
    -> ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
    -> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
    -> ~"This GDB was configured as \"--host=x86_64-w64-mingw32 --target=arm-none-eabi\".\n"
    -> ~"Type \"show configuration\" for configuration details.\n"
    -> ~"For bug reporting instructions, please see:\n"
    -> ~"<https://bugs.linaro.org/>.\n"
    -> ~"Find the GDB manual and other documentation resources online at:\n    <"
    -> ~"http://www.gnu.org/software/gdb/documentation/>.\n\n"
    -> ~"For help, type \"help\".\n"
    -> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
    -> 1^done
    2-gdb-set mi-async on
    Finished reading symbols from nm: Time: 99 ms
    -> 2^done
    3-interpreter-exec console "set print demangle on"
    -> 3^done
    4-interpreter-exec console "set print asm-demangle on"
    -> =cmd-param-changed,param="print asm-demangle",value="on"
    -> 4^done
    5-enable-pretty-printing
    -> 5^done
    6-interpreter-exec console "source c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdbsupport.init"
    -> 6^done
    7-interpreter-exec console "source c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdb-swo.init"
    -> =cmd-param-changed,param="language",value="c"
    -> =cmd-param-changed,param="language",value="auto"
    -> 7^done
    8-interpreter-exec console "set output-radix 0xa"
    -> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
    Output radix now set to decimal 10, hex a, octal 12.
    -> 8^done
    9-interpreter-exec console "set input-radix 0xa"
    -> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
    Input radix now set to decimal 10, hex a, octal 12.
    -> 9^done
    10-file-exec-and-symbols "C:/git/<user>/<projectname>/Build/<projectname>.out"
    -> 10^done
    11-target-select extended-remote localhost:50003
    -> 11^error,msg="Remote communication error.  Target disconnected: error while reading: Invalid argument."
    12-interpreter-exec console "monitor reset halt"
    Failed to launch GDB: Remote communication error.  Target disconnected: error while reading: Invalid argument. (from target-select extended-remote localhost:50003)
    

    Thank you in advance.

  • I tried to mimic your launch best I could:

            {
                "name": "SDTO Debug with TI Embedded Debug for VS Code",
                "cwd": "C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang",
                "executable": "C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out",
                "request": "launch",
                "type": "cortex-debug",
                "servertype": "openocd",
                "configFiles": [
                    "./interface/xds110.cfg",
                    "./board/ti_mspm0_launchpad.cfg"
                ],
                "searchDir": [
                    "C:/Users/gabriel/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
                ],
                "runToEntryPoint": "main",
                "showDevDebugOutput": "raw",
                "deviceName": "MSPM0G3507"
        }

    However, my launch is successful. Terminal:

    [2025-08-07T20:34:52.258Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
    "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "C:/Users/gabriel/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts" -f "c:/Users/a0389327/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
    Open On-Chip Debugger 0.12.0+dev-gae70877b5-dirty (2025-01-31-10:10)
    Licensed under GNU GPL v2
    For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
    CDLiveWatchSetup
    Warn : Interface already configured, ignoring
    cortex_m reset_config sysresetreq
    Info : Listening on port 50001 for tcl connections
    Info : Listening on port 50002 for telnet connections
    Info : XDS110: connected
    Info : XDS110: vid/pid = 0451/bef3
    Info : XDS110: firmware version = 3.0.0.38
    Info : XDS110: hardware version = 0x0028
    Info : XDS110: connected to target via SWD
    Info : XDS110: SWCLK set to 2500 kHz
    Info : clock speed 10000 kHz
    Info : SWD DPIDR 0x6ba02477
    Info : [mspm0x.cpu] Cortex-M0+ r0p1 processor detected
    Info : [mspm0x.cpu] target has 4 breakpoints, 2 watchpoints
    Info : [mspm0x.cpu] Examination succeed
    Info : starting gdb server for mspm0x.cpu on 50000
    Info : Listening on port 50000 for gdb connections
    Info : accepting 'gdb' connection on tcp/50000
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0x21000000 pc: 0x000003ee msp: 0x20207ff0
    Info : MSPM0G3507SPMR: Data region NOT available!
    Warn : The flash sector at offset 0x00000000 overflows the end of mspm0x.flash.nonmain bank.
    Warn : The rest of bank will not show in gdb memory map.
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    

    Console:

    "configuration": {
        "name": "SDTO Debug with TI Embedded Debug for VS Code",
        "cwd": "C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang",
        "executable": "C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out",
        "request": "launch",
        "type": "cortex-debug",
        "servertype": "openocd",
        "configFiles": [
            "./interface/xds110.cfg",
            "./board/ti_mspm0_launchpad.cfg"
        ],
        "searchDir": [
            "C:/Users/gabriel/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts"
        ],
        "runToEntryPoint": "main",
        "showDevDebugOutput": "raw",
        "deviceName": "MSPM0G3507",
        "__configurationTarget": 6,
        "gdbServerConsolePort": 55878,
        "pvtAvoidPorts": [],
        "chainedConfigurations": {
            "enabled": false
        },
        "debuggerArgs": [],
        "swoConfig": {
            "enabled": false,
            "decoders": [],
            "cpuFrequency": 0,
            "swoFrequency": 0,
            "source": "probe"
        },
        "rttConfig": {
            "enabled": false,
            "decoders": []
        },
        "graphConfig": [],
        "preLaunchCommands": [],
        "postLaunchCommands": [],
        "preAttachCommands": [],
        "postAttachCommands": [],
        "preRestartCommands": [],
        "postRestartCommands": [],
        "preResetCommands": [],
        "postResetCommands": [],
        "serverpath": "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe",
        "toolchainPath": "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\arm-none-eabi-gdb\\14.2.rel1.1",
        "toolchainPrefix": "arm-none-eabi",
        "extensionPath": "c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1",
        "registerUseNaturalFormat": true,
        "variableUseNaturalFormat": true,
        "pvtVersion": "1.12.1",
        "__sessionId": "83078a5b-9d5a-4cbb-ba4d-1fa61bf6e457",
        "pvtShowDevDebugOutput": "raw"
    }
    Reading symbols from C:/Users/<user>/Appdata/Local/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-objdump.exe --syms -C -h -w C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out
    Reading symbols from c:/users/<user>/appdata/local/texas instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-nm.exe --defined-only -S -l -C -p C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out
    Launching GDB: "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\arm-none-eabi-gdb\\14.2.rel1.1\\arm-none-eabi-gdb.exe" -q --interpreter=mi2
    1-gdb-version
    Launching gdb-server: "C:\\Users\\<user>\\Appdata\\Local\\Texas Instruments\\ti-embedded-debug\\openocd\\20250414\\bin\\openocd.exe" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "C:/Users/gabriel/AppData/Local/Texas Instruments/ti-embedded-debug/openocd/20250414/share/openocd/scripts" -f "c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
        Please check TERMINAL tab (gdb-server) for output from C:\Users\<user>\Appdata\Local\Texas Instruments\ti-embedded-debug\openocd\20250414\bin\openocd.exe
    Finished reading symbols from objdump: Time: 500 ms
    Finished reading symbols from nm: Time: 389 ms
    -> =thread-group-added,id="i1"
    -> ~"GNU gdb (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 15.2.90.20241130-git\n"
    -> ~"Copyright (C) 2024 Free Software Foundation, Inc.\n"
    -> ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
    -> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
    -> ~"This GDB was configured as \"--host=x86_64-w64-mingw32 --target=arm-none-eabi\".\n"
    -> ~"Type \"show configuration\" for configuration details.\n"
    -> ~"For bug reporting instructions, please see:\n"
    -> ~"<https://bugs.linaro.org/>.\n"
    -> ~"Find the GDB manual and other documentation resources online at:\n    <"
    -> ~"http://www.gnu.org/software/gdb/documentation/>.\n\n"
    -> ~"For help, type \"help\".\n"
    -> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
    -> 1^done
    2-gdb-set mi-async on
    -> 2^done
    3-interpreter-exec console "set print demangle on"
    -> 3^done
    4-interpreter-exec console "set print asm-demangle on"
    -> =cmd-param-changed,param="print asm-demangle",value="on"
    -> 4^done
    5-enable-pretty-printing
    -> 5^done
    6-interpreter-exec console "source c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdbsupport.init"
    -> 6^done
    7-interpreter-exec console "source c:/Users/<user>/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdb-swo.init"
    -> =cmd-param-changed,param="language",value="c"
    -> =cmd-param-changed,param="language",value="auto"
    -> 7^done
    8-interpreter-exec console "set output-radix 0xa"
    -> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
    Output radix now set to decimal 10, hex a, octal 12.
    -> 8^done
    9-interpreter-exec console "set input-radix 0xa"
    -> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
    Input radix now set to decimal 10, hex a, octal 12.
    -> 9^done
    10-file-exec-and-symbols "C:/git/gabriel/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out"
    -> 10^done
    11-target-select extended-remote localhost:50000
    -> =thread-group-started,id="i1",pid="42000"
    -> =thread-created,id="1",group-id="i1"
    -> ~"0x000003ee in DL_Common_delayCycles (cycles=16000000) at bazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c:49\n"
    0x000003ee in DL_Common_delayCycles (cycles=16000000) at bazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c:49
    -> &"warning: 49\tbazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c: No such file or directory\n"
    warning: 49	bazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c: No such file or directory
    -> *stopped,frame={addr="0x000003ee",func="DL_Common_delayCycles",args=[{name="cycles",value="16000000"}],file="bazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c",fullname="/home/a0226989/.cache/bazel/_bazel_a0226989/4d845513c594c2a2405290acdd717718/sandbox/linux-sandbox/4061/execroot/__main__/bazel-out/k8-opt/bin/source/ti/driverlib/dl_common.c",line="49",arch="armv6s-m"},thread-id="1",stopped-threads="all"
    mi2.status = stopped
    Program stopped, probably due to a reset and/or halt issued by debugger
    -> 11^connected
    12-interpreter-exec console "monitor reset halt"
    -> @"[mspm0x.cpu] halted due to debug-request, current mode: Thread \n"
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    -> @"xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000\n"
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    -> 12^done
    13-target-download
    -> 13+download,{section=".intvecs",section-size="192",total-size="29870"}
    -> 13+download,{section=".intvecs",section-sent="192",section-size="192",total-sent="192",total-size="29870"}
    -> 13+download,{section=".text",section-size="856",total-size="29870"}
    -> 13+download,{section=".cinit",section-size="24",total-size="29870"}
    -> 13^done,address="0x00000260",load-size="1072",transfer-rate="17680",write-rate="357"
    14-interpreter-exec console "monitor reset halt"
    -> @"[mspm0x.cpu] halted due to debug-request, current mode: Thread \n"
    [mspm0x.cpu] halted due to debug-request, current mode: Thread 
    -> @"xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000\n"
    xPSR: 0xf1000000 pc: 0x0000040e msp: 0x20208000
    -> 14^done
    Returning dummy thread-id to workaround VSCode issue with pause button not working
    Returning dummy stack frame to workaround VSCode issue with pause button not working: {"threadId":1,"startFrame":0,"levels":20}
    15-break-insert -t --function main
    -> &"warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.\nThis normally should not happen, please file a bug report."
    warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.
    This normally should not happen, please file a bug report.
    -> &"\n"
    
    -> ~"Note: automatically using hardware breakpoints for read-only addresses.\n"
    Note: automatically using hardware breakpoints for read-only addresses.
    -> 15^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00000144",func="main",file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",thread-groups=["i1"],times="0",original-location="-function main"}
    16-exec-continue --all
    -> 16^running
    -> *running,thread-id="all"
    mi2.status = running
    -> =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00000144",func="main",file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",thread-groups=["i1"],times="1",original-location="-function main"}
    -> ~"\n"
    
    -> ~"Temporary breakpoint 1, main () at ..\\gpio_toggle_output.c:43\n"
    Temporary breakpoint 1, main () at ..\gpio_toggle_output.c:43
    -> ~"43\t    SYSCFG_DL_init();\n"
    43	    SYSCFG_DL_init();
    -> *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x00000144",func="main",args=[],file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",arch="armv6s-m"},thread-id="1",stopped-threads="all"
    mi2.status = stopped
    -> =breakpoint-deleted,id="1"
    17-thread-list-ids
    -> 17^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1"
    18-thread-info 1
    -> 18^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x00000144",func="main",args=[],file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",arch="armv6s-m"},state="stopped"}]
    19-stack-list-frames --thread 1 0 19
    -> 19^done,stack=[frame={level="0",addr="0x00000144",func="main",file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",arch="armv6s-m"}]
    20-stack-info-frame --thread 1 --frame 0
    -> 20^done,frame={level="0",addr="0x00000144",func="main",file="..\\gpio_toggle_output.c",fullname="C:\\Users\\<user>\\workspace_ccstheia\\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang\\gpio_toggle_output.c",line="43",arch="armv6s-m"}
    21-stack-list-variables --thread 1 --frame 0 --simple-values
    -> 21^done,variables=[]

    In your console, I see:

    -> 11^error,msg="Remote communication error.  Target disconnected: error while reading: Invalid argument."
    12-interpreter-exec console "monitor reset halt"
    Failed to launch GDB: Remote communication error.  Target disconnected: error while reading: Invalid argument. (from target-select extended-remote localhost:50003)

    I'm not sure what happened there. I will need engineering to investigate

  • I'm not sure what happened there. I will need engineering to investigate

    Any chance we can get the project and *.out file being used? You can send via private E2E message.

  • Hello, Apologies for the delay I was on leave.
    This is most confusing, following your message I attempted to run the same launch configuration using the generated "gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang" project. Once again it flashes and starts debugging perfectly from Theia IDE, but the exact same issue occurs when trying to run from Vscode.
    Then, could it be a TMDSEMU110-U driver issue ?
    Find attached the project and .out file.


    empty_project.zip

  • Thanks for the project. I copied it to the same path on my PC, opened my VS Code workspace folder location to the same place at "C:\git\gby\empty_project\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang" and simply used your existing launch to successfully launch a debug session for the program:

    So no issue with your project, program, or launch.json.

    Then, could it be a TMDSEMU110-U driver issue ?

    No, based on your logs that does not seem to be the case. It is finding and communicating with the XDS110. I'm not sure what is causing the "invalid argument" issue. I will need to pull in some additional people.

     

  • I will need to pull in some additional people.

    Engineering suggested to put the device in BSL mode.

    Press the NRST button and PA18 or SW1 button on the board together and then release it.

    See if this helps.

  • Hello,

    Since I am not using the launchpad and because of my setup I was not able to conduct the test that way; I have tried mass erase + factory reset of the micro using uniflash, then conduct a power cycle ; my understanding is that it does the same ? If it isn't, I'll try to find the time to recreate a proper setup.

    In the end, this seems not to work. I am able to get a debugging session working on theia, but not on Vscode just as before.
    Also ! We were planning on using the microcontroller with BSL disabled as we have no need for it ; would that imply we can't use the debugging functions ?

    Thank you in advance

  • Gabriel,

    I will bring this thread to the attention of the device experts for further investigation.

    Please note that today is a local holiday hence responses may be delayed.

    Thanks

    ki