FreeRTOS SMP for MPC5777C

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS SMP for MPC5777C

554 Views
Othmane1
Contributor II

Hi,

I have a question, is it possible to use FreeRTOS SMP for MPC5777C even though I'm using two elf (each core with it's own elf)? 

i was already trying to do so but i was having problems passing the core id to the core 1 ISR as shown below:

the idea is the scheduler is triggering an interrupt on core1 (if it is free) and when i checked that when the interrupt is triggered core1 actually stops executing and goes to the ISR (below) but the priv parameter is a random value

void vPortSoftIrqISR(void *priv)
{
    BaseType_t xCore = (BaseType_t)priv;

    e_assert_void(xCore == portGET_CORE_ID());

    softirq_clear(pxSoftIRQ[xCore]);
    vTaskSwitchContext(xCore);
}
0 Kudos
3 Replies

528 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Othmane1 

I think that two elf files should not be a problem but I recommend to ask directly on FreeRTOS forum about that.

Regarding the variable - isn't that caused by data cache memory? Either try to disable the cache or make sure that all shared data are forced to cache inhibited area. Another option is to enable Platform Coherency Unit PCU which maintains cache coherency between the cores.

Regards,

Lukas

0 Kudos

510 Views
Othmane1
Contributor II

I'm not using cashe memory (at least i'm not enabling it).

I continued the debug and i'm still having the problem, the weired thing is that not only i'm receiving a null pointer, also i'm not able to do any type of affectation: when i do something like var = 1, i check the var value after the afectation and var value is not changed!!!

 

kind regards

0 Kudos

468 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

The cache memory can be enabled by startup files. Please check DCE bit in L1CSR0 core register:

lukaszadrapa_0-1698651226695.png

 

Regards,

Lukas

0 Kudos