Problems with "Enable debug options"

Hi,

I am facing a problem with the selection "Enable debug options" when creating a build configuration. I use nRF connect SDK 1.9.1 with VSCode. I create an application from sample aws_iot. Then I make two different build configurations, one with "Enable debug options" checked, and one with the option unchecked. The one that has debug option enabled is not possible to debug (it may work once, but all other debug sessions do not work). But the one that doesn't have the option enabled works fine to debug.

How come there is a difference?

What does "Enable debug options" provide?

Best regards,
Lars

Parents
  • Hi,

    I have replicated the scenario you described myself using aws_iot sample with VS Code and NCS v1.9.1. I did not observe any issue, no matter if "Enable debug options" was checked or unchecked, .

    Best regards,
    Dejan

  • Hi Dejan,

    Strange. I have staerted over, and the first time I debug the build configuration that has "Enable debug options" checked, it works fine. But all other debug sessions don't. I have attached three files with the printouts from "Debug console". One file is how it looks in the build configuration that doesn't have "Enable debug options" checked. The other two has the option checked. The one where debugging is working is the first debug session, the other one is how it looks for all other debug sessions. Is it possible to find any interesting information from this?

    Has any other of your team tested to see if you can repeat this?

    What does "Enable debug options" provide?

    Best regards,
    Lars

    Reading symbols from c:/projekt\nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-objdump.exe --syms -C -h -w c:\Projekt\nordic\aws_iot\build\zephyr\merged.hex
    Reading symbols from c:/projekt/nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p c:\Projekt\nordic\aws_iot\build\zephyr\merged.hex
    Launching GDB: "c:\\Projekt\\NordicSemi\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "c:\\Projekt\\nordic\\aws_iot\\build\\zephyr\\merged.hex"
        Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
    Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF9160_xxAA -select usb=960008799 -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: 96 ms
    Finished reading symbols from nm: Time: 95 ms
    Reading symbols from c:\Projekt\nordic\aws_iot\build\zephyr\merged.hex...
    (No debugging symbols found in c:\Projekt\nordic\aws_iot\build\zephyr\merged.hex)
    WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
    0x00025b22 in ?? ()
    Program stopped, probably due to a reset and/or halt issued by debugger
    add symbol table from file "c:/Projekt/nordic/aws_iot/build/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build/mcuboot/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build/mcuboot/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build/spm/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build/spm/zephyr/zephyr.elf...
    2
    Resetting target
    
    Temporary breakpoint 2, main () at C:/Projekt/NordicSemi/v1.9.1/modules/hal/nordic/nrfx/hal/nrf_wdt.h:427
    427	    p_reg->RR[rr_register] = NRF_WDT_RR_VALUE;
    Reading symbols from c:/projekt\nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-objdump.exe --syms -C -h -w c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex
    Reading symbols from c:/projekt/nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex
    Launching GDB: "c:\\Projekt\\NordicSemi\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "c:\\Projekt\\nordic\\aws_iot\\build_1_enable_debug_options\\zephyr\\merged.hex"
        Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
    Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF9160_xxAA -select usb=960008799 -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: 89 ms
    Finished reading symbols from nm: Time: 92 ms
    Reading symbols from c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex...
    (No debugging symbols found in c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex)
    WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
    0x00000438 in ?? ()
    Program stopped, probably due to a reset and/or halt issued by debugger
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/mcuboot/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/mcuboot/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/spm/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/spm/zephyr/zephyr.elf...
    2
    Resetting target
    [New Remote target]
    [Switching to Remote target]
    
    Thread 2 hit Temporary breakpoint 2, main () at C:/Projekt/NordicSemi/v1.9.1/modules/hal/nordic/nrfx/hal/nrf_wdt.h:427
    427	    p_reg->RR[rr_register] = NRF_WDT_RR_VALUE;
    Reading symbols from c:/projekt\nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-objdump.exe --syms -C -h -w c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex
    Reading symbols from c:/projekt/nordicsemi\v1.9.1\toolchain\opt\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex
    Launching GDB: "c:\\Projekt\\NordicSemi\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "c:\\Projekt\\nordic\\aws_iot\\build_1_enable_debug_options\\zephyr\\merged.hex"
        Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
    Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF9160_xxAA -select usb=960008799 -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: 81 ms
    Finished reading symbols from nm: Time: 85 ms
    Reading symbols from c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex...
    (No debugging symbols found in c:\Projekt\nordic\aws_iot\build_1_enable_debug_options\zephyr\merged.hex)
    WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
    0x00025b22 in ?? ()
    Program stopped, probably due to a reset and/or halt issued by debugger
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/mcuboot/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/mcuboot/zephyr/zephyr.elf...
    add symbol table from file "c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/spm/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Projekt/nordic/aws_iot/build_1_enable_debug_options/spm/zephyr/zephyr.elf...
    2
    Resetting target
    [New Thread 536930240]
    [New Thread 536923376]
    [New Thread 536925696]
    [Switching to Thread 536930240]
    Run to 'main' timed out. Trying to pause program

  • Hi,

    Do you have debugging repeatedly working for aws_iot?

    I got the feeling that you wrote something in a previous post, that you have reported this issue internally. Have you erased that part?

    Are you not able to fix debugging in VS Code for aws_iot?

    Best regards,
    Lars

  • Hi,

    I am just suggesting you to use Ozone as a debugger if you have an issue with VS Code debugger, but you do not have to use it if you do not want to do that.

    Best regards,
    Dejan

  • Hi,

    I have reported internally and I'll come back to you when I get new information. I am still waiting for the reply.

    Best regards,
    Dejan

  • Hi,

    Good, I hope you will manage to fix this.

    I don't have the "Debug with Ozone" option in the Actions panel. It feels I have missed something during the installation? Though, I have Segger installed. Do I need to install some extension to get the ozone-option? Or how should I proceed?

    Best regards,
    Lars

  • Hi Lars,

    There are several steps to make Ozone available from VS Code
    1. install Ozone as standalone application
    2. click on Settings icon in the bottom left side
    3. choose Settings
    4. search for ozon (Nrf-connect: Ozone Path)
    5. copy/paste the location of your Ozone installation folder
    6. restart VS Code

    Best regards,
    Dejan

Reply Children
Related