Quality RTOS & Embedded Software

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


Loading

TMS570 port with C++ code

Posted by Emanuel Bringas on May 10, 2013
Hi,
I want to use FreeRTOS in a Hercules TMS570 with CCSv5, and I used this port -> http://www.freertos.org/Free_RTOS_for_TI_RM48_and_TMS570.html

When I develop my task in C++ and include "FreeRTOS.h" from a C++ source file I get a compilation error in FreeRTOS\portable\CCS\ARM_Cortex-R4\portmacro.h because of the usage of pragma SWI_ALIAS.
I was reading the compiler manual, and a little difference in the pragma usage exists depending on whether you use C or C++

I replaced the line 120 in portmacro.h:

#pragma SWI_ALIAS( vPortYield, 0 )


by:

#ifdef __cplusplus
#pragma SWI_ALIAS( 0 )
#else
#pragma SWI_ALIAS( vPortYield, 0 )
#endif


I want to know if this modification is valid.

Thanks in advance!

RE: TMS570 port with C++ code

Posted by Richard on May 13, 2013
I was hoping somebody else would answer this as I'm not a C++ user myself - but I would say if the modification compiles and provides the functionality you expect then it must be ok.

Regards.


[ 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