FreeRTOS on RL78/G14 with IAR (2.21.1) demo

Hello,

I'm trying to migrate our products from gcc to IAR Embedded Workbench 2.21.1 for RL78 without success.

The current demo is not compliant with the latest version of IAR Embedded Workbench (ORG and COMMON seems to be deprecated):

COMMON INTVEC:CODE:ROOT(1)
ORG configTICK_VECTOR
DW vPortTickISR

COMMON INTVEC:CODE:ROOT(1)
ORG 126
DW vPortYield

Is there a working up-to-date example available ?

Thank you,

Matthieu

Parents
  • This demo has been developped for EWRL V.1.xx. It cannot be compiled with EWRL V.2.xx.

    I don't know of a port to work with EWRL V.2.xx

    Please have a look at the Release Notes of EWRL. There is also a link to a document describing how to migrate a project from V.1.xx to V.2.xx.

  • I've found a way to write an IAR 2.21.1 compliant version of this assembly part looking the assembly dump of my serial port setup function :

           /* IAR 2.21.1 */

           ASEGN `.intvec`:CODE:ROOT,56

           DATA16

           DC16    _vPortTickISR

           ASEGN `.intvec`:CODE:ROOT,126

           DATA16

           DC16    _vPortYield

    FreeRTOS is now working as expected ! :)

  • Hi,

    with IAR v 3.10 the above declarations don't work

    ASEGN `.intvec`:CODE:ROOT,56
    DATA16
    DC16 vPortTickISR

    ASEGN `.intvec`:CODE:ROOT,126
    DATA16
    DC16 vPortYield

    give the errors:

    Error[Lp011]: section placement failed
    unable to complete "place at" directives with a total estimated minimum size of 0x7c bytes in <[0x00004-0x00037]> (total space 0x34).
    Error[Lp015]: section placement failure: overcommitted content in [0x00004-0x00037]
    Error while running Linker

    Has anybody tried to port Freertos for RL78 with 3.10 IAR Compiler?

    Thanks
    Nick
  • Why don't you simple use #pragma vector and __interrupt?
    #pragma vector vPortTickISR=28
    __interrupt void vPortTickISR(void);
    #pragma vector vPortYield=63
    __interrupt void vPortYield(void);
  • Hi Frank,

    the portion of code I pasted comes from an assembly file.

    I am sure there is a simple solution, I just can't see the assembly files generated by the compiler, therefore I cannot make a C file and check the correct syntax on the generated assembly file.
    What is the assembly generated code from the #pragma def you suggested?

    Thanks
Reply
  • Hi Frank,

    the portion of code I pasted comes from an assembly file.

    I am sure there is a simple solution, I just can't see the assembly files generated by the compiler, therefore I cannot make a C file and check the correct syntax on the generated assembly file.
    What is the assembly generated code from the #pragma def you suggested?

    Thanks
Children
  • Hello Friends,

    I am also stuck in porting the FreeRTOS on RL78. I am using IAR version 4.2 and FreeRTOS 10.3.1 . Initially my demo code was for R5F100LEA(RL78_RL78G13_Promo_Board_IAR). I had the below lines.

    COMMON INTVEC:CODE:ROOT(1)
    ORG configTICK_VECTOR
    DW vPortTickISR

    COMMON INTVEC:CODE:ROOT(1)
    ORG 126
    DW vPortYield

    but this was not getting compiled. So I changed the same

    ASEGN `.intvec`:CODE:ROOT,56
    DATA16
    DC16 vPortTickISR

    ASEGN `.intvec`:CODE:ROOT,126
    DATA16
    DC16 vPortYield

    After compilation of the above the below error is coming. Please help.

    Error[Li005]: no definition for "vRegTestError" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\RegTest.o]
    Error[Li005]: no definition for "usCriticalNesting" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\portasm.o]
    Error[Li005]: no definition for "pxCurrentTCB" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\portasm.o]
    Error[Li005]: no definition for "xTaskIncrementTick" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\portasm.o]
    Error[Li005]: no definition for "vTaskSwitchContext" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\portasm.o]
    Error[Li005]: no definition for "_vRegTest1" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\main.o]
    Error[Li005]: no definition for "_vRegTest2" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\main.o]
    Error[Li005]: no definition for "_vPortStartFirstTask" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\port.o]
    Error[Li005]: no definition for "_vTaskDelayUntil" [referenced from C:\Users\Anmol Arora\FreeRTOSv10.3.1\FreeRTOSv10.3.1\FreeRTOS\Demo\
    RL78_RL78G13_Promo_Board_IAR\Debug\Obj\blocktim.o]
    Error[Lp011]: section placement failed
    unable to complete "place at" directives with a total estimated minimum size of 0x7c bytes in <[0x4-0x37]> (total space 0x34).
    Error[Lp015]: section placement failure: overcommitted content in [0x4-0x37]
    Error while running Linker


    Will be waiting for anyones response.