Quality RTOS & Embedded Software

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



Posted by chaabanemalki on April 23, 2014

Hello, I set up a project based using Mplab X ide 2.00 and XC32 1.31 and i added FreeRTOS kernel, For now FreeRTOs manages the heap with heap_4.c.

I noticed when I check "enable App IO" from Project Properties>x32-gcc, and add this line in the beginning of main(), after DBINIT()

char valueTest[]="this is a testn";

When I start debugging, the value of valueTest doesn't change, yet when i print it with DBRINTF() I get "this is a t" in the PIC AppIO window.

If I uncheck "enable App IO" I can see the value of valueTest changing in the watches window

I know that DBPRINTF uses the heap space, and FreeRTOs reserve around 28k but i'm not sure if this space is shared with DBPRINTF().

I also found that I can use functions in printf-stdarg.c rather than standard C libraries. Is it possible to replace BDPRINTF with PRINTF from printf-stdarg.c

Any ideas how to fix this problem ?

Thank you

any ideas how to fix this problem ???


Posted by rtel on April 23, 2014

Does DBPRINTF work as expected if you call it from a standard C program, without FreeRTOS. You can test this easily by calling it from your FreeRTOS project, but from main(), before the scheduler has been started.

If DBPRINTF uses the heap then you will need to ensure you have one defined. The heap implemented by heap_4.c is used when pvPortMalloc() is called, so will not be used by any standard C libraries such as malloc().



Posted by chaabanemalki on April 23, 2014

Thank you for the informations,

All the tests were before starting the scheduler, and I think i found the problem. It is in the watches window. and for that i should go to microchip forum.

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

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


FreeRTOS and other embedded software careers at AWS.

Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

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