FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2006 Threads] ARM under C & C++Posted by Nobody/Anonymous on February 18, 2006 I'm trying to compile a program under FreeRTOS with IAR compiler and if I use C as language all compile without problems, but if I use embedded C++ or extended embedded C++ I obtain always the following errors: Error[e46]: Undefined external "AT91F_LowLevelInit" referred in ?RESET ( C:\Empresa\ Inicio\Debug\Obj\Cstartup.r79 ) Error[e46]: Undefined external "vTaskSwitchContext" referred in portasm ( C:\Empresa\Inicio\ Debug\Obj\portasm.r79 ) Error[e46]: Undefined external "vTaskIncrementTick" referred in portasm ( C:\Empresa\ Inicio\Debug\Obj\portasm.r79 )
I tought that FreeRTOS supports C++ programming but I'm not sure.
If FreeRTOS supports C++ someone have an example of IAR compiler settings??
I'm developing with ARM7 AT91SAM7A3.
Thanks.
RE: ARM under C & C++Posted by Nobody/Anonymous on February 18, 2006 I suspect it cannot find the functions because of C++ mangling the names. Try using extern "C" on the functions that are called from asm code.
RE: ARM under C & C++Posted by Nobody/Anonymous on February 18, 2006 Thanks, but I think that you didn`t understand the question. I don't use asm code. I have problems with C++ code. For example, I have depeloped a class for encapsulate the task funcionality, I can compile the project with this class without problems, but when I write code for instance this class in my main function I have errors linking the project. The errors are the following: Linking Error[e46]: Undefined external "xTaskCreate(pdTASK_CODE, signed char const *, unsigned short, void *, unsigned long, void * *)" referred in ITask ( C:\Empresa\Inicio\Debug\Obj\ ITask.r79 ) Error[e46]: Undefined external "xTaskGetTickCount()" referred in ITask ( C:\Empresa\Inicio\ Debug\Obj\ITask.r79 ) Error[e46]: Undefined external "vTaskDelayUntil(portTickType *, portTickType)" referred in ITask ( C:\Empresa\Inicio\Debug\Obj\ITask.r79 ) Error[e46]: Undefined external "vTaskDelete(void *)" referred in ITask ( C:\Empresa\Inicio\ Debug\Obj\ITask.r79 ) Error[e46]: Undefined external "vTaskStartScheduler()" referred in main ( C:\Empresa\Inicio\ Debug\Obj\main.r79 )
Someone have any idea??? Thanks
RE: ARM under C & C++Posted by Nobody/Anonymous on February 19, 2006 While it may not be asm related it still sounds like the same problem. Are you compiling some files as c++ and some as c? If so they will not link. You need to compile it all as c++ (in which case I'm not sure it will work) or declare the c code as extern "c" (in which case it may work depending on what you are doing with the c++ code).
If you are not sure what this answer means then I suggest reading up a bit on mixing c and c++.
RE: ARM under C & C++Posted by Jokke on February 20, 2006 Maybe the problem is that the compiler doesn't see the extern "C" when compiling the OS, but when it compiles the c++ code. Therefore the C++ expects unmangled names, but the OS functions are mangled. Look in your link listing if you can find mangled versions of the OS functions (in case you get a listing even with failed links).
Jokke
RE: ARM under C & C++Posted by Jokke on February 20, 2006 I also experienced in one environment, that when I set it up for c++ all the *.c files were omitted, and not included in the make.
Jokke again
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|