You can probably use it as an attribute.
something like this :
__far __attribute__((cregister("PRU_SHAREDMEM", near))) volatile uint32_t
variable_1;
__far __attribute__((cregister("PRU_SHAREDMEM", near))) volatile uint32_t
variable_2;
//Somewhere In code
variable_1 = data;
variable_2 = _2_data;
So basically, the compiler allocates memory to these variables somewhere in
the shared mem and you have no control over where it gets allocated. So if
you wish to share data between the two PRUs, you can probably
define the variable in a common file and then use this exact same variable
in the two source codes.
I haven't actually tried this way. Please let us know if this works.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/f38d4ba0-c3e0-4492-8c1a-7505cb367029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.