chris-itk wrote on Tuesday, October 07, 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 ./user_src/FreeRTOS/croutine.c ./user_src/FreeRTOS/event_groups.c ./applilet3_src/FreeRTOS_Hooks.c ./user_src/FreeRTOS/portable/MemMang/heap_1.c ./user_src/FreeRTOS/list.c ./user_src/FreeRTOS/portable/IAR/RL78/port.c ./user_src/FreeRTOS/queue.c ./applilet3_src/r_cg_cgc.c ./applilet3_src/r_cg_cgc_user.c ./applilet3_src/r_cg_port.c ./applilet3_src/r_cg_port_user.c ./applilet3_src/r_cg_timer.c ./applilet3_src/r_cg_wdt.c ./applilet3_src/r_cg_wdt_user.c ./applilet3_src/r_main.c ./applilet3_src/r_systeminit.c ./user_src/FreeRTOS/timers.c ./user_src/Tasks/UserTasks.c ./user_src/FreeRTOS/tasks.c --core rl78_2 --code_model near --data_model near --near_const_location rom0 -e -Ol --no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --no_crosscall --no_scheduling --no_clustering --debug --mfc --no_system_include -o ./Debug/Obj/ --dlib_config dlrl78nn2n.h -I ./user_src/FreeRTOS/ -I ./user_src/FreeRTOS/portable/IAR/RL78/ -I ./user_src/FreeRTOS/include/ -I ./applilet3_src/ -I ./user_src/Tasks/ -I ./user_src/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 TCB_t * volatile pxCurrentTCB;
^
“C:\Users\ckurz.ITK\Desktop\RL78_Demo\RL78_Demo\user_src\FreeRTOS\portable\IAR\RL78\port.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 “./user_src/FreeRTOS/portable/IAR/RL78/port.c”) (from
translation unit
“./user_src/FreeRTOS/portable/IAR/RL78/port.c”)
“struct tskTaskControlBlock *volatile __near pxCurrentTCB”
(declared at line 188 of “./user_src/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