Quality RTOS & Embedded Software

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


C Standard Libraries for Real-Time?

Posted by Tenacious Techhunter on August 12, 2011
For those of you using ARM gcc, you know the question of what C Standard Library to use has to be made before you even compile your toolchain. I’m trying to figure out what toolchain to use with FreeRTOS, and other Real-Time systems like it; preferably something built to produce hard-real-time code.

I would guess that an appropriate C Standard Library would be thread-safe and reentrant. Of course, there has also been some mention of problems when Yagarto went with the reentrant version of newlib. Is there something about FreeRTOS that doesn’t play well with reentrant code?

What C Standard Library is best for Hard-Real-Time projects?

RE: C Standard Libraries for Real-Time?

Posted by Dave on August 12, 2011
There is not much in FreeRTOS that needs reentrant code. No library functions used by FreeRTOS are not reentrant. If your application uses functions that are not reentrant then you can guard the functions yourself using mutexes or other semaphores. FreeRTOS does not attempt to keep a library context for each task, for example there is no errno per task. If you search this formum hard enough you will find posts that show how people have modified the TCB to had a pointer to their own newlib context, but my advice is, if you are using a microcontroller with limited memory, stay away from newlib. The definition of 'small' is relative. Many GCC vendors provide their own libraries (Rowley and Code Red to name two), and FreeRTOS ships with a third party printf/sprintf implementation that is ultra small and reentrant, but does not provide floating point support.

RE: C Standard Libraries for Real-Time?

Posted by Tenacious Techhunter on August 12, 2011
Well yes, but I need reentrancy and thread-safe for my own needs... While I could block off code that is reentrant, I'd prefer to have to do that as little as possible. I didn't even consider what FreeRTOS needed until I heard there was trouble with the reentrant version of newlib. A useful post, but doesn't quite answer my questions.

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists