Anyone have experience with RL78 port on e2 studio IDE and native compiler instead of IAR?

I am just starting with the chip and the IDE/compiler so this might be a serious bunyhole. Any guidance? I will also ask my Renesas connections.

Doesn’t look like there is an official RL78 port for the Renesas compiler - you may be able to find something on the web but it would be tricky for us to then support it.

Thanks. In looking at the application it might not be a good fit. I wanted to wrap a BLDC motor control in a task but at high rpm it would cross one tick time per phase drive. I also don’t yet possess the motor code, but suspect it is an ISR framework, not procedures. May be a moot point.

Most BLDC motor control uses ISR for the commutation code to keep it real fast. Depending on what you are trying to do, some of the outer control loops can work well at a task level

Hello,

I ported Demo/RL78_multiple_IAR project in FreeRTOS v10.0.1 to CC-RL/CS+, CC-RL/e2 studio and GNURL78/e2 studio in the following thread. Please note that this thread was written in Japanese but I think that files in zip is a starting point for you. These zips contain only additional (or replacing) files to FreeRTOS v10.0.1 folder tree so that you have to download also FreeRTOS v10.0.1 zip or installer exe then extract them and merge them into combined folder tree.

https://japan.renesasrulz.com/cafe_rene/f/forum21/4826/freertos-fit-cg-pdg2-csplus/27325#27325
FreeRTOS_Demo_RL78_multiple_RenesasCCRL_CS+_20180218.zip
FreeRTOS_Demo_RL78_multiple_RenesasCCRL_e2studio_20180218.zip

https://japan.renesasrulz.com/cafe_rene/f/forum21/4826/freertos-fit-cg-pdg2-csplus/27179#27179
FreeRTOS_Demo_RL78_multiple_GCC_e2studio_20180204.zip

RL78 port for CC-RL and GNURL78 (and also ICCRL) is simpler than RX port as follows:

(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.)

And there was the following problem when I run the full demo program:

(X) After quarter or half of a day (or after one day), the program shows runtime error. i.e LED blinked faster than the interval of no error state. I’d like to check this problem again with FreeRTOS v10.3.1’s kernel and demo source but I haven’t started it yet.

Moreover RL78 port for CC-RL has the following memory model issue:

(A) In case of ICCRX, ‘small’ and ‘large’ memory model (i.e. date pointer size == function pointer size) are supported but other models aren’t supported.
(B) On the other hand, CC-RL has ‘small’ and ‘medium’ memory model but it doesn’t have ‘large’ memory model. RL78 MCUs which has more than 64K code flash memory has to use ‘medium’ memory model (i.e. date pointer size != function pointer size) but I’m not sure whether FreeRTOS kernel works perfectly with such memory model. (My tiny test shows that it seems to work but I’m not sure…)

By the way, I posted other RL78 ports which are easier to use with code generating functionality of e2 studio and CS+ in Japanese user forum of Renesas but they are still in study.

Best regards,
NoMaY

Thank you. I will discuss these points with the motor firmware developers and then plan to evaluate it.