LPC5410x Shared Variables

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by ans.gomez on Sun Nov 22 13:05:22 MST 2015
I am looking at the sample multicore blinky project. There is a sharedLEDStates variable declared in both the M0 and M0 main files. The mailbox IPC is used to send the content of the M4 variable and copy it to the M0 variable. This is not what I have in mind when I think of shared variables.

Is there any way to actually have just one variable. For the M0 projects, can I declare the sharedLEDstates in a separate .c file, have an extern declaration in a .h, and be access those variable in the M4 project?

I want to declare global variables which can be accessed by both cores. Clearly, I need to be careful with semaphores and all that, but how can I get this to work?