Content originally posted in LPCWare by lpcxpresso-support on Fri May 30 10:00:04 MST 2014
I've not looked at the LPCOpen package for LPC4370 before.... I can see that the projects are pretty broken. I will speak to the LPCOpen team and try to get the fixed (it won't be today, though)
The basic principle of how this works is as follows
- the objective is to link code for the 3 cores into separate memory areas. If you try to run them out of the same area, you will get serious memory contention and the whole system will run slowly
- We build the slaves as wholly linked executables (axf files). They are linked to run at their run-time addresses.
- The slave images are linked into the master image to create a single binary for download.
- The startup code for the m4 will copy the slave images into their linked memory region for execution
- For ANY project, the linker will place code (.text) into the FIRST Flash region defined in the memory configuration. It will place the data (.data+.bss) into the FIRST Ram region defined in the memory map. If there is no Flash region, the whole image is linked into the first RAM block. This is the reason you have to edit the memory map for the sales, to delete the memory regions you do not want used.
- For a Master project, the slave images are linked into its .text section (but as mentioned above, copied to their run-time address in the startup code).
To fix the LPCOpen projects, you will need to:
- ensure the master and 2x slave projects start by sharing the same memory map (I notice they don't...)
- in both slaves, delete the Flash region. This will cause the slave code to run from RAM
- in both slaves, ensure the RAM region you want it to run out of, is first in the memory configuration list. Also ensure they are different from each other!
- in both slaves, edit the project properties and on the Linker/Multicore page, select the appropriate slave
- in the master project, edit the project properties and on the Linker/Multicore page, ensure the Slave table is completed:
-- in the first column, ensure both slaves are checked
-- in the 2nd column, ensure you define the memory region you want it to run from (this MUST match the first item in the memory configuration list for the slave)
-- in the 3rd column, browse to the project containing the slave code and select the .axf.o file (you will need to build the slave projects before you can do this).
You should now have projects the build and run...
As I said, I will speak to the LPCOpen team to try and get this fixed ASAP.