Similar, unresolved issue can be seen here.
I just got my official nRF52840DK and setup nRF Connect on my MacBook. I'm able to build the Blinky example and flash it to the board. However when launching debug mode there seems to be some kind of connection or handshake issue.
1) The break points in man.c are ever hit despite being on code that should execute (and an error appears when setting them. See below)
2) The light does not blink in debug mode
3) When adding breakpoints to main.c I get a VS code error pop up saying "No line 49 in file "[PATH]/myfirstapp/src/main.c". (from break-insert "[PATH]/myfirstapp/src/main.c:49")
If I play around with pausing/resetting rapidly, I can get it to stop in cpu_idle.S(159) and step out to clock_control_nrf.c(513). However it wasn't clear what was breaking in debug mode.
Reading symbols from [PATH]/myfirstapp/build/zephyr/zephyr.hex...(No debugging symbols found in [PATH]/myfirstapp/build/zephyr/zephyr.hex)0x00001a2a in ?? ()Program stopped, probably due to a reset and/or halt issued by debuggeradd symbol table from file "[PATH]/myfirstapp/build/zephyr/zephyr.elf"(y or n) [answered Y; input not from terminal]Reading symbols from [PATH]/myfirstapp/build/zephyr/zephyr.elf...2Resetting targetSERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connectedSEGGER J-Link GDB Server V7.54a Command Line VersionJLinkARM.dll V7.54a (DLL compiled Sep 7 2021 14:21:27)Command line: -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52840_xxAA -select usb=683165968 -rtos /Applications/SEGGER/JLink/GDBServer/RTOSPlugin_Zephyr.dylib-----GDB Server start settings-----GDBInit file: noneGDB Server Listening port: 50000SWO raw output listening port: 50001Terminal I/O port: 50002Accept remote connection: yesGenerate logfile: offVerify download: offInit regs on start: offSilent mode: offSingle run mode: onTarget connection timeout: 0 ms------J-Link related settings------J-Link Host interface: USBJ-Link script: noneJ-Link settings file: none------Target related settings------Target device: nRF52840_xxAATarget interface: SWDTarget interface speed: 4000kHzTarget endian: littleConnecting to J-Link...J-Link is connected.Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb 2 2021 16:47:20Hardware: V1.00S/N: 683165968Feature(s): RDI, FlashBP, FlashDL, JFlash, GDBChecking target voltage...Target voltage: 3.30 VListening on TCP/IP port 50000Connecting to target...Connected to targetWaiting for GDB connection...Connected to 127.0.0.1Reading all registersRead 4 bytes @ address 0x00001A2A (Data = 0xF3BFB662)Read 2 bytes @ address 0x00001A2A (Data = 0xB662)Loading RTOS plugin: //Applications/SEGGER/JLink/GDBServer/RTOSPlugin_Zephyr.dylib...RTOS plugin (API v1.1) loaded successfullyRTOS_Init() core = 234881279RTOS plugin: LoadedRTOS_GetSymbols()Received symbol: _kernel (0x20000E34)Received symbol: _kernel_openocd_offsets (0x000059D8)Received symbol: z_sys_post_kernel (0x20000E92)All mandatory symbols successfully loaded.Received monitor command: haltHalting target CPU......Target halted (PC = 0x00001A2A)Received monitor command: resetResetting targetDownloading 16016 bytes @ address 0x00000000Downloading 8244 bytes @ address 0x00003E90Comparing flash [....................] Done.Writing register (PC = 0x 1ac8)Received monitor command: resetResetting targetRead 4 bytes @ address 0x00001AC8 (Data = 0xF3802000)Read 2 bytes @ address 0x00001AC8 (Data = 0x2000)Reading 64 bytes @ address 0x000003C0Read 4 bytes @ address 0x0000045C (Data = 0x00005A68)Read 2 bytes @ address 0x0000042A (Data = 0xF084)Reading 64 bytes @ address 0x00000000Read 4 bytes @ address 0x00000218 (Data = 0xF0FEFBB5)Read 4 bytes @ address 0x0000033C (Data = 0xF109197D)Read 2 bytes @ address 0x000003F4 (Data = 0xB538)Read 2 bytes @ address 0x00000038 (Data = 0x1861)Setting breakpoint @ address 0x00000038, Size = 2, BPHandle = 0x0001Setting breakpoint @ address 0x000003F4, Size = 2, BPHandle = 0x0002Setting breakpoint @ address 0x0000042A, Size = 2, BPHandle = 0x0003Starting target CPU...