Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

PIC32 & FreeRTOS: sprintf alternative

Posted by *anonymous on February 25, 2009

Hello all,

I'm using FreeRTOS on a PIC32 and so far everything is going well apart from sprintf. After some searching on the Microchip forums, I came across this post (http://forum.microchip.com/tm.aspx?m=372645) which describes a similar problem to what I'm facing. In my case, when running the release build of the firmware, sprintf(%f) will always print 0.00 and not the number I input. Strangly enough, it works fine if I run the PIC in debug mode using the ICD3.

Regardless, I was wondering if there was a known fix for this, or if there are other alternatives I could use for printing a floating point number into a string while using FreeRTOS?

Thanks

--Amr


PIC32 & FreeRTOS: sprintf alternative

Posted by richardbarry on February 25, 2009

Is the library selection different between the release and debug builds?  Often a compiler will switch libraries silently to use an optimised library, and it might be that the release library does not have floating point support.

Regards.


PIC32 & FreeRTOS: sprintf alternative

Posted by *anonymous on February 26, 2009

Hi Richard,

Thanks for your reply - Both libraries have floating point support as I've used them before in projects without FreeRTOS.

Also, I've just written a simple demo using FreeRTOS and sprintf and in this case, the opposite occurs! I get 0.00 when running in Debug and it works fine in release mode! All that the demo requires is an Explorer16 board, PIC32MX360F512L PIM and an ICD3. If you want, I can email it to you.

--Amr


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


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner