SteveD0 newtmgr conn add serial type=serial connstring=“dev=COM20,baud=1000000”

You only have to do this once.

SteveD0 Then I pressed the Start Debugging and the got the error mentioned before. The debugger stopped at the line of code: bl z_platform_init
in:
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)

#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
bl z_platform_init
#endif
And that is where I am.

Sometimes it’s best to do a nrfjprog -e before debugging and then flash your application after it’s been erased. Also sometimes the debugger doesn’t start correctly the first time. Hit the stop button and then start it up again.

Hopefully that should fix it.

I tried that and it didn’t work. Went back to the “intelliSenseMode”: “gcc-arm” setting from using “msvc-x64” and it didn’t seem to make a difference.

Getting the same Debug Console information:

Please check OUTPUT tab (Adapter Output) for output from JLinkGDBServerCL.exe
Launching server: "JLinkGDBServerCL.exe" "-if" "swd" "-port" "50000" "-swoport" "50001" "-telnetport" "50002" "-device" "nrf9160_xxAA"
Launching GDB: "C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gdb.exe" "-q" "--interpreter=mi2"
undefinedC:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from C:\nfed\nrf9160-feather\samples\blinky\build\zephyr\zephyr.elf...
0xfffffffe in ?? ()
Not implemented stop reason (assuming exception): undefined
Resetting target
Resetting target

Here is what I’m using in my launch.json:

{
        "name": "Cortex Debug",
        "cwd": "${workspaceRoot}",
        "executable": "${workspaceRoot}\\build\\zephyr\\zephyr.elf",
        "request": "launch",
        "type": "cortex-debug",
        "servertype": "jlink",
        "device": "nrf9160_xxAA",
        "interface": "swd",
        "armToolchainPath": "C:\\Program Files (x86)\\GNU Tools Arm Embedded\\9 2019-q4-major\\bin"       
      }

Did that Debug Console look right to you?

Just got it working!!!!! Something about the way or timing of when I hit the the stop before starting up again. I’ll have to play around with it a bit. Thank you!

    SteveD0 woohoo! It’s a little tricky to get going at first but once you have it you’re golden! 😀

    Here is what the launch.json looked like:
    {
    “name”: “Cortex Debug”,
    “cwd”: “${workspaceRoot}”,
    “executable”: “${workspaceRoot}\build\zephyr\zephyr.elf”,
    “request”: “launch”,
    “type”: “cortex-debug”,
    “servertype”: “jlink”,
    “device”: “nrf9160_xxAA”,
    “interface”: “swd”,
    “armToolchainPath”: “C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin”
    }
    And in the c_cpp_properties.json I used this parameter (although this may not have been needed):
    “intelliSenseMode”: “gcc-arm”,

    Thanks again for all the help!

    the launch.json posted incorrectly. I used double slashes. The curly brackets caused the double slash to turn to a single slash.

       "name": "Cortex Debug",
       "cwd": "${workspaceRoot}",
        "executable": "${workspaceRoot}\\build\\zephyr\\zephyr.elf",
        "request": "launch",
        "type": "cortex-debug",
        "servertype": "jlink",
        "device": "nrf9160_xxAA",
        "interface": "swd",
        "armToolchainPath": "C:\\Program Files (x86)\\GNU Tools Arm Embedded\\9 2019-q4-major\\bin"       
      Terms and Conditions | Privacy Policy