Unable to debug nRF9160 in VS Code

Hi Nordic,

I am working on a IoT project. We are using nRF9160 for our project and we are in evaluation stage. I have followed the instruction given in Nordic Academy to setup nRF Connect in Visual studio. 

I am taking the course "Cellular IoT fundamentals" in Nordic Academy, in this course there is a exercise project called "cellfund_less2_exer2." I am trying to run this application on a nRFThingy91 board. I am able to dump the code from VS code IDE using J-Link EDU hardware. I have installed SEGGER J-Flash V7.80c. However, I am not able to start debugging session. When I start debugging session, the VS Code will program the nRF9160 successfully and it doesn't start the debugging session the error says "Unable to start debugging. Unexpected GDB output from command "-target-select extended-remote 127.0.0.1:55669". Remote communication error. Target disconnected.: No such file or directory." 

Kindly, help me solve this. 

Parents
  • Hello,

    The Thingy:91 does not have an onboard debugger. To debug an application running on the Thingy:91 you need to connect an external debugger, i.e. an nRF9160DK or an nRF5340DK. The instructions on how to connect the DK as a debugger is found in the infocenter for the DKs.

    Best regards,

    Maria

  • Hi Maria,

    Thank you for your reply. 

    I have 3 follow-up questions.

    1) Is there any way I can connect J-Link device and debug nRF9160 in nRFThingy91. 

    2) If I buy nRF9160 DK, do I need to connect J-Link device to debug.

    3) If I make a custom board using nRF9160, can I debug that board using J-Link device. 

  • sunil kumar said:
    1) Is there any way I can connect J-Link device and debug nRF9160 in nRFThingy91. 

    Your J-Link device needs to support ARMv8 and you connect it to the Thingy:91 via the "debug in" connector. See the documentation for the Thingy:91 debugging interface and follow the instructions there. Note that you need a 10-pin flat cable to connect to the "debug in" on Thingy:91.

    sunil kumar said:
    2) If I buy nRF9160 DK, do I need to connect J-Link device to debug.

    With an nRF9160DK you can debug the Thingy:91 by connecting a 10-pin flat cable between the "debug in" port on the Thingy:91 and the "debug out" port on the nRF9160-DK. No other devices are needed, only a USB-cable to power the DK. See the documentation for debug output on nRF9160-DK here.

    sunil kumar said:
    3) If I make a custom board using nRF9160, can I debug that board using J-Link device. 

    If you have a SWD connection on your custom board you can debug the nRF9160 with a J-Link device which supports ARMv8.

    Best Regards,

    Maria

Reply
  • sunil kumar said:
    1) Is there any way I can connect J-Link device and debug nRF9160 in nRFThingy91. 

    Your J-Link device needs to support ARMv8 and you connect it to the Thingy:91 via the "debug in" connector. See the documentation for the Thingy:91 debugging interface and follow the instructions there. Note that you need a 10-pin flat cable to connect to the "debug in" on Thingy:91.

    sunil kumar said:
    2) If I buy nRF9160 DK, do I need to connect J-Link device to debug.

    With an nRF9160DK you can debug the Thingy:91 by connecting a 10-pin flat cable between the "debug in" port on the Thingy:91 and the "debug out" port on the nRF9160-DK. No other devices are needed, only a USB-cable to power the DK. See the documentation for debug output on nRF9160-DK here.

    sunil kumar said:
    3) If I make a custom board using nRF9160, can I debug that board using J-Link device. 

    If you have a SWD connection on your custom board you can debug the nRF9160 with a J-Link device which supports ARMv8.

    Best Regards,

    Maria

Children
Related