This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

West and debug issue in nrf9160 feather board

Hello,

This is regarding the problem faced while flash and debug the nrf9160 feather,
1) Build and flash using the west 
we are using nrf 9160 feather so it has a different technique to compile and flash the code into it. 
Please check the below link for how to compile and flash the code using west.(https://docs.jaredwolff.com/nrf9160-programming-and-debugging.html)
To understand I tried to compile and flash the blinky code. and it worked properly.
Then I tried to compile and flash GPS code with the same process but I got the error.
https://imgur.com/undefined (link of error image)
(https://docs.jaredwolff.com/nrf9160-agps-sample.html). I am enclosing the photo of the error. (file name is GPS error)
The question is I used the same process to flash both the code but got an error in the GPS code.
2) debug the code using visual code
As we are designing our firmware to load and debug the code we have to connect to visual code.
The Process is explained in the below Link. To understand the process I was using the blinky sample code.
I followed all the steps mentioned in the documentation but at step 8 where we compile the code in visual code, I am getting an error. (Enclosed - file name is visual code error)
I don't know what needs to change to resolve the error.
Let me know if you can help me out to resolve the above error.
With Regards,
Rahul Kidecha
  • Hi Jonathan,

    I have done some changes to the Launch. Jason file.

    just added the one line

    "serverpath""C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe",
    after that when I tried to debug it got below error.
    Please check OUTPUT tab (Adapter Output) for output from C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe
    Launching server: "C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" "-if" "swd" "-port" "50000" "-swoport" "50001" "-telnetport" "50002" "-device" "nrf9160_xxAA"
    Launching GDB: "C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gdb.exe" "-q" "--interpreter=mi2"
    undefinedC:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
    Reading symbols from C:/Users/rahul/ncs/v1.3.1/zephyr/samples/basic/blinky/build/zephyr/zephyr.elf...
    0xfffffffe in ?? ()
    Not implemented stop reason (assuming exception): undefined
    Resetting target
    Resetting target
    Something went wrong due zephyr.elf file.
    Can you guide me what to do next?
    With Regards,
    Rahul Kidecha
  • Hi,

    Try attach instead. 

    "request":"attach",



    Alternatively you could try to use SEGGER to debug. 

    Regards,
    Jonathan

Related