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




Loading

flop.c fail after cache enable

Posted 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 enable

Posted 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 enable

Posted 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 enable

Posted by zhuchunxia on July 18, 2016

anyway, I am alwaysing use soft float point... there is no FPU inside


flop.c fail after cache enable

Posted 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 enable

Posted 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 enable

Posted 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.


[ 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