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

nrf5340 debug network core?

Hello,

I am working on a little app running on nrf5340 app core. Now I want also to program the network core, to be able to exchange data via shared memory as little demo.

How can I attach the debugger to the network core?

To attach to the app core, I use OpenOCD 0.10.0 , join debugger of course and slighly modified nrf9160.cfg config file.

About this network core, the ID is still 0x6ba02477 ?

My first attempt was to do multi-core debugging but for the moment I only connect to the app core even with multi session ( I can see that because I compare the $PC and for the network core it should be on the 0x01000000 range and it is not...)

nrfjprog tool si able to connect to the network core via --coprocessor parameter but it is too limited for proper debugging session.

hope you can help me

Cheers

sk

Parents
  • Hi, 

    thank you for this information.

    what setup/tool do you recommend to debug the two cores simultaneously please in that case?

    Cheers

    sk

  • HI,

    thank you for your support.

    I tried with JLinkExe playing this command:

    JLinkExe -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000

    It works well but how can you specify to connect to the second core? Even if you open 2 sessions, it connect to the app core (I can verify that by single stepping in one window, then I switch to the second session and my PC is updated)

    I saw JLinkExe can add parameter like JLinkScriptFile to specify CoreSightAdress and other parameters.

    Does Nordic can provide JLinkScriptFile to connect to the second core of the nrf5340 please?

    Even if I open 2 sessions (for example):

    JLinkGDBServer -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000 -port 2331 -swoport 2332 -telnetport 2333

    JLinkGDBServer -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000 -port 2334 -swoport 2335 -telnetport 2336

    I connect two session on the same core.

    I need a way to specifically attach the second core, maybe using core id parameter ?

    It would be great if Nordic can provide multi-cores debugging support four his multi-core SoC :-)

    Cheers Stay healthy!

    sk

Reply
  • HI,

    thank you for your support.

    I tried with JLinkExe playing this command:

    JLinkExe -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000

    It works well but how can you specify to connect to the second core? Even if you open 2 sessions, it connect to the app core (I can verify that by single stepping in one window, then I switch to the second session and my PC is updated)

    I saw JLinkExe can add parameter like JLinkScriptFile to specify CoreSightAdress and other parameters.

    Does Nordic can provide JLinkScriptFile to connect to the second core of the nrf5340 please?

    Even if I open 2 sessions (for example):

    JLinkGDBServer -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000 -port 2331 -swoport 2332 -telnetport 2333

    JLinkGDBServer -device Cortex-M33 -autoconnect 1 -if SWD -speed 4000 -port 2334 -swoport 2335 -telnetport 2336

    I connect two session on the same core.

    I need a way to specifically attach the second core, maybe using core id parameter ?

    It would be great if Nordic can provide multi-cores debugging support four his multi-core SoC :-)

    Cheers Stay healthy!

    sk

Children
  • Hi,

    skxo said:
    It works well but how can you specify to connect to the second core? Even if you open 2 sessions, it connect to the app core (I can verify that by single stepping in one window, then I switch to the second session and my PC is updated)

    Try connecting to devices nRF5340_xxAA_APP and nRF5340_xxAA_NET, and it should select the appropriate core for you.

     

    skxo said:
    Does Nordic can provide JLinkScriptFile to connect to the second core of the nrf5340 please?

     I'll report this internally as a feature request.

     

    Kind regards,

    Håkon

  • "Try connecting to devices nRF5340_xxAA_APP and nRF5340_xxAA_NET, and it should select the appropriate core for you."

    I need SES for that and I am sorry but I don't want to use it. I prefer to just use command line to keep it simple.

    Is there any other solution please?

  • skxo said:
    I need SES for that and I am sorry but I don't want to use it. I prefer to just use command line to keep it simple.

    You input this to the GDB server:

    JLinkGDBServer -device <device> -if swd -otheroptions

     

    If this isn't a valid device, please update your segger drivers. I'm running 6.64b.

     

    Kind regards,

    Håkon

Related