FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2006 Threads] probably FreeRTOS bug found!Posted by Nobody/Anonymous on December 21, 2006 i have probably found a bug in tasks.c:
instead of this line in xTaskCreate(): pxTopOfStack = pxNewTCB->pxStack + ( pxNewTCB->usStackDepth - 1 );
the following line has to be written: pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 );
am i right??
RE: probably FreeRTOS bug found!Posted by Nobody/Anonymous on December 21, 2006 No -
In prvInitialiseTCBVariables():
pxTCB->usStackDepth = usStackDepth;
Therefore:
pxTopOfStack = pxNewTCB->pxStack + ( pxNewTCB->usStackDepth - 1 ); and pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 );
are the same.
Is your pxNewTCB->usStackDepth varaible getting corrupt?
Step through the code following the assignment to see where the corruption occurs. Sounds like you might have a linker configuration error.
RE: probably FreeRTOS bug found!Posted by Nobody/Anonymous on December 21, 2006 "Sounds like you might have a linker configuration error. " what could I have done wrong at the linker settings? I use the H8S2398 CPU with 8k RAM
the sections I use are: .vects 0x00000000 .text 0x00000400 .bss 0x00FFDC00 .stack 0x00FFFBF0
is this wrong? with the original code it worked for stack sizes until 255, if I use 256 pxNewTCB->usStackDepth gets a value of 0x10000
with my modification it works. ???
RE: probably FreeRTOS bug found!Posted by Jeff Smith on December 26, 2006 I have sometimes noticed where the choice of code seems to fail to optimize for size nor speed. So why (pxNewTCB->usStackDepth - 1) instead of (usStackDepth - 1) When obviously the latter would excecute better? Shoot, is this RTOS, or is this MS?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|