[ABANDONED] Pinetime stucks on boot during debug

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Pinetime stucks on boot during debug

    Hello,

    I'm a new user of J-Link EDU mini and now I'm trying to set up a confortable development environment with a handy debugging solution. Currently I'm using a pinetime (nRF52832 based smartwatch) as target and Ubuntu 22.04 LTS. It seems the debugger probe works well (it can identify the target, load an image etc.) however I have some issues with debugging using VSCode Cortex-Debug plugin. I followed the detailed instructions here. The problem is when I start a debug session, the target stucks on boot (the bootloader continuously looping -> trying to load the application, then restart the device). So I tried to figure out what the problem is, and attempted to reproduce it using the stand-alone gdb console app and JLinkGDBServerCLExe. It seems the target works fine (bootloader loads the app, I can set breakpoints, etc.) until the target is restarted (via gdb or physically restart the device). After restart it stucks on boot again. I assume the Cortex-Debug plugin also restart the target after loaded the firmware into flash memory and that is causes this issue. But I don't understand why the device doesn't work after restarting.

    Steps to reproduce:

    1. Connect J-Link to computer
    2. Connect target to J-Link
    3. Open JLinkGDBServerCLExe
    4. Open arm-none-eabi-gdb
    5. Issue command 'file' to read .elf file
    6. Connect to GDB server
    7. Issue command 'monitor reset' to reset target
    8. Issue command 'load' to flash target
    9. Issue commands 'break main' and 'continue'
    (now the target works fine)
    10. Issue command 'monitor reset' again or physically restart target
    (now the target stucks on boot)

    I attach the logs from gdb and gdb server, maybe they contain useful informations.

    This is my first attempt with SEGGER debuggers so any hint what is going on would be nice.
    Files
    • logs.zip

      (261.81 kB, downloaded 169 times, last: )