I need to run Freertos (10.0.1, but I reproduced the problem with 8.1.2) on Renesas RX65. But every time I call xTaskCreate, I get a supervisor exception (INT_Excep_SuperVisorInst).
I started a simple GCC-RX test project (E2 Studio) which presents the problem. I also created the same project, on Renesas CC. This one works. I can provide those projects if required.
It seems there is a difference between using Freertos on GCC-RX and Renesas’s compiler, for the RX65 port. Or I forget something and I need your help to find out what…
Either way, thank you a lot for your help.
Note that we use FreeRtos 8.1.2 on RX63/GCC-RX for a while now, so this is specific for the RX65.
What are the differences in the hardware between the RX63 (where GCC is
working) and the RX65 (where GCC is not working). Have you just
compiled your RX63 project and executed it on the RX65, or did you
switch the start up code, initialisation code, linker files, etc. to be
specific for the RX65? What are the differences between the Renesas
projects between the RX63 and RX65 - can you replicate those differences
in your GCC project?
Sorry for the long delay reply. I’ll try to be as precise as possible.
RX65 is basically an evolution of the RX63, except it is based on the RXv2 core. This implies that I have to use the RX600v2 port for FreeRtos instead of RX600 for the RX63.
About the projects :
I started a new project for RX65 and little by little, added parts of the code from my RX63 project. It starts and run, until I add FreeRtos support. Then, my program starts and executes but when reaching xTaskCreate, I get the supervisor exception. This happens just after the task’s stack allocation. This is a fresh new project with the updated initialisation code, linker files, …
The test projects are as well newly created with latest IDE and toolchains. Here, nothing have been modified, I just added FreeRtos in the main() and called xTaskCreate, without anything else. Same behaviour, on GCC-RX, at least.
What are the differences between the Renesas
projects between the RX63 and RX65 - can you replicate those differences
in your GCC project?
I am not sure what you are asking here. But the main difference is that one uses RX600 port and the other is using RX600v2.
Hmm, interesting, if I read your post correctly then you have not
actually started the scheduler when this problem occurs, so at that time
it is ‘just’ executing bare metal C code, effectively from main() (or a
call tree from main()).
If this is correct, when you added the FreeRTOS files, did you make any
changes OTHER THAN adding in the C files? For example, did you update
interrupt vectors or make any changes to the startup code?
If you step into the offending xTaskCreate() function, which line is
actually causing the exception?
Hmm, interesting, if I read your post correctly then you have not
actually started the scheduler when this problem occurs
That is correct.
If this is correct, when you added the FreeRTOS files, did you make any
changes OTHER THAN adding in the C files? For example, did you update
interrupt vectors or make any changes to the startup code?
As long as I can remember:
no change on the start-up code
the following handlers added to the interrupt vector
If you step into the offending xTaskCreate() function, which line is
actually causing the exception?
The stack call is :
INT_Excep_SuperVisorInst() at inthandler.c : l.24
vTaskEnterCritical() at tasks.c : l.4072 (this is the portDISABLE_INTERRUPTS() macro)
xTaskResumeAll() at tasks.c : l.2119
pvPortMalloc() at heap_3.c : l.67
xTaskCreate() at tasks.c : l.772