Hello, if you want to use semaphores and shared memory you have to do following steps:
1) create shared memory in linker file and place there your own section
/*************************************************/
shared : org = 0x40000000, len = 4k
/*************************************************/
/*********************************************/
.sharedRAM (NOLOAD):
{
*(.sharedRAM)
} > shared
/*********************************************/
2) create global variable for first core and place it to the section in shared memory
tSharedStruct shared_struct __attribute__((section (".sharedRAM")));
3) for second memory, you have to create pointer to global variable
extern tSharedStruct __shared_struct[];
volatile tSharedStruct *px1 = __shared_struct;
All necessary information regarding linker file are contained in the project I sent you.Please check ld files, c files with main function and sh_mem.h files.
All information about correct semaphores implementation are described in the app note.
Regards,
Martin