Working with the LPC54102 Development Board OM13077 I want to debug the M0+ core.
I have set up a new M0+ only project. Building and flashing works. But debuging does not work.
The LPCXpresso IDE stops on "Opening flash driver C:\nxp ..."
If I instead set up a M4 core only project, then the debuging works.
What do I have to change to get the M0+ only project debuging working?
Error: 15: Target error from Commit Flash write: Ef(34): Timed-out initializing flash.
Thank you for your help.
Solved! Go to Solution.
As Fall Guy says, you can't have a standalone M0+ app on the LPC541xx family parts - you have to have a master M4 application that starts the M0+ cpu running. For more details, see the FAQ : LPC541xx Cortex-M4 / M0+ Multicore Applications
AFAIK, you cannot have an M0+ only project as the M0+ must be 'booted' by the M4. From reset, the M4 boots from flash and the M0+ is held in reset. Typically, the M4 then boots the M0+ (writing it start address to a register and then taking it out of reset). So, as a minimum your app will need a small piece of M4 code to boot them M0 and then put itself to sleep.
Look at the dual-core examples to see how to boot the M0+ from the M4.
Thank you for your answer.
To clarify, I set up a new project with "File, New, Project, LPCXpresso C Project, LPC54100, LPC5410x (M0+).
I can build and flash this project without problem, but not debug. So I do not understand, why the startup after flashing works, where it will not work with the debugger.
Your mentioned minimal piece of M4 code has to be there already because the M0 code works after normal flashing (not debugging).
Setup of M0+ Project (flashing works, debug not):
Setup of M4 Project (flashing works, debug WORKS also):
I suggest you read Section 4.5.47 of the User Manual (UM10850). And then download, read and understand the Dual processor example from the LPCOpen examples.