Skip to content

Unable to debug embedded targets using arm-none-eabi-gdb #328

@Gussy

Description

@Gussy

I'm trying to set up debugging of a microcontroller using an external debug probe inside of vscode.

The following commands let me debug normally in the terminal, but I'm having trouble getting it to work inside vscode.

arm-none-eabi-gdb miniblink.elf (gdb) file miniblink.elf (gdb) target extended-remote /dev/cu.usbmodemD5D7A9C1 (gdb) monitor tpwr enable (gdb) monitor swdp_scan (gdb) attach 1 

My vscode launch.json:

{ "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "cppdbg", "request": "launch", "miDebuggerPath": "/usr/local/bin/arm-none-eabi-gdb", "targetArchitecture": "arm", "program": "${workspaceRoot}/miniblink.elf", "setupCommands": [ {"text": "file '${workspaceRoot}/miniblink.elf'"}, {"text": "target extended-remote /dev/cu.usbmodemD5D7A9C1"}, {"text": "monitor tpwr enable"}, {"text": "monitor swdp_scan"}, {"text": "attach 1"} ], "launchCompleteCommand": "None", "filterStderr": false, "filterStdout": false, "externalConsole": false, "cwd": "${workspaceRoot}" } ] } 

The output I get in the vscode debug console:

WARNING: Debugger executable '/usr/local/bin/arm-none-eabi-gdb' is not signed. As a result, debugging may not work properly. =thread-group-added,id="i1" GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Loaded 'shared libraries loaded at this time.'. Cannot find or open the symbol file. Note: automatically using hardware breakpoints for read-only addresses. 

My OS is Mac OS 10.11.6 and vscode version is 1.6.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions