Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

errors while compiling freertos with iar compiler

Posted by chris-itk on October 7, 2014

Hi everybody, I get a compiler error when I use the --mfc compiler flag (multi-file compilation) of the IAR compiler. Without this flag, compiling every single c-file for itself, my project builds without any error.

I would be very glad if you could tell me what the problem is.

Regards Chris

Here's the message: iccrl78.exe ./usersrc/FreeRTOS/croutine.c ./usersrc/FreeRTOS/eventgroups.c ./applilet3src/FreeRTOSHooks.c ./usersrc/FreeRTOS/portable/MemMang/heap1.c ./usersrc/FreeRTOS/list.c ./usersrc/FreeRTOS/portable/IAR/RL78/port.c ./usersrc/FreeRTOS/queue.c ./applilet3src/rcgcgc.c ./applilet3src/rcgcgcuser.c ./applilet3src/rcgport.c ./applilet3src/rcgportuser.c ./applilet3src/rcgtimer.c ./applilet3src/rcgwdt.c ./applilet3src/rcgwdtuser.c ./applilet3src/rmain.c ./applilet3src/rsysteminit.c ./usersrc/FreeRTOS/timers.c ./usersrc/Tasks/UserTasks.c ./usersrc/FreeRTOS/tasks.c --core rl782 --codemodel near --datamodel near --nearconstlocation rom0 -e -Ol --nocse --nounroll --noinline --nocodemotion --notbaa --nocrosscall --noscheduling --noclustering --debug --mfc --nosysteminclude -o ./Debug/Obj/ --dlibconfig dlrl78nn2n.h -I ./usersrc/FreeRTOS/ -I ./usersrc/FreeRTOS/portable/IAR/RL78/ -I ./usersrc/FreeRTOS/include/ -I ./applilet3src/ -I ./usersrc/Tasks/ -I ./usersrc/includes/

IAR C/C++ Compiler V1.40.3.898 for RL78 Copyright 2011-2014 IAR Systems AB. Evaluation license - IAR Embedded Workbench for Renesas RL78, Evaluation version 1.40

extern volatile TCBt * volatile pxCurrentTCB; ^ "C:Usersckurz.ITKDesktopRL78DemoRL78DemousersrcFreeRTOSportableIARRL78port.c",90 Error[Pe1061]: declaration of variable "pxCurrentTCB" is incompatible with a declaration in another translation unit "void volatile *volatile _near pxCurrentTCB" (declared at line 90 of "./usersrc/FreeRTOS/portable/IAR/RL78/port.c") (from translation unit "./usersrc/FreeRTOS/portable/IAR/RL78/port.c") "struct tskTaskControlBlock *volatile __near pxCurrentTCB" (declared at line 188 of "./usersrc/FreeRTOS/tasks.c") (from translation unit "./user_src/FreeRTOS/tasks.c")

Errors: 1 Warnings: none makefile:60: recipe for target 'Debug/Obj/croutine.r87' failed mingw32-make: *** [Debug/Obj/croutine.r87] Error 2


errors while compiling freertos with iar compiler

Posted by davedoors on October 8, 2014

I just tried this in my ARM project and didnt get an issue. It must be specific to the RL78 port file. Did you try changing the extern declaration

extern volatile TCB_t * volatile pxCurrentTCB;

to match the declaration in the other file? You cant use structtskTaskControlBlock, but maybe

extern TCB_t *volatile near pxCurrentTCB;

would work.


errors while compiling freertos with iar compiler

Posted by chris-itk on October 9, 2014

Hi Dave, thx for your answer. Yes I tried this out, but it didn't work. I also tried to put the whole deklaration of structtskTaskControlBlock and pxCurrentTCB into the task.h file, to be able to use it in port.c. This works fine for this error, but a lot of other errors came up.

Here's just one of them (there are a lot more): "C:Usersckurz.ITKDesktopRL78DemoRL78DemousersrclibsFreeRTOSincludeportable.h",363 Error[Pe1066]: declaration of function "pxPortInitialiseStack" had a different meaning during compilation of "./usersrc/Application/Tasks/TestTask.c" "nearfunc unsigned short *pxPortInitialiseStack(unsigned short *, TaskFunctiont, void *)" (declared at line 363 of "C:Usersckurz.ITKDesktopRL78DemoRL78Demousersrc libsFreeRTOSincludeportable.h") (from translation unit "./applilet3src/r_main.c") "nearfunc unsigned int *pxPortInitialiseStack(unsigned int *, TaskFunctiont, void *)" (declared at line 363 of "C:Usersckurz.ITKDesktopRL78DemoRL78Demousersrc libsFreeRTOSincludeportable.h") (from translation unit "./usersrc/Application/Tasks/TestTask.c")

I think I will stop trying to use the --mfc flag. It seems to be a lot of work to get this run correctly. I'm just using a loop in the makefile instead, and compiling every single file for itselfe.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner