Dual core debug LPC4370 with J-Link problem - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: March 09, 2015, 03:22:46 pm
content: 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/5nMShttp://www.imageupload.co.uk/image/5nMUhttp://www.imageupload.co.uk/image/5nMahttp://www.imageupload.co.uk/image/5nMNhttp://www.imageupload.co.uk/image/5nMshttp://www.imageupload.co.uk/image/5nMuDo you have any idea what's wrong?

author: ehughes
author_rank: Frequent Contributor
timestamp: March 09, 2015, 03:38:20 pm
content: 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 Image3.) 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.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: March 10, 2015, 10:35:11 am
content: 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-linkRegards

author: Howardlong
author_rank: Super Contributor
timestamp: March 10, 2015, 06:27:50 pm
content: 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.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: March 11, 2015, 05:25:00 am
content: Thanks Howardlong,Does LPC Link need a Ram Initiation script?

author: Howardlong
author_rank: Super Contributor
timestamp: March 11, 2015, 10:39:09 am
content: Quote from: ali_asadzadeh on March 11, 2015, 05:25:00 amIt'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.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: March 12, 2015, 06:19:58 am
content: Thanks, and fair enough, Is there someone who has experience with J-link and Keil?