Issue :
By default, the Cortex-A9 port does not support the use of the floating point unit in interrupts. If it is necessary to use the floating point unit in interrupts then it will also be necessary to save the entire floating point context to the stack on entry to each (potentially nested) interrupt. From FreeRTOS V9.0.0 the FreeRTOS GCC Cortex-A port can do this automatically for you. By default the RZA FreeRTOS does not enable this for the RZA. Does the RZA support floating point unit (FPU) in interrupts?
Solution :
The reason why configUSE_TASK_FPU_SUPPORT is set to 1, is to save stack memory.
You can set configUSE_TASK_FPU_SUPPORT to 2.
Alternative:
We recommend keeping configUSE_TASK_FPU_SUPPORT 1, and call portTASK_USES_FLOATING_POINT() function at the beginning of a task that uses the floating-point calculation.
The example of calling portTASK_USES_FLOATING_POINT() is shown in following URL:
https://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html
Interrupt Handler:
And if there is interrupt handler that uses FPU, the following operation is required at the top and the end of IRQ handler.
/* Save the floating point context, if any. */ FMRXNE R1, FPSCR VPUSHNE {D0-D15} VPUSHNE {D16-D31} PUSHNE {R1}
/* Restore the floating point context, if any. */ POPNE {R0} VPOPNE {D16-D31} VPOPNE {D0-D15} VMSRNE FPSCR, R0
Supports RZA2M Processor only.
e2studio 2022-01 and later support FreeRTOS (with IoT Libraries ) for the RZA2M from scratch. Follow the steps below.
Step 1) Create a GNU for Renesas RZ C/C++ Executable Project. Then Create a project name.
Step 2) In the next dialog after creating project name the following setting are required.
Step 3) Use the default setting of every dialog after.
Step 4) Next open the smart configuration perspective for this project. This would be the ProjectName.scfg file ( i.e. Test.sctg).
Step 5) Click the generate Code in the SC Overview Information Window. This will generate the default drivers.
Step 6) By default a main.c file is not created. You will need to manually need to create this file and define the main function.
Step 7) Compile