nrf5340 Sample Application hangs in Bootloader in Thingy91X

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, 

Parents Reply
  • I am using the Thingy91 as a development kit. In a few weeks, we shall have our own board with a 9151 and 5340 on it. The demo kit has a nice application on it, and we want to create an application that uses most of the features in Thingy91X. At this moment, I have no choice. I do not understand why developing on the demo kit should be impossible. It seem to be stuck on a trivial issue - mainly due to lack of precise information how to overcome this particular issue. If the the only way would be to sign the image so that the bootloader could run it, so be it - this problem should be solvable too.

Children
Related