I have a working reference for FreeRTOS v10.4.1 ported to RH850 single core (R7F701645) which uses the Renesas CCRH compiler
From my desk research, the multi-core support is added from v11 so I will be attempting to upgrade the existing RTOS version of mine on single core first
I can sum up the porting as an implementation of 6 functions (in port.c assembly syntax) and making changes to boot up code for the single-core MCU that I used
trap_set
portSAVE_CONTEXT
portRESTORE_CONTEXT
vPortYield
vPortStart
vPortSetupTimerInterrupt
Similarly, I am looking for a reference for the RH850 port that has the changes to be done to enable multi-core support
Are there any additional port assy functions to be implemented for this?
Is there any reference port available for reference that closely matches RH850 U2A8 R7F702301A
I have a U2A8 CS+/CCRH project sample that demonstrate multiple instances of FreeRTOS running on different cores (Asymmetric multiprocessing).
If you think this could be helpful, please provide me with your contact details, I am happy to share it with you.
The AMP project on U2A8 is currently using an older version of FreeRTOS.
I will create a PR after testing with the latest FreeRTOS version, following the provided demo template.
Meanwhile, I am working on an SMP port and have encountered an issue.
Question:
How do secondary cores manage their task scheduling after the primary core triggers their first task via an IPI?
Issue:
During SMP porting, Core 1 is getting stuck in an infinite sequence loop involving trap interrupts.
The sequence call of core 1 as the below:
Thank you for your hint.
The issue is that the ‘uxCoreAffinityMask’ for the idle task on core 1 is set to ‘1’.
Where is this 'uxCoreAffinityMask` assigned to ‘2’ for core 1?
I have tried to modify it manually in prvCreateIdleTasks()
, but core 0 raised an exception while core 1 only executes its idle task after a while. There may be an issue with both cores accessing the same pxReadyTasksLists, which causes it to break (core 0 raises an exception at the line: if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) configNUMBER_OF_CORES in prvIdleTask)
The core affinity is not an issue; the problem is due to an incorrect implementation of the inter-processor interrupt, which inadvertently triggers the ISR on both cores.