Can't Debug with image including MCUBoot Bootloader

Hello,

I am trying to work with the MCUBoot bootloader in my project. I was able to configure and build my project and it appears to run properly when I flash it to the chip directly. However when I try to debug it I get the following error:

Run to 'main' timed out. Trying to pause program

The full debug console output was as follows:

Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52832_xxAA -select usb=682211915 -rtos "C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
Please check TERMINAL tab (gdb-server) for output from C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe
Finished reading symbols from objdump: Time: 63 ms
Finished reading symbols from nm: Time: 60 ms
Reading symbols from c:\Soberlink\soberlink_sfw\trunk_NordicBLE\SL_Connect_ST\build_connect\zephyr\merged.hex...
(No debugging symbols found in c:\Soberlink\soberlink_sfw\trunk_NordicBLE\SL_Connect_ST\build_connect\zephyr\merged.hex)
WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
0x0002e6a2 in ?? ()
Program stopped, probably due to a reset and/or halt issued by debugger
add symbol table from file "c:/Soberlink/soberlink_sfw/trunk_NordicBLE/SL_Connect_ST/build_connect/zephyr/zephyr.elf"
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/Soberlink/soberlink_sfw/trunk_NordicBLE/SL_Connect_ST/build_connect/zephyr/zephyr.elf...
add symbol table from file "c:/Soberlink/soberlink_sfw/trunk_NordicBLE/SL_Connect_ST/build_connect/mcuboot/zephyr/zephyr.elf"
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/Soberlink/soberlink_sfw/trunk_NordicBLE/SL_Connect_ST/build_connect/mcuboot/zephyr/zephyr.elf...
2 Resetting target
[New Thread 536878408]
[New Thread 536877856]
[Switching to Thread 536878408]
Reading symbols from c:\nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-objdump.exe --syms -C -h -w c:\Soberlink\soberlink_sfw\trunk_NordicBLE\SL_Connect_ST\build_connect\zephyr\merged.hex
Reading symbols from c:/nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p c:\Soberlink\soberlink_sfw\trunk_NordicBLE\SL_Connect_ST\build_connect\zephyr\merged.hex
Launching GDB: "c:\\nordicsemi\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "c:\\Soberlink\\soberlink_sfw\\trunk_NordicBLE\\SL_Connect_ST\\build_connect\\zephyr\\merged.hex"
Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
Run to 'main' timed out. Trying to pause program

I even tried to use a standard example (BLE peripheral) and got the same results. Any suggestions what could causing the bootloader to hang only while debugging?

Thanks and regards,

Pam

Parents
  • Hi Pam,

    I have not been able to reproduce this. Just to check that the tools are in place, can you try building the unmodified smp_svr sample with overlay-bt.conf and ensure you check the "Enable debug options" checkbox? Does debugging work then? (On my end, using the latest VS Code (1.67.1), nRF Connect for VS Code plugin (v2022.4.219) and nRF Connect SDK 1.9.1 this works out of the box.)

    If this works, then we can look at your project (though I see you wrote that you tested with another sample - which, and with which modifications and build configuration)? If this also fails, we should look at your development environment configuration.

    Einar

Reply
  • Hi Pam,

    I have not been able to reproduce this. Just to check that the tools are in place, can you try building the unmodified smp_svr sample with overlay-bt.conf and ensure you check the "Enable debug options" checkbox? Does debugging work then? (On my end, using the latest VS Code (1.67.1), nRF Connect for VS Code plugin (v2022.4.219) and nRF Connect SDK 1.9.1 this works out of the box.)

    If this works, then we can look at your project (though I see you wrote that you tested with another sample - which, and with which modifications and build configuration)? If this also fails, we should look at your development environment configuration.

    Einar

Children
No Data
Related