Hi, Im trying to get the debugger working in VSCode using the new nrfConnect for VSCode, while following the Youtube series for nRF Connect in VSCode. Im using the following versions:
nRF52840DK
nRF-Connect-2021.8.579.vsix
nRF-Terminal-2021.8.13.vsix
kconfig-lang-2021.8.3.vsix
devicetree-2021.8.2.vsix
In addition, Ive downloaded nRF Connect V3.7 and nRF Connect SDK V1.6.1.
I added the following lines to path, which got me a little further:
Now I get the following errors in the VSCode Debug Console:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
Please check OUTPUT tab (Adapter Output) for output from JLinkGDBServerCL.exe
Launching server: "JLinkGDBServerCL.exe" "-singlerun" "-if" "swd" "-port" "50000" "-swoport" "50001" "-telnetport" "50002" "-device" "nRF52840_xxAA" "-select" "usb=683067661"
Launching GDB: "e:\Programs\NordicSemiconductor\ncs\v1.6.1\toolchain\opt\bin\arm-none-eabi-gdb.exe" "-q" "--interpreter=mi2"
undefinede:\Programs\NordicSemiconductor\ncs\v1.6.1\toolchain\opt\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from e:\Revolve\Software\nRF_Example\BlinkLed_To_BareMetal\build\zephyr\zephyr.hex...
(No debugging symbols found in e:\Revolve\Software\nRF_Example\BlinkLed_To_BareMetal\build\zephyr\zephyr.hex)
0x00000452 in ?? ()
Program stopped, probably due to a reset and/or halt issued by debugger
add symbol table from file "e:/Revolve/Software/nRF_Example/BlinkLed_To_BareMetal/build/zephyr/zephyr.elf"
(y or n) [answered Y; input not from terminal]
Reading symbols from e:/Revolve/Software/nRF_Example/BlinkLed_To_BareMetal/build/zephyr/zephyr.elf...
2
Resetting target
The last line in the output is "Starting target CPU..."
My CMakeLists.txt looks like this, most of this is just adding stuff to see if it works:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(gpio_testing)
add_definitions(-g -v -v -DDEBUG)
add_compile_options(
"-Wall" "-Wpedantic" "-Wextra" "-fexceptions"
"$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
)
set(CMAKE_BUILD_TYPE Debug)
target_sources(app PRIVATE src/main.c
src/gpio/gpio.c)
What are the points Im missing to get debugger to work in VSCode?