I have 2 cores which have shared memory.
My question is , how can i write a code which his output will be a single binary/hex file, and it will run on both of the cores.
My main() is running on CORE 1 and it works, i would like to operate the 2nd CORE and calculate some math functions and write the result to the shared memory.
I'm working with CCS IDE. my example looks like that :
#pragma DATA_SECTION(globalvar,".core2_data");
uint16_t globalvar=0xffff;
#pragma CODE_SECTION(test_multiply,".core2_code")
void test_multiply(void)
{
globalvar = 3*2;
while(1);
}
Main()
{
core2_startup_sequence();
...
...
...
}
The startup file in my project is configured for CORE1 , and i configured the RAM sections in the linker file for both cores. Is my approach correct or not at all?
The results of my attempts at the moment are:
Success in starting the 2nd CORE with it's core2_startup_sequence(); but I could not write the results of the calculation to the shared memory, it seems that the 2nd core doesn't run the instructions from the "#pragma"s. Thank you.