FreeRTOS ported to RL78 & RH850 : sample projects on GIT

Hello Everyone,

FreeRTOS ready to use project & port for RL78 & RH850 available.

http_s://github.com/dinguluer/Renesas_FreeRTOS

freeRTOS on RL78 & RH850.

  • 16 bit Microcontroller RL78.
  • 32 bit Microcontroller RH850.

Development environment used for porting freeRTOS on RH850.

  • GHS , IAR & CS+

RH850 Port is provided for

  • MCU : RH850/F1KM-S1 Part Number : R7F701690, 64 pins
  • Compiler used : GHS & CCRH
  • freeRTOS = V10.4.1

RL78 Port is provided for

  • MCU : RL78/F13 Part Number : R5F10BMG
  • MCU : RL78/G14 Part Number : R5F104PJ
  • Compiler used : IAR & CCRL
  • freeRTOS = V10.4.1

Thanks & Regards,
Dinesh

1 Like

This is great - thanks. I will check to see what if anything needs to change to see if there are update to upstream.

Hello Dinesh,

First of all, please don’t be angry with me. I’ll post pull requests of RL78 port (CC-RL/ICCRL78/GNURL78) and RL78 FreeRTOS Demo (CS+/EWRL78/e2 studio) during this spring. My repos are here.

A fork of FreeRTOS kernel:

https://github.com/NoMaY-jp/FreeRTOS-Kernel/tree/master/portable/Renesas/RL78
https://github.com/NoMaY-jp/FreeRTOS-Kernel/tree/master/portable/IAR/RL78
https://github.com/NoMaY-jp/FreeRTOS-Kernel/tree/master/portable/GCC/RL78

A fork of FreeRTOS:

https://github.com/NoMaY-jp/FreeRTOS/tree/master/FreeRTOS/Demo/RL78_RL78G14_FPB_Renesas_e2studio_CS+
https://github.com/NoMaY-jp/FreeRTOS/tree/master/FreeRTOS/Demo/RL78_RL78G14_FPB_IAR_e2studio_EWRL78
https://github.com/NoMaY-jp/FreeRTOS/tree/master/FreeRTOS/Demo/RL78_RL78G14_FPB_GCC_e2studio

Other repo regarding RL78 FreeRTOS examples (CC-RL/ICCRL78/GNURL78, CS+/EWRL78/e2 studio):

https://github.com/NoMaY-jp/FreeRTOS_examples_for_Renesas_R_CPUs

Advantage of this RL78 port than the official RL78 port:

(1) Non FreeRTOS nested interrupts are available. (‘Non FreeRTOS interrupts’ means that its ISRs don’t call any FreeRTOS APIs)
(2) Interrupt dedicated stack is available. (for both FreeRTOS interrupts and non FreeRTOS interrupts)

These features are intended to solve the following issues which were mentioned in the following thread.

(1) RL78 port doesn’t permit interrupt nesting. (This might be a big problem for your BLDC motor control application.)
(2) RL78 port (to be more accurate, RL78 itself) doesn’t have dedicated interrupt stack. (So every stack must have additional space for ISR.)

Anyone have experience with RL78 port on e2 studio IDE and native compiler instead of IAR?
https://forums.freertos.org/t/anyone-have-experience-with-rl78-port-on-e2-studio-ide-and-native-compiler-instead-of-iar/10628

And one more advantage of this RL78 port than the official RL78 port:

(3) It is easy to use the port with C source code which are generated by the Renesas RL78 code generator.

Best regards,
NoMaY

Nice NoMaY… I will check it… …!!

Hello Dinesh,

Thank you for your reply.

By the way, you have two repo regarding RH850 FreeRTOS port. Which is better for reading RH850 source code?

Best regards,
NoMaY

Same code … but GIT repository link posted in this thread have GHS sample code also…

I will keep this in near future :–
http_s://github.com/dinguluer/Renesas_FreeRTOS

Thanks & Regards,
Dinesh

Hello Dinesh,

Thank you for your reply.

I have replaced a fork on my GitHub account from dinguluer/Renesas to dinguluer/Renesas_FreeRTOS. I will read your code and may ask you some questions about the code. (But I’m sorry that questions will come from my personal interest, not from my ‘JOB’.)

By the way, the following your old post is flaged and temporarily hidden. Do you know the reason? (If it is caused by my wrong/bad replay regarding GitHub search issue, I’m very sorry.)

Porting freeRTOS on Renesas RH850 : Task completed
https://forums.freertos.org/t/porting-freertos-on-renesas-rh850-task-completed/11260

Best regards,
NoMaY

Hi, when I downloaded the code you uploaded and compiled it in GHS environment, IT didn’t compile .The specific error is shown in the figure.

Try changing 68 to 17.

Regards,
Dinesh

When I change 68 to a value below 31, I can compile successfully,But the task created cannot run, The same operation works fine on CS+.

Does your GHS environment compile and run tasks properly? I consulted GHS technical support, They say GHS does not support FREE RTOS. Can you share your porting methods and practices below?

Try changing 68 to 17.

Hello Dinesh,
Has freertos been transplanted into RH850/U2A16?