Please make the BLACK MAGIC PROBE debugger a fully supported probe in the nRF Connect Extension in vscode

I successfully am using BLACK MAGIC PROBE (BMP)  with nRF Connect Extension in VScode already, based on answers in this support forum. I can Run, Pause, Examine breakpoints, ReStart, Examine a Memory View, etc. The extension currently supports Seggar J-link, but the BMP would be a great alternative because it is much less expensive.

HOWEVER several of the nice Extension features are missing. These include showing 'CONNECTED DEVICES', the 'THREAD VIEWER', connection to RTT, etc.

I am currently developing on a custom board with a nrf52840, and the following versions

*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
nRF connect VS Code Extension version 2025.1.127

Below is my current launch.json file. It works, but there are a some problems that I work around:

  1. I have to use "type:": "cppdbg" instead of  "type:":"nrf-connect"
  2. I have to adjust the "program" path and/or the build name if the Build Configuration in not exactly named "build". Providing better variables would be helpful.
  3. Likewise I have to manually adjust the line with   "name": "Launch build" to match the Build Configuration

Here is my launch.json:

{
	"version": "0.2.0",
	"configurations": [
        {
			"name": "Launch build",
            /*"name": "Black Magic Probe", // Ref: https://www.martinhubacek.cz/blog/black-magic-probe-vs-code/ */
            "type": "cppdbg",
            //"type": "nrf-connect",
            "request": "launch",
            /* "preLaunchTask": "build", // causes a can't find buid dialog to appear */
            "cwd": "${workspaceRoot}",
            "MIMode": "gdb",
            "svdPath": "",
            "targetArchitecture": "arm",
            "logging": { "engineLogging": true },
            "program": "${workspaceRoot}\\build\\${workspaceFolderBasename}\\zephyr\\zephyr.elf",
            "miDebuggerPath": "C:\\gcc-arm-none-eabi\\bin\\arm-none-eabi-gdb.exe",
			"stopAtEntry": true,
            "customLaunchSetupCommands": [
                {"text": "cd ${workspaceRoot}\\build\\${workspaceFolderBasename}\\zephyr"}, // C:\projects\ncsfund\vscode\l1_e2\build_2\l1_e2\zephyr
                {"text": "target extended-remote \\\\.\\COM14"},        // replace with your COM or /dev/ttyX 
                {"text": "monitor swdp_scan"},
                {"text": "attach 1"},
                {"text": "file zephyr.elf"},             // was:   "text": "file firmware.elf"
                {"text": "load"},
                {"text": "cd ${workspaceRoot}"}, // set bath back so VScode can find source files 
                {"text": "set mem inaccessible-by-default off"},
                {"text": "break main"},
            ],
            "serverLaunchTimeout": 10000,
            /* "windows": { "miDebuggerPath": "arm-none-eabi-gdb.exe" } */
        }
    ]
}

Parents
  • Hi,

     

    I successfully am using BLACK MAGIC PROBE (BMP)  with nRF Connect Extension in VScode already, based on answers in this support forum. I can Run, Pause, Examine breakpoints, ReStart, Examine a Memory View, etc. The extension currently supports Seggar J-link, but the BMP would be a great alternative because it is much less expensive.

    I am glad to hear that the basic debugging functionality is working.

    HOWEVER several of the nice Extension features are missing. These include showing 'CONNECTED DEVICES', the 'THREAD VIEWER', connection to RTT, etc.

    Thread viewer requires a debug plugin specifically for the debug host, which is currently available for segger based hosts.

    https://github.com/zephyrproject-rtos/jlink-zephyr

    Below is my current launch.json file. It works, but there are a some problems that I work around:

    1. I have to use "type:": "cppdbg" instead of  "type:":"nrf-connect"
    2. I have to adjust the "program" path and/or the build name if the Build Configuration in not exactly named "build". Providing better variables would be helpful.
    3. Likewise I have to manually adjust the line with   "name": "Launch build" to match the Build Configuration

    Here is my launch.json:

    Thank you so much for taking the time to share this on our forum. This is highly appreciated!

     

    I will report the requeset for BMP-support back to our team as a feature request.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    I successfully am using BLACK MAGIC PROBE (BMP)  with nRF Connect Extension in VScode already, based on answers in this support forum. I can Run, Pause, Examine breakpoints, ReStart, Examine a Memory View, etc. The extension currently supports Seggar J-link, but the BMP would be a great alternative because it is much less expensive.

    I am glad to hear that the basic debugging functionality is working.

    HOWEVER several of the nice Extension features are missing. These include showing 'CONNECTED DEVICES', the 'THREAD VIEWER', connection to RTT, etc.

    Thread viewer requires a debug plugin specifically for the debug host, which is currently available for segger based hosts.

    https://github.com/zephyrproject-rtos/jlink-zephyr

    Below is my current launch.json file. It works, but there are a some problems that I work around:

    1. I have to use "type:": "cppdbg" instead of  "type:":"nrf-connect"
    2. I have to adjust the "program" path and/or the build name if the Build Configuration in not exactly named "build". Providing better variables would be helpful.
    3. Likewise I have to manually adjust the line with   "name": "Launch build" to match the Build Configuration

    Here is my launch.json:

    Thank you so much for taking the time to share this on our forum. This is highly appreciated!

     

    I will report the requeset for BMP-support back to our team as a feature request.

     

    Kind regards,

    Håkon

Children
No Data
Related