nRF9160 Custom board debug issue

Hello DevZone

I am facing an issue debugging my custom board, that embeds an nRF9160. I use a JLink Base to debug the board.
I used to be able to debug with no problem, but it no longer works. Since, I am not sure why exactly (jlink updates ? VS Code ? SDK ? Toolchain ?), I started from scratch and created a dummy project, just for this troubleshoot.

I am using SDK and toolchain 2.4.2.


I created a new project, with a basic main that loop forever.
I created 2 build configurations

  • One using the existing nrf9160dk_ns board.
  • One using a custom board, selecting the SoC nRF9160 NON SECURE.
      I only added the following lines in prj.conf to get the compilation to succeed
        CONFIG_TRUSTED_EXECUTION_NONSECURE=y
        CONFIG_BUILD_WITH_TFM=y

In both cases, I can compile the firmware and flash my board. This means that both my JLink and PCB are working.
Trouble starts when I want to start a debug session ...

Using the build configuration of my custom board results in the following error.


If I select the build configuration with nrf9160dk_ns, I am able to launch a debug. However, this is not what I want, since this configuration contains the device tree corresponding to the DK.

Support info:



myTestApp.zip

Parents
  • I finally solved the problem.

    Don't know why, but the file boards/arm/myCustomBoard/board.cmake (which is, I believe, automatically generated when creating a new board) had the following line :

    board_runner_args(jlink "--device=nrf91" "--speed=4000")

    This data is used to start the debug session. I tried to start the debug session from command line to get some extra details on the error. Turn out "nrf91" is not recognized.

    Changing the line to the "nrf9160"  solved my issue.

    board_runner_args(jlink "--device=nrf9160" "--speed=4000")

    Not sure what happened here. I suspect a modification in the SDK/toolchain, to include the new nRF9161 SiP ? But the SEGGER suite is not ready yet. Or something along those line ?

    Anyway, it's all working now, I can debug my project.

Reply
  • I finally solved the problem.

    Don't know why, but the file boards/arm/myCustomBoard/board.cmake (which is, I believe, automatically generated when creating a new board) had the following line :

    board_runner_args(jlink "--device=nrf91" "--speed=4000")

    This data is used to start the debug session. I tried to start the debug session from command line to get some extra details on the error. Turn out "nrf91" is not recognized.

    Changing the line to the "nrf9160"  solved my issue.

    board_runner_args(jlink "--device=nrf9160" "--speed=4000")

    Not sure what happened here. I suspect a modification in the SDK/toolchain, to include the new nRF9161 SiP ? But the SEGGER suite is not ready yet. Or something along those line ?

    Anyway, it's all working now, I can debug my project.

Children
No Data
Related