Quality RTOS & Embedded Software

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




Loading

vPrintTaskList bug?

Posted by Hendrik Lachmann on August 20, 2007
Hello!!

I want to print all current tasks with vPrintTaskList(). Everything runs fine with one exception: The taskname of the task starting before the scheduler has started, is not shown correctly.

Following scenario:
1) created task before scheduler (task name "VS", task number 0)
2) started scheduler, IDLE task is created (task number 1)
3) created new task (task name "TWI", task number 2) with task 0
4) executed vPrintTaskList in task0
-> all task names are shown correctly except the task name "VS". Instead "VS" "2" is printed. Is this phenomenon known and does anybody know a solution?

I use an AVR ATMega32 with GCC4.2.1

Thanks,
Hendrik


RE: vPrintTaskList bug?

Posted by Richard on August 20, 2007
This is most likely a stack overflow problem - I have seen something very similar before. vPrintTaskList uses sprintf() which can use an awful lot of stack, especially when using GCC. On the AVR you are not going to have much RAM available in order to increase the stack sizes too much so I would suggest providing your own cut down version of sprintf() (or whatever other library functions it uses).

Take a look at the LM3S6965 GCC demo which uses a small snprintf() implementation to get around the same problem.

Regards.


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




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

Latest News

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


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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