Hello @mikisama ,
Thanks for you explanation! I used the direct vecotor mode too.
Recently,I’ve been testing the RTOS on RH850 platform, recursive mutex/ counting Semaphore/ block timer passed the tests.
But interrupt queue test failed and the failure rate was about 70%, the direct failure reason was suspend and resume flag didn’t match.
BaseType_t xTaskResumeAll( void )
{
........
/* If uxSchedulerSuspended is zero then this function does not match a
* previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended );
........
}
I have spent 3 days debugging this issue and haven’t figured out yet.
As a comparison, I‘d like to know if you have encountered a similar problem?
Appreciate that if you have any good suggestions!
Thanks!
Hi @mikisama ,
Appreciate that you can help me with this project.
For the issue, not yet, but I have used table reference mode + no interrupt nest to work around it so that I can keep porting other modules.
Finally, interrupt nesting is neccessary for current project.
freeRTOS and platform relevant code as below: RH850F1L_FreeRTOS_V202112.00.zip (296.5 KB)
I’d like to explain what I have done on project.
GCC directory as portable file
remove commad HILO of “mov hilo(_xInterruptNesting), r6” to fit GHS compiler
use TAUB channel 0 and channel 1 for interrupt queue test
The rest is basically the same as the reference code.
You should not use the __interrupt keyword to define an ISR.
I don’t know much about the GHS compiler, but when IAR uses the __interrupt keyword to define the ISR, the registers are saved and restored in a different order than defined by pxPortInitialiseStack.
I am asking in general if we use the freeRTOS port to RH850 and interrupt occur only once how to enable multiple interrupts as explained in the link below by Renesas
did you anytime try out porting the freertos port of RH850 to eclipse ?
we tried another port of RH850(dguleria) in GHS and it works but when we try to port the same project onto eclipse based ghs we encounter a hang at a the place
configASSERT(pxQueue);
this occurs when We try to run a counting semaphore example test code, but binary semaphore example works fine.
The usage of some V850/RH850 general purpose registers can be switched via compile options.
Special attention needs to be paid to R5(TP) and R30(EP).
In the function pxPortInitialiseStack of bootloader/src/RTOS/portable/Core/port.c:
There is no allocation for R5 which means the OS port treat R5 as it is fixed or unused.
R30 is filled with 0x30303030 which means the OS port do not treat R30 is fixed.
The compiler must be set up to meet both of two requirements above.
I recommend you run the registers tests task first. The registers tests will ensure that the registers are saved and restored as expected by the OS port.
HI, @pra18
What setting did you do in your GHS to make [dguleria] code work. i am trying since many days it is not working for me. Is it possible for you to share the complete project.