Hi,
I use MC9S08LL16 with this version of Codewarrior:
ColdFireV1 build 080723
HCS08LL16 Service Pack 080813
HCS08SE8 Service Pack 080829
Release 8127
PE V.3.04 Service Pack 081024
I have declared in funcs.h this function:
unsigned char GestioneMani(unsigned char ,unsigned char );
In funcs.c I have write my function:
unsigned char GestioneMani(unsigned char TempPassata,unsigned char UmidPassata)
{
if( (TempPassata<26) && (UmidPassata<80))
return VERDE;
.......
}
Problem:
the arguments receiving are differents???!!!
This is a call:
and this is inside the function:
Why?
thanks
Solved! Go to Solution.
OK, thanks!
Sorry for stupid question but where I can see my stack size?
I have seen the setting size in PRN file:
STACKSIZE 0x50
I have seen in MAP file where the compiler insert my stack:
.stack 80 R/W 0x167 0x1B6 RAM
Now I can see in debug mode how much stack I use?
Thanks again
Hello,
During debug, after you have entered the function and the function parameters are on the stack, ascertain the current address of the stack pointer. If this is less than the lowest allocated address for the stack (0x0167 from the map file), it is possible that you have overwritten some of the global or static variables.
Even if the pointer is slightly above the lowest address, this could still be problematic should an interrupt occur whilst within the function.
If the variable Temperatura is global, it may even be possible that this becomes overwritten by the stack during execution of a completely different part of the program.
Does your program use any float variables? If so, this will greatly increase the stack size requirement.
Regards,
Mac
- Is this a debug information issue (say the debugger shows the wrong values, but the code otherwise behaves properly)?
- Implicit parameter declaration, are there any compiler warnings (possibly disabled...)?
- Could also be a stack overflow, try to increase the STACKSIZE in the prm.
Daniel
OK,
this is the call:
http://digilander.libero.it/ciccio.unico/image/1.jpg
and this is inside the function:
Sorry, but your inserted pictures seem to be only 2x1 pixel in size, and don't contain any readable information to me. Can you cut an paste the real pictures after verifying they are correct?
BR,
Johan