Quality RTOS & Embedded Software

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




Loading

Submitting Modifications

Posted by Richard Damon on October 28, 2007
What is the procedure for submitting ideas/code for minor updates?

I am using FreeRTOS in a project using C++ and to get it to compile as a C routine, I need to add

#ifdef __cplusplus
extern "C" {
#endif

and

#ifdef __cplusplus
}
#endif

bracketing the definitions in include files.

In addition I change a few of the opaque type from

typedef void * xQueueHandle

to

typedef struct QueueDefinition * xQueueHandle;

which gets around some warnings on inconsistent types, while still keeping the definition opaque (since the struct definition is still not visable).

I would think these are reasonable changes to make in the code base for a future release.

RE: Submitting Modifications

Posted by Richard on October 29, 2007
Hi Richard,

Thanks for your suggestions.

With reference to the 'extern "C"' inclusion. I will add this into the next release (due in a couple of weeks or so). Could you send me your modified files so I get their positioning correct - I think they just need to be placed at the top and bottom of the header files but as I don't have any C++ projects setup I cannot test this. Please send the files to r _dot_ barry (at) freertos.org.

With reference to the void * used for the queue and task handles. You are right - this is a pain. Unfortunately it has to be done this way because it is the only method I have found that will happily go through all the various compilers that FreeRTOS.org is built with. The method suggested by yourself breaks the build with at least one compiler - from memory I think this is the C18 compiler from Microchip.

Thanks and regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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