Quality RTOS & Embedded Software

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


Loading

FreeRTOS with C++

Posted by vicharshunya on January 4, 2014

Hi,

I am trying to use C++ application with FreeRTOS. I come to know about this post :- https://sourceforge.net/p/freertos/discussion/382005/thread/5d5201c0 but I am not sure how and where to add this TaskCPP.h file.

Right now I have very simple main.cpp file something like this.

int main(void) { //Set priority bits to preempt priority NVICPriorityGroupConfig(NVICPriorityGroup_4); for( ;; ); return 0; }

And this gives me an error :- /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: STM32F4_FreeRTOS.axf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/libgcc.a(unwind-arm.o) does not

/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/libgcc.a(unwind-arm.o)

I am not sure what is wrong with settings.


FreeRTOS with C++

Posted by richard_damon on January 4, 2014

TaskCPP.h would be included by any file that wants to create a Task via the FreeRTOS wrapper classes.

While I am not familiar with this specific toolset, it looks like there is a configuration error between how you are compiling the file and the library you are linking it to.

The path it is quoting to the linker makes me think something is set up strange (with two different sets of path backtracking).


FreeRTOS with C++

Posted by beginend1 on January 9, 2014

Most likely you are linking with library that uses different floating point calling convention. Check which calling convention is used in library or play with adding/removing "-mfloat-abi=[soft|softfp|hard]" and/or "-mfpu=fpv4-sp-d16" to/from compilation options.


[ 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