FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2011 Threads] 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|