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



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