Quality RTOS & Embedded Software

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


Loading

Missing ulICCIAR when linking C++ application

Posted by scwoods751 on June 29, 2015

I am new to freeRTOS. I went through tutorials to get c applications built and tested on a Xilinx ZC702 board (Cortex A9) and they work fine. I tried to create a very basic c++ application (hello world) but it will not link. Several objects are missing, including ulICCIAR, that are defined in port.c and referenced in portASM.s (this is where the linkage fails). I am using Xilinx SDK on Windows 7. I assume this is a name mangling problem or a toolchain setup problem but I have not been able to find help anywhere on the internet. I was hoping someone using freeRTOS might be able to assist me.


Missing ulICCIAR when linking C++ application

Posted by rtel on June 30, 2015

We don't actually use C++ ourselves, but lot of people do use FreeRTOS in C++ applications, and even provide C++ frameworks.

What we do do is have extern "C" in the header files of the core code to ensure the core code can be built as C in an otherwise C++ application. I don't think this is the issue in this case though.

ulICCIAR is declared in the relevant port.c source file, then used in portASM.S. I suspect the name is being mangled in the C file so the .S file cannot use the original name.

Are you building the FreeRTOS source files as C code? It should then link in a C++ application.

Regards.


Missing ulICCIAR when linking C++ application

Posted by scwoods751 on June 30, 2015

I created the application as c++ and included the FreeRTOS code as-is in the application. The toolchain is set to g++ and the build log indicates the g++ compiler is used on port.c module. I thought the g++ compiler would treat c modules as c code and cc/cpp modules as c++ code. Is there a way to build the FreeRTOS modules separately and then just link them in as a module (like a lib)?


Missing ulICCIAR when linking C++ application

Posted by scwoods751 on June 30, 2015

I changed the toolchain to use the gcc compiler (override g++) for every c module in the project and then added in the include paths for every c module as well. It then built with no linkage problems. There must be a way to change to gcc compiler and include paths for c modules only once at the top level of the project instead of having to override every c file independently but I could not find it in the Xilinx SDK. Anyhow the project finally builds... now I need to figure out why initializing basic hardware doesn't work. Thanks for your help. Any other pointers would be appreciated.


Missing ulICCIAR when linking C++ application

Posted by scwoods751 on June 30, 2015

Figured out why the basic hardware was not initializing... script.ld was generic and was missing the FreeRTOS vector table stuff. All good now.


[ 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