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] [October 2013 Threads]
Hi,
porting FreeRTOS7.5.3 on PSOC5LP using PSOC Creator 3.0(newlib included).
where I found sprintf not working with floating point(got all NULL chars except the '.' after conversion) after FreeRTOS scheduler started (works before).
it looks like the newlib with PSOC Creator 3.0 might have the floating point funtion issue while in a multitasking env.
newlib in PSOC Creator 3.0: the floating point functions works
newlib in PSOC Creator 3.0 with FreeRTOS started: floating point functions does not work
newlib in POSC Creator 2.1 with FreeRTOS started: floating point functions works
I don't know if this is relating to reentrant of newlib (included in PSOC Creator 3.0). But I enabled the macro #define configUSENEWLIBREENTRANT == 1 in FreeRTOSConfig.h, and memory allocation in the port is using heap2.c
Anyone can advise where to start on this issue? thanks.
This can happen if the stack is not correctly aligned to an 8 byte boundary - but the FreeRTOS code should ensure that it is. I have tried with configUSENEWLIBREENTRANT set to 1 (should not make any difference to alignment) and heap2.c and find the stack is aligned as expected when the task starts.
I assume your FreeRTOS version is very new as configUSENEWLIBREENTRANT was only introduced recently. Are you using V7.5.3 - as prior versions didn't initialse the reent structures until the first context switch, maybe if you are using it prior to the first context switch you would get a problem resulting in a stack mishap?
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.