This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Visual Studio code GDB debugger debugs SPM and sometimes not my application

Setup Visual Studio Code and installed the toolchain manager stuff got 1.9.1 of the SDK and the command line stuff for my windows 10 machine (if that matters).  And trying to debug the blinky example on my nrf53 DK board.  Selected the NS version of the board. 

If I make changes (to the blink rate of the blinky app) and hit compile and flash everything works perfectly.  But if I go to debug (using GDB) it immediately goes to the SPM code and stops so I can hit run.

If I put a breakpoint in main of the blinky app, and hit run it never gets in there.  I can debug and step through the SPM project. 

Then the next day, it started with the SPM code and after hitting run it jumped into the main of the blinky app.  And then I could debug.  But that only lasted for a day, and now I'm stuck in the SPM project again and it run and debugs that but never jumps into my blinky code.  I don't know what I did to get it to run that one time or why it's not running.  Contacted my FAE and his version of the blinky project never runs (or debugs) the SPM. 

I'm assuming this is a configuration issue.  I basically setup and am trying to do this https://academy.nordicsemi.com/topic/dissecting-blinky/  but it's not always jumping into my program.  Just the SPM.

Parents
  • I got my environment working.  I'm not sure what was causing the problems I was seeing.  Debugging to my application was intermittent (worked some days and not others).  Then got "not valid elf file" warnings. 

    I had tried uninstalling Visual Studio Code and uninstalling the nordic stuff but that wasn't cleaning out the system.  Reinstall visual studio code and all the extensions were already there.  Also removal and reinstall of the extensions didn't fix anything. 

    What DID fix my problems was to uninstall Visual Studio code, and uninstall all the nordic stuff.  Delete the install directory for the SDK (where ever you chose to put it).  Finally before re-installing anything, delete:

    %UserProfile%\.vscode

    %AppData%\nrfconnect

    When uninstalling things, these 2 directories and the SDK directory did not get removed.  And I assume something got messed up in there.  After deleting those directories and reinstalling things as per the standard setup instructions, everything is working. 

    Hope that helps someone else.  It caused me weeks of headache. 

Reply
  • I got my environment working.  I'm not sure what was causing the problems I was seeing.  Debugging to my application was intermittent (worked some days and not others).  Then got "not valid elf file" warnings. 

    I had tried uninstalling Visual Studio Code and uninstalling the nordic stuff but that wasn't cleaning out the system.  Reinstall visual studio code and all the extensions were already there.  Also removal and reinstall of the extensions didn't fix anything. 

    What DID fix my problems was to uninstall Visual Studio code, and uninstall all the nordic stuff.  Delete the install directory for the SDK (where ever you chose to put it).  Finally before re-installing anything, delete:

    %UserProfile%\.vscode

    %AppData%\nrfconnect

    When uninstalling things, these 2 directories and the SDK directory did not get removed.  And I assume something got messed up in there.  After deleting those directories and reinstalling things as per the standard setup instructions, everything is working. 

    Hope that helps someone else.  It caused me weeks of headache. 

Children
No Data
Related