Compilation/Linker Issues in Running the Demo Example for FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR directory

Hello All,

I am also stuck in porting the FreeRTOS on RL78 Renesas MCU. 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 which were giving the error in in “port87.asm” file.

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

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

Afterwards I have changed the above instructions to the below.

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

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

Now again errors are coming mentioned below.

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

The above errors are saying that the mentioned variables(vRegTestError) are undefined portasm.o . When I am opening this file “portasm.o”, its not written in C, its an output of compiler file. Please tell how can I remove these errors.

Best Regards
Anmol Arora

I think there is an incompatibility in the output format used by the IAR compiler since the RL78 port was created. You have already fixed up one piece of assembly, and I think there are addition changes required.

I would however recommend you spend some time learning how the C compilation process works. The linker (after compilation) is telling you there is an object file generate from a source file that contains a reference it can’t find. The compiler generates the object .o files from the source files, and in the case of portasm.o the source file is an assembly file, not a C file. Likewise regtest is also an assembly file. So it looks like the method of importing and exporting symbols from assembly files is different with your version of the compiler.

Hello,

the issues seem to be famous because many threads are found as followings. But unfortunately every thread doesn’t show all steps to succeed building the project. So, I’d like to try to fix the issues and post the result regardless of success or fail. If it is succeeded then I’d like to post a pull request. (As of today, nobody posted a pull request regarding to the issues.)

https://www.freertos.org/FreeRTOS_Support_Forum_Archive/March_2016/freertos_Unable_to_compile_FreeRTOSV9.0.0rc1_with_IAR_2.20_5fbce14dj.html

http://www.openrtos.net/FreeRTOS_Support_Forum_Archive/November_2016/freertos_Assembler_Build_Errors_in_FreeRTOS_Demo_using_RL78_IAR_EW_v7.4_15bfb02dj.html

https://sourceforge.net/p/freertos/bugs/172/

https://renesasrulz.com/rl78/f/the-rl78-forum/6145/freertos-compilation-in-iar-for-rl78

https://renesasrulz.com/rl78/f/the-rl78-forum/7122/freertos-on-rl78-g14-with-iar-2-21-1-demo

https://renesasrulz.com/rl78/f/the-rl78-forum/8967/freertos-demo-on-rl78-with-iar-2-21-1-is-not-compiling

https://renesasrulz.com/rl78/f/the-rl78-forum/9585/freertos-porting-on-iar-3-10

Best regards,
NoMaY

Hello,

Now I understand that it is wrong to use ‘ASEGN .intvec:CODE:ROOT,XX<newline>DATA16’ instead of ‘COMMON INTVEC:CODE:ROOT(1)<newline>ORG XX’ if the segment is the interrupt vector table area. And I understand that it is correct to define one more label such as ___interrupt_0xXX: at the start address of ISR.

This is original code: (configTICK_VECTOR is 0x38.)

; Install the interrupt handlers

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

The following modification is wrong:

; Install the interrupt handlers

    ASEGN .intvec:CODE:ROOT,0x38
    DATA16
    DC16 _vPortTickISR

Above code causes the following linker errors because the interrupt vector table is already placed at address 0x4-0x7F but above new absolute segment starts at address 0x38 therefore these two areas overlap:

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] 

The following modification is correct:

PUBLIC    _vPortTickISR
PUBLIC    ___interrupt_0x38    <---- HERE

 RSEG CODE:CODE
_vPortTickISR:
___interrupt_0x38:    <---- HERE
portSAVE_CONTEXT               ; Save the context of the current task.
call    _xTaskIncrementTick    ; Call the timer tick function.
cmpw    ax, #0x00
skz
call    _vTaskSwitchContext    ; Call the scheduler to select the next task.
portRESTORE_CONTEXT            ; Restore the context of the next task to run.
reti

; Install the interrupt handlers

;    Nothing to do.    <---- HERE

MAP file shows that ___interrupt_0xXXs are pre-difined weak code labels and ___interrupt_tab_0xXXs are pre-difined global data labels:

___interrupt_0x00         0x4839         Code  Gb  cstartup.o [3]
___interrupt_0x04         0x48e1   0x13  Code  Wk  default_handler.o [3]
...
___interrupt_0x36         0x48e1   0x13  Code  Wk  default_handler.o [3]
___interrupt_0x38         0x49f2         Code  Gb  portasm.o [1]
___interrupt_0x3A         0x48e1   0x13  Code  Wk  default_handler.o [3]
...
___interrupt_0x7C         0x48e1   0x13  Code  Wk  default_handler.o [3]
___interrupt_0x7E         0x49aa         Code  Gb  portasm.o [1]
___interrupt_tab_0x00        0x0         Data  Gb  interrupt_vector.o [3]
___interrupt_tab_0x04        0x4         Data  Gb  interrupt_vector.o [3]
...
___interrupt_tab_0x36       0x36         Data  Gb  interrupt_vector.o [3]
___interrupt_tab_0x38       0x38         Data  Gb  interrupt_vector.o [3]
___interrupt_tab_0x3A       0x3a         Data  Gb  interrupt_vector.o [3]
...
___interrupt_tab_0x7C       0x7c         Data  Gb  interrupt_vector.o [3]
___interrupt_tab_0x7E       0x7e         Data  Gb  interrupt_vector.o [3]

Now I can build the project on my desktop with other modifications and I’m thinking how to check the modification because I don’t have RL78/G13 Promotion Board.

Other modifications:

Source/portable/IAR/RL78/{portasm.s87, ISR_Support.h}

  • Define ___interrupt_0x7E: at the start address of __vPortYield:.
  • Add ‘_’ at the beginning of PUBLIC symbols and EXTERN symbols.

Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87

  • Add ‘_’ at the beginning of PUBLIC symbols and EXTERN symbols.

Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h

  • Change the following definision. (Probably one of demo common source file was changed after this demo was created.)
    #define INCLUDE_vTaskDelayUntil 0 ----> 1

Best regards,
NoMaY

Hello,

Now I understand that the following method is no longer available due to the incompatible change of ioreg definition header files because (at least the latest version of EWRL78) ICCRL78’s header files have neither ‘#define RTCEN XXXX’ nor ‘#define TMKAEN XXXX’. So, I’ll consider something to fix it.

port.c

static void prvSetupTimerInterrupt( void )
{
    const uint16_t usClockHz = 15000UL; /* Internal clock. */
    const uint16_t usCompareMatch = ( usClockHz / configTICK_RATE_HZ ) + 1UL;

    /* Use the internal 15K clock. */
    OSMC = ( uint8_t ) 0x16;

    #ifdef RTCEN    <---- HERE
        {
            /* Supply the interval timer clock. */
            RTCEN = ( uint8_t ) 1U;

            /* Disable INTIT interrupt. */
            ITMK = ( uint8_t ) 1;

            /* Disable ITMC operation. */
            ITMC = ( uint8_t ) 0x0000;

            /* Clear INIT interrupt. */
            ITIF = ( uint8_t ) 0;

            /* Set interval and enable interrupt operation. */
            ITMC = usCompareMatch | 0x8000U;

            /* Enable INTIT interrupt. */
            ITMK = ( uint8_t ) 0;
        }
    #endif /* ifdef RTCEN */

    #ifdef TMKAEN    <---- HERE
        {
            /* Supply the interval timer clock. */
            TMKAEN = ( uint8_t ) 1U;

            /* Disable INTIT interrupt. */
            TMKAMK = ( uint8_t ) 1;

            /* Disable ITMC operation. */
            ITMC = ( uint8_t ) 0x0000;

            /* Clear INIT interrupt. */
            TMKAIF = ( uint8_t ) 0;

            /* Set interval and enable interrupt operation. */
            ITMC = usCompareMatch | 0x8000U;

            /* Enable INTIT interrupt. */
            TMKAMK = ( uint8_t ) 0;
        }
    #endif /* ifdef TMKAEN */
}

By the way, the avobe code seems to be the following code. (mistake of +/-, not so important.)

WRONG:

const uint16_t usCompareMatch = ( usClockHz / configTICK_RATE_HZ ) + 1UL;

CORRECT:

const uint16_t usCompareMatch = ( usClockHz / configTICK_RATE_HZ ) - 1UL;

Hello,

Now I understand that RL78_RL78G13_Promo_Board_IAR’s RegTest.s87 is no longer correct maybe due to the change of assembly language syntax of ‘Bcond’ instructions. At least the latest version of EWRL78, ‘Bcond’ instructions need -2 offset as follows.

No longer correct:

MOVW    AX, BC
CMPW    AX, #0x3344
BZ      +5            <---- HERE
BR      vRegTestError   
MOVW    AX, DE
CMPW    AX, #0x5566
BZ      +5            <---- HERE
BR      vRegTestError   
MOVW    AX, HL  
CMPW    AX, #0x7788
BZ      +5            <---- HERE
BR      vRegTestError
MOV     A, CS
CMP     A, #0x01
BZ      +5            <---- HERE
BR      vRegTestError

Correct:

MOVW    AX, BC
CMPW    AX, #0x3344
BZ      +5-2            <---- HERE
BR      _vRegTestError  
MOVW    AX, DE
CMPW    AX, #0x5566
BZ      +5-2            <---- HERE
BR      _vRegTestError  
MOVW    AX, HL  
CMPW    AX, #0x7788
BZ      +5-2            <---- HERE
BR      _vRegTestError
MOV     A, CS
CMP     A, #0x01
BZ      +5-2            <---- HERE
BR      _vRegTestError

Hello,

Now I understand that the 16bit ticks mode needs the following definition (at least the latest version of EWRL78) for RTOSDemo working. (This definition had been known already for CC-RL and GNURL78 in the Japanese user forum for Renesas development tools.) Maybe only early versions of EWRL78 were able to build RTODemo working without this definition. Fortunately another RTOSDemo (in the RL78_multiple_IAR directory) which is built by the latest EWRL78 now becomes working with RL78/G14 Fast Prototyping Board on my desktop. I think that all updated source files will be posted in a week.

FreeRTOSConfig.h

#if (configUSE_16_BIT_TICKS == 1)
#define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( uint32_t ) ( xTimeInMs ) * ( uint32_t ) configTICK_RATE_HZ ) / ( uint32_t ) 1000 ) )
#endif 

By the way, the past issue of RTCEN and TMKAEN is fixed as follows:

port.c

#if INTIT_vect == 0x38
    {
        ...omit...
    }
#endif /* if INTIT_vect == 0x38 */

#if INTIT_vect == 0x3C
    {
        ...omit...
    }
#endif /* if INTIT_vect == 0x3C */

portasm.s87

#if INTIT_vect == 0x38

    #define ___interrupt_TICK_VECTOR ___interrupt_0x38

#endif

#if INTIT_vect == 0x3C

    #define ___interrupt_TICK_VECTOR ___interrupt_0x3C

#endif

#ifndef ___interrupt_TICK_VECTOR

    #error Neither vector 0x38 nor vector 0x3C is available for the tick interrupt.

#endif

`

PUBLIC ___interrupt_TICK_VECTOR

`

_vPortTickISR:
___interrupt_TICK_VECTOR:

Hello,

One more incompatibility between versions of EWRL78 which breaks RTOSDemo programs is found. IAR changed ABI to comply with Renesas RL78 ABI in the past. This included a change of rule regarding to an argument of a FAR data pointer as follows (roughly and not exactly).

Older version: (The source code of the RTOSDemo programs (port layer) show the following.)

  • A FAR data pointer is passed using 4 bytes of stack.

Newer version: (The help document of CC-RL shows the following.)

  • A FAR data pointer is passed using A and DE registers.

Therefore port.c has to be modified like the following proposal.

port.c

Original: (no longer correct)

StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
uint32_t *pulLocal;

    /* With large code and large data sizeof( StackType_t ) == 2, and
    sizeof( StackType_t * ) == 4.  With small code and small data
    sizeof( StackType_t ) == 2 and sizeof( StackType_t * ) == 2. */

    #if __DATA_MODEL__ == __DATA_MODEL_FAR__
    {
        /* Parameters are passed in on the stack, and written using a 32-bit value
        hence a space is left for the second two bytes. */
        pxTopOfStack--;

        /* Write in the parameter value. */
        pulLocal =  ( uint32_t * ) pxTopOfStack;
        *pulLocal = ( uint32_t ) pvParameters;
        pxTopOfStack--;

        /* The return address, leaving space for the first two bytes of the
        32-bit value.  See the comments above the prvTaskExitError() prototype
        at the top of this file. */
        pxTopOfStack--;
        pulLocal = ( uint32_t * ) pxTopOfStack;
        *pulLocal = ( uint32_t ) prvTaskExitError;
        pxTopOfStack--;

        /* The start address / PSW value is also written in as a 32-bit value,
        so leave a space for the second two bytes. */
        pxTopOfStack--;

        /* Task function start address combined with the PSW. */
        pulLocal = ( uint32_t * ) pxTopOfStack;
        *pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
        pxTopOfStack--;

        /* An initial value for the AX register. */
        *pxTopOfStack = ( StackType_t ) 0x1111;
        pxTopOfStack--;
    }
    #else
    {
        /* The return address, leaving space for the first two bytes of the
        32-bit value.  See the comments above the prvTaskExitError() prototype
        at the top of this file. */
        pxTopOfStack--;
        pulLocal = ( uint32_t * ) pxTopOfStack;
        *pulLocal = ( uint32_t ) prvTaskExitError;
        pxTopOfStack--;

        /* Task function.  Again as it is written as a 32-bit value a space is
        left on the stack for the second two bytes. */
        pxTopOfStack--;

        /* Task function start address combined with the PSW. */
        pulLocal = ( uint32_t * ) pxTopOfStack;
        *pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
        pxTopOfStack--;

        /* The parameter is passed in AX. */
        *pxTopOfStack = ( StackType_t ) pvParameters;
        pxTopOfStack--;
    }
    #endif

    /* An initial value for the HL register. */
    *pxTopOfStack = ( StackType_t ) 0x2222;
    pxTopOfStack--;

    /* CS and ES registers. */
    *pxTopOfStack = ( StackType_t ) 0x0F00;
    pxTopOfStack--;

    /* The remaining general purpose registers DE and BC */
    *pxTopOfStack = ( StackType_t ) 0xDEDE;
    pxTopOfStack--;
    *pxTopOfStack = ( StackType_t ) 0xBCBC;
    pxTopOfStack--;

    /* Finally the critical section nesting count is set to zero when the task
    first starts. */
    *pxTopOfStack = ( StackType_t ) portNO_CRITICAL_SECTION_NESTING;

Proposal: (this will be included in a zip file which will be posted)

StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
uint32_t *pulLocal;

    /* With large code and large data sizeof( StackType_t ) == 2, and
    sizeof( StackType_t * ) == 4.  With small code and small data
    sizeof( StackType_t ) == 2 and sizeof( StackType_t * ) == 2. */

    /* The return address, leaving space for the first two bytes of the
    32-bit value.  See the comments above the prvTaskExitError() prototype
    at the top of this file. */
    pxTopOfStack--;
    pulLocal = ( uint32_t * ) pxTopOfStack;
    *pulLocal = ( uint32_t ) prvTaskExitError;
    pxTopOfStack--;

    /* The start address / PSW value is also written in as a 32-bit value,
    so leave a space for the second two bytes. */
    pxTopOfStack--;

    /* Task function start address combined with the PSW. */
    pulLocal = ( uint32_t * ) pxTopOfStack;
    *pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
    pxTopOfStack--;

    #if __DATA_MODEL__ == __DATA_MODEL_FAR__
    {
        /* The lower 8-bit value of upper 16-bit value of parameter is
        passed in A.  X is zero. */
        *pxTopOfStack = ( StackType_t ) ( ( ( ( uint32_t ) pvParameters ) >> 8 ) & 0xFF00 );
        pxTopOfStack--;

        /* An initial value for the HL register. */
        *pxTopOfStack = ( StackType_t ) 0x2222;
        pxTopOfStack--;

        /* CS and ES registers. */
        *pxTopOfStack = ( StackType_t ) 0x0F00;
        pxTopOfStack--;

        /* The lower 16-bit value of parameter is passed in DE. */
        *pxTopOfStack = ( StackType_t ) ( ( ( uint32_t ) pvParameters ) & 0xFFFF );
        pxTopOfStack--;

        /* The remaining general purpose registers BC. */
        *pxTopOfStack = ( StackType_t ) 0xBCBC;
        pxTopOfStack--;
    }
    #else
    {
        /* The parameter is passed in AX. */
        *pxTopOfStack = ( StackType_t ) pvParameters;
        pxTopOfStack--;

        /* An initial value for the HL register. */
        *pxTopOfStack = ( StackType_t ) 0x2222;
        pxTopOfStack--;

        /* CS and ES registers. */
        *pxTopOfStack = ( StackType_t ) 0x0F00;
        pxTopOfStack--;

        /* The remaining general purpose registers DE and BC. */
        *pxTopOfStack = ( StackType_t ) 0xDEDE;
        pxTopOfStack--;
        *pxTopOfStack = ( StackType_t ) 0xBCBC;
        pxTopOfStack--;
    }
    #endif

    /* Finally the critical section nesting count is set to zero when the task
    first starts. */
    *pxTopOfStack = ( StackType_t ) portNO_CRITICAL_SECTION_NESTING;

Hello,

There seems to be a small mistake in the combination of Demo/RL78_multiple_IAR and YRDKRL78G14 as follows. Not only YRPBRL78G13 for Demo/RL78_RL78G13_Promo_Board_IAR but also all boards including YRDKRL78G14 for Demo/RL78_multiple_IAR are not available for me. But RTOSDemo programs running on RL78/G13 and RL78/G14 can be debugged using e2 studio and Renesas RL78 Simulator which can simulate almost all on-chip peripheral registers and peripherals behavior. Moreover e2 studio’s Visual Expression view can show blinking of LED graphically as follows. 3sec of simulation needs real 20sec ~ 40sec on my PC using 1.8GHz AMD E2-9000 CPU.

Demo/RL78_multiple_IAR/demo_specific_io.h

WRONG:

#ifdef YRPBRL78G13
    #include "ior5f100le.h"
    #include "ior5f100le_ext.h"
    #define LED_BIT         ( P7_bit.no7 )
    #define LED_INIT()      P7 &= 0x7F; PM7 &= 0x7F
#endif /* YRPBRL78G13 */

#ifdef YRDKRL78G14
    #include "ior5f104pj.h"
    #include "ior5f104pj_ext.h"
    #define LED_BIT         ( P4_bit.no1 )
    #define LED_INIT()      LED_BIT = 0 <---- HERE
#endif /* YRDKRL78G14 */

#ifdef RSKRL78G1C
    #include "ior5f10jgc.h"
    #include "ior5f10jgc_ext.h"
    #define LED_BIT         ( P0_bit.no1 )
    #define LED_INIT()      P0 &= 0xFD; PM0 &= 0xFD
#endif /* RSKRL78G1C */

... omit ...

CORRECT:

#ifdef YRPBRL78G13
    ... omit ...
#endif /* YRPBRL78G13 */

#ifdef YRDKRL78G14
    #include "ior5f104pj.h"
    #include "ior5f104pj_ext.h"
    #define LED_BIT         ( P4_bit.no1 )
    #define LED_INIT()      P4 &= 0xFD; PM4 &= 0xFD <---- HERE
#endif /* YRDKRL78G14 */

#ifdef RSKRL78G1C
    ... omit ...
#endif /* RSKRL78G1C */

... omit ...

Screen copies of e2 studio and Visual Expression view (*.s87 are renamed to *.s to be built using e2 studio)

LED ON

LED OFF

Hello,

Files in the following zip file fix the build error problems which are caused by recent EWRL78.

FreeRTOSv10.3.1.EWRL78.Fixed.20200817.zip (639.2 KB)

This zip file includes all files which are necessary to build the following RTOSDemo projects and the following environments and project settings and hardware/simulator are used to confirm.

FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR
FreeRTOS/Demo/RL78_multiple_IAR

IDE and Compiler

EWRL78 V4.20.1 including ICCRL78 V4.20.1.226 (16KB KickStart Edition)
e2 studio v7.8.0 (32bit version) with ICCRL78 V4.20.1.226
e2 studio v2020-07 (64bit version) with ICCRL78 V4.20.1.226

Device information and Project settings

RL78_RL78G13_Promo_Board_IAR project

                        Tick                               On-chip   Non-task  Compiler  e2 studio's                            
                        Interrupt            Memory model  MUL/DIV   Stack     Optimize  Debug launch configurations            
Board         Device    Vector    ROM/RAM    Code/Data     Unit      Size (*1) Level     Emulator          Simulator            
                                                                                                                                
YRPBRL78G13   R5F100LE  0x38     64KB/4KB    Near/Near     Disabled  128B      High      on-board EZ (*2)  Renesas RL78 Sim (*3)

RL78_multiple_IAR project

                        Tick                               On-chip   Non-task  Compiler  e2 studio's                       
                        Interrupt            Memory model  MUL/DIV   Stack     Optimize  Debug launch configurations           
Board         Device    Vector    ROM/RAM    Code/Data     Unit      Size      Level     Emulator          Simulator       
                                                                                                   
YRPBRL78G13   R5F100LE  0x38     64KB/4KB    Near/Near     Disabled  128B      High      on-board EZ (*2)  Renesas RL78 Sim (*3)
                                                                                                
YRDKRL78G14   R5F104PJ  0x38    256KB/24KB   Far/Far       Disabled  144B      High      on-board EZ (*2)  Renesas RL78 Sim (*3)
                                                                                                
RSKRL78G1C    R5F10JGC  0x38     32KB/5.5KB  Near/Near     Disabled  128B      High      E1 (*2)           N/A                  
                                                                                                
RSKRL78L1C    R5F110PJ  0x3C    256KB/16KB   Far/Far       Disabled  144B      High      E1 (*2)           N/A                  
                                                                                                
RSKRL78L13    R5F10WMG  0x3C    128KB/8KB    Far/Far       Disabled  144B      High      E1 (*2)           N/A                  
                                                                                                
RL78_G1A_TB   R5F10ELE  0x38     64KB/4KB    Near/Near     Disabled  128B      High      E1 (*2)           N/A                  
                                                                                                
RL78_G14_FPB  R5F104ML  0x38    512KB/48KB   Far/Far       Disabled  144B      High      on-board E2 Lite  Renesas RL78 Sim (*3)

*1: Non-task Stack Size means that stack size before the scheduler starts.
*2: These launch configurations are not tested because I don’t have these evaluation boards.
*3: e2 studio’s Visual Expression view can show blinking of LED graphically. (Note that please don’t open the view when emulator is used because the view strongly disturbs program running.)

Other information

You can select build configuration as follows:

EWRL78
e2studio_freertos_build_issues_31

e2 studio (Please note that tool bar is customized by me.)

You can select debug configuration as follows:

e2 studio (Please note that tool bar is customized by me.)

You can open the Visual Expression view when you user e2 studio and Renesas RL78 Simulator.
(If non LED image is displayed, please wait for a next timing of LED turn on/turn off.)


e2studio_freertos_build_issues_52
e2studio_freertos_build_issues_53
e2studio_freertos_build_issues_54

IDE’s bugs need some workarounds of project settings:

Changing Memory Model (Near<–>Far) removes preprocessor macro definitions in certain cases.
So, I did the following settings.
e2studio_freertos_build_issues_61




Changing Build Configuration leads to link error.
So, I added a pre-build command to show an error message and please do the steps in the error message when it is displayed.


Best regards,
NoMaY