Content originally posted in LPCWare by nerd herd on Mon Aug 18 16:10:00 MST 2014
Hi Witte,
Sorry for the wait, this took a bit of time to dig up the right configurations for IAR. Tell me if this works for you or not...I think I managed to debug both cores but I'm using LPCOpen 2.12 with a Keil MCB4300 development board.
1) Download and extract the latest LPCOpen 2.12 software platform. Open the dual core IAR project.
2) Like we discussed earlier in the thread, compile the four libraries.
3) Right click the M4 blinky example and click options. Click Debugger in the categories on the left pane.
4) In the Setup tab, make sure you have the right debugger chosen under "driver" (default is I-jet/JTAGjet).
5) In the Download tab, make sure "Use flash loader(s)" and "Override default .board file" are the only boxes checked.
6) Make sure the current .board file chosen is "$TOOLKIT_DIR$\config\flashloader\NXP\FlashNXPLPC18xx_1024K.board". Click edit and delete bank B from the .board file. Click ok to save as a new .board file.
7) Now right click the M0 blinky example and click options. In the "General Options" category in the left pane, change the processor variant from device to Core (and Core should be Cortex-M0; this was the hardest part figuring out why IAR wouldn't flash the M0 core correctly -- the "NXP LPC4357_M0" device file indicates there is no flash for some reason).
8) Repeat steps 4-7 for the M0 options except delete bank A from the .board file and save that as it's own .board file. This way bank A will contain the M4 code while bank B contains M0 code and they won't accidentally flash over each other's code.
After these steps, I was able to debug both cores independently on different IAR instances. I'm not sure if I was able to stop one core while the other one was going, but that would be an IAR/debugger limitation and I won't be able to help much with that. Also, I believe the dual core blinky code resets the M0 core so you might get a pop up in the M0 debugging session that it has lost it's connection. Hope this helps!