Author Topic: Dual core debug LPC4370 with J-Link problem  (Read 3589 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Dual core debug LPC4370 with J-Link problem
« on: March 09, 2015, 03:22:46 pm »
Hi,
I have build a dual core project on LPC4370, But I can not start debugging on Cortex M0 core, j-link complains flash downloading fail! my code is in RAM for cortex M0, here is the M0 project setup,
you can see Keil setup in here,

http://www.imageupload.co.uk/image/5nMS
http://www.imageupload.co.uk/image/5nMU
http://www.imageupload.co.uk/image/5nMa
http://www.imageupload.co.uk/image/5nMN
http://www.imageupload.co.uk/image/5nMs
http://www.imageupload.co.uk/image/5nMu

Do you have any idea what's wrong?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ehughes

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: us
Re: Dual core debug LPC4370 with J-Link problem
« Reply #1 on: March 09, 2015, 03:38:20 pm »
The way I have gotten it to work:

1.)   The M0 image should be part of the the M4 Image.
2.)  Download and start debugging the M4 Image
3.)   Do an "attach" only connection to the M0.  The code has already been downloaded for the M0.    You code in the M4 also needs to boot the M0.

 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Dual core debug LPC4370 with J-Link problem
« Reply #2 on: March 10, 2015, 10:35:11 am »
Thanks for your help, Actually I have build M0 Image into M4 image and loaded the M4 image, Both cores work correctly, and each one blink a LED, the problem is that I can not debug M0, Note that I will not update the M0 image in the M0 project, would you please attach your simple working test that works correctly in here so that I can take a look what settings that you use for j-link

Regards
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5401
  • Country: gb
Re: Dual core debug LPC4370 with J-Link problem
« Reply #3 on: March 10, 2015, 06:27:50 pm »
I don't know about JLink or Keil, as my LPC4370 dev environment is LPCXpresso and LPC Link2 based, but if it helps, to debug multiple cores I have to first start the M4 core off running (which in turn enables and fires off the M0App and/or M0Sub), and then I manually set up an additional separate debug session within the same LPCXpresso workspace on each of the other core(s).

However, I do have to take care to select the right core in the JTAG chain when debugging each core, core 0 is M4, core 1 is M0Sub and core 2 is M0App (closest to TDI). I don't know how you'd configure Keil uvision and JLink to do that though.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Dual core debug LPC4370 with J-Link problem
« Reply #4 on: March 11, 2015, 05:25:00 am »
Thanks Howardlong,Does LPC Link need a Ram Initiation script?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5401
  • Country: gb
Re: Dual core debug LPC4370 with J-Link problem
« Reply #5 on: March 11, 2015, 10:39:09 am »
Thanks Howardlong,Does LPC Link need a Ram Initiation script?

It's all integrated for you within LPCXpresso so I am not wise enough to tell you exactly how it works internally, however this is the way it works as a mere dev:

O You set up one project for each core, set up the appropriate memory areas in each of the project settings, and there is a setting also to state whether the project's M0SUB, M0APP or M4 multicore. For M4, you specify the one or two sub projects for M0APP and/or M0SUB so it can include those binaries. The project wizard prompts you appropriately which is useful, but it doesn't mean it's easy!

O Each project is built separately.

O Set the M4 project running in debug, including executing past the initiation of the M0 core(s).

O Start each of the M0 project(s) in debug (this does an attach, the projects should already be running from the previous step).

You can then set break points and trace in any of the three threads at will.

I haven't used uVision for ten years, so I'll be of no help to you there I'm afraid.

 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Dual core debug LPC4370 with J-Link problem
« Reply #6 on: March 12, 2015, 06:19:58 am »
Thanks, and fair enough, Is there someone who has experience with J-link and Keil?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf