I am using the Thingy91X kit, and I am trying to make a sample 'hello_main" to work on the nrf5340. My project configuration is as follows:
Sample: zephyr/samples/hello_world
SDK: 3.4.0
Toolchain: nRF Connect SDK Toolchain v3.4.0
Board Target: thingy91x/nrf5340/cpuapp, NordicKits
SysBuild: No sysbuild
Problem:
When I click debug, the application hangs in bootloader. What do I need to do to debug my application?
JLinkGDBServerCL: SEGGER J-Link GDB Server V9.24a Command Line Version
JLinkGDBServerCL:
JLinkGDBServerCL: JLinkARM.dll V9.24a (DLL compiled Mar 5 2026 11:00:44)
JLinkGDBServerCL:
JLinkGDBServerCL: -----GDB Server start settings-----
JLinkGDBServerCL: GDBInit file: none
JLinkGDBServerCL: GDB Server Listening port: 63103
JLinkGDBServerCL: SWO raw output listening port: 2332
JLinkGDBServerCL: Terminal I/O port: 2333
JLinkGDBServerCL: Accept remote connection: localhost only
JLinkGDBServerCL: Generate logfile: off
JLinkGDBServerCL: Verify download: off
JLinkGDBServerCL: Init regs on start: off
JLinkGDBServerCL: Silent mode: on
JLinkGDBServerCL: Single run mode: on
JLinkGDBServerCL: Target connection timeout: 0 ms
JLinkGDBServerCL: ------J-Link related settings------
JLinkGDBServerCL: J-Link Host interface: USB
JLinkGDBServerCL: J-Link script: none
JLinkGDBServerCL: J-Link settings file: none
JLinkGDBServerCL: ------Target related settings------
JLinkGDBServerCL: Target device: nrf5340_xxaa_app
JLinkGDBServerCL: Target device parameters: none
JLinkGDBServerCL: Target interface: SWD
JLinkGDBServerCL: Target interface speed: 4000kHz
JLinkGDBServerCL: Target endian: little
JLinkGDBServerCL:
=thread-group-added,id="i1"
=cmd-param-changed,param="pagination",value="off"
0x000007b6 in ?? ()
Note: I have read somewhere that there are two options -
- Let the bootloader run and then attach the debugger after the app has started (attach mode instead of reset-and-halt), or
- Disable MCUboot for debug builds if your board configuration allows it.
The first option does not work in my VS-Code. The second,