Quality RTOS & Embedded Software

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




Loading

ARM7 local varaibles (stzack?problem

Posted by Nobody/Anonymous on May 18, 2006
Hi,
in my project I created a state machine where states are functions.
When signal arrives I call the actuall state by its function pointer.
This wor

RE: ARM7 local varaibles (stzack?problem

Posted by Nobody/Anonymous on May 18, 2006
Ooops I didn't want to hit the button!!???
...works fine so far.
The state machine runs in its own task, I use heap1, a global array.
Using a local variable in these (state functions)
didn't work.
My debugger says that when assigning a value to one of this variables the value is assigned not to the intended one but to one after that.
So the pointer is one variable (4 bytes?) to far.
Is this an alignement problem of heap1?
Or is there a trick calling a function by pointer I don't know yet?
Hope I decribed the problem understandable.
Regards,
Joerg

RE: ARM7 local varaibles (stzack?problem

Posted by Nobody/Anonymous on May 18, 2006
Which compiler are you using? If it is using stack pointer relative addressing then maybe there is an error with the stack pointer?

Are you sure your state functions are reentrant?

RE: ARM7 local varaibles (stzack?problem

Posted by Nobody/Anonymous on May 18, 2006
Hi,
my use of a local variable made no sense,
as the state function gets called on every signal
and so the variable is undefined the next call.
Did you mean this with reentrant?
I was confused by the debugger, changing the value
of the next variable, but maybe he was just confused by me ;-)
There is a problem but I have to track it down some more before posting here again.
Thanks,


[ 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