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] [July 2016 Threads] flop.c fail after cache enablePosted by zhuchunxia on July 18, 2016 Hi:
when I enable data cache, flop.c fails in float data calculate. but it is correct when I disable cache.
I found vCompetingMathTask3 and vCompetingMathTask4 malloc a memory space to save result. and those result changes in malloced memory sometimes.. but vCompetingMathTask1 and vCompetingMathTask2 never fails in both cache enable or disable.. anyone can help ?
Vincent
flop.c fail after cache enablePosted by davedoors on July 18, 2016 Which port? Sometimes you must call portTASKUSESFLOATING_POINT() in a task before it uses floating point instructions.
flop.c fail after cache enablePosted by zhuchunxia on July 18, 2016 my cpu is a special cpu which is not in demo project... I don't see flop.c call portTASKUSESFLOATING_POINT() the API ? how to port the API ? is there a example ?
flop.c fail after cache enablePosted by zhuchunxia on July 18, 2016 anyway, I am alwaysing use soft float point... there is no FPU inside
flop.c fail after cache enablePosted by rtel on July 18, 2016 If you are using soft floating point, then the floating point routines
are just C function, so there should be no difference in behaviour when
you call a C function that is not using floating point instructions to
one that is using floating point instructions.
Maybe the floating point emulation functions are using a lot of stack -
do you have stack overflow checking switched on? As this is your own
port, are you absolutely sure the tack overflow checking is working? Is
your port saving and restoring all the processor's special purpose
registers correctly? Are the floating point emulation functions thread
safe?
flop.c fail after cache enablePosted by zhuchunxia on July 18, 2016 before cache off, all demo common example run smoothly and work well ... but after cache on, I only found flop.c fail so far... I enable #define configCHECKFORSTACK_OVERFLOW 1 in config file...
Are the floating point emulation functions thread safe?
what does it mean ? I only call vStartMathTasks to create 8 task to run floadting point function and check it with another task ... I also dump all tasks stack status and do not find any overflow in stack.
flop.c fail after cache enablePosted by rtel on July 18, 2016
Are the floating point emulation functions thread safe?
> what does it mean ?
If you do not have a floating point unit then the compiler will generate
a function call for each floating point operation. Are the functions
inserted by the compiler safe to call from more than one thread of
execution at a time? If they use global variables or shared buffers
then they won't be.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|