Repository navigation
About RL78 FreeRTOS
- Return to Home / ホーム に戻る
- The Japanese page is here: RL78 FreeRTOSについて
A list of the microcontrollers supported by FreeRTOS for the RL78 and folders of the portable layer that must be selected are summarized in the table below. Links to the methods for creating projects for each MCU (Code Generator support or Smart Configurator support) are also given in the table.
The “MCU Group” column lists microcontrollers for which operation has been confirmed. Users cannot receive technical support through “support tickets” for Renesas Technical Support in the case of microcontrollers for which operation has not yet been confirmed.
| RL78 MCU | Portable Layer | Methods for Creating Projects | |
|---|---|---|---|
| MCU Group | CPU Core Type | CC-RL Compiler | |
| RL78/G13 | RL78-S2 | Renesas/RL78 | Method using the Code Generator |
| RL78/G14 | RL78-S3 | ||
|
RL78/G23 RL78/G24 |
Method using the Smart Configurator | ||
✅ Note:
Under the following conditions, the RL78 FreeRTOS kernel uses approx. 8 Kbytes of ROM and approx. 4 Kbytes of RAM.
- CC-RL compiler
- Compiler options
-
-Odefault: Applied optimization is effective for both the object size and execution speed. -
-memory_model: Automatically selected -
-far_rom: Setting the near/far attribute for the ROM data specified by the memory model to far
-
- Linker option
-
-optimize=symbol_delete: Deleting variables or functions not referred to even once
-
- Compiler options
- Switching of register banks (the memory space for allocating general-purpose registers of the RL78 microcontroller) is not supported.
- Interrupt nesting is not supported.
- Since task-switch requests are implemented by the software interrupt, task switching is to be executed immediately after a task switch has been requested due to the specification. This imposes the following restriction on the user application.
- In an interrupt service routine (ISR), request a task switch (execute the
portYIELD_FROM_ISRmacro) in the last processing of the ISR.
For details on this restriction for the specification, refer to Issue ticket #21 of GitHub. - Do not request a task switch in a critical section.
- In an interrupt service routine (ISR), request a task switch (execute the
- Caution should be taken when implementing the user application if
nearpointers are being treated as 4-byte integers by the CC-RL compiler.
For example, the following phenomenon occurs inxTaskCreate()because avoid *type argument is always handled as anearpointer.-
Phenomenon: The value specified in the argument
pvParameterson thexTaskCreate()side does not match the value obtained by casting the argumentpvParameterson the task-entry function side to a 4-byte integer. -
Cause: Based on the specifications of memory allocation in the CC-RL compiler:
- Since the arguments of a FreeRTOS API function are not designated specifically with the keyword
__far,void *type arguments are always treated as 2-bytenearpointers. - When the size of the near pointer is extended from 2 bytes to 4 bytes, the third byte from the least significant is set to
0x0f. - For details on the specifications, refer to the following in the CC-RL Compiler User's Manual.
- Sub-section on “Relationship with near and far”
- Sub-section on “Internal representation and value area of data”
- Item on “Specifying memory allocation area (__near /__far)”
- Since the arguments of a FreeRTOS API function are not designated specifically with the keyword
-
Countermeasure: In each task, incrementally cast the value of the argument
pvParametersin order through “2-byte integer (int type)” to “4-byte integer (long type)”.void main (void) { void* parameter = 0x0; // The void* type arguments of FreeRTOS APIs (e.g. xTaskCreate's pvParameters) are always near pointers. xReturned = xTaskCreate(vTaskA, "TaskA", stackSize, parameter, // The parameter is a near pointer priority, &xHandle); ... } void vTaskA(void * pvParameters) { // NG: Because the val is casted from a near pointer to a long type, // its value is 0xf0000 instead of 0x0 // long val = (long)pvParameters; // OK: Cast in stages: near pointer (2 bytes) → int type (2 bytes) → long type (4 bytes) int val_int = (int)pvParameters; long val = (long)val_int; // val = 0x0 ... }
-