Quality RTOS & Embedded Software

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


Printf on m52259evb

Posted by Ariel on October 5, 2011

I'm new to the FreeRTOS and I've being working on using it with a m52259evb from Freescale.
Since on my company we won't use ColdWarrior, I did some modifications so I could use the Demo files from the 52233 with the 52259 under eclipse. It took me a little time to get the hang of it but now I can turn the evb LEDS on and off (I know it might not sound much but I'm getting used to the board and FreeRTOS).
However, for a short period I used MQX and when I did a printf, I could see the output on a minicom terminal connected to the board serial port. I belive the same should happen with FreeRTOS, but I can't get the printf to work (it compiles and all but nothing shows up).
I did copy the printf-stdargs.c from the 52259 demo project but still nothing.
Am I missing some sort of configuration? I'm kinda lost here.

Thanks a lot

RE: Printf on m52259evb

Posted by Erupter on October 5, 2011
I don't know the specific platform, but usually onboard hardware modules (like the UART/USART you plan to use) need be configured for operation.
In the USART case things most probably needed are:
-stop bits
-module enabled/disabled

Maybe check the mcu manual?

RE: Printf on m52259evb

Posted by Erupter on October 5, 2011
Also there *might* already be a configuration lingering from the original demo, but it might be wrong for the selected micro.

RE: Printf on m52259evb

Posted by Dave on October 6, 2011
printf-stadarg.c is provided as a very light weight (in both code and RAM) alternative to standard library printf()/sprintf() functions. If you include it in your project it will replace the printf()/sprintf() that comes with your compiler. It is likely that the printf()/sprintf() that comes with your compiler has an option to direct its output to the UART already, if you look for it. If you use printf-stdarg.c then you have to do that yourself. They way to do it is set up a UART with the baud rate and other parameters as already suggested in this thread, then in printf-stdarg.c implement a putchar() to write the char to the UART. You will also have to remove the line "#define putchar(c) c" from the top of printf-stdarg.c, else your putchar() implementation will get #defined to nothing.

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

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.


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


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