2004-05-13 01:38 PM
2004-05-11 04:24 PM
Hi there good people!
It seems that a cosmic c function can only have 256 bytes of (locals)ram allocated to it. Is there any way around this? Say i want to have an -int array[127], char i,j,k,blahblahblah; in the one function cosmic is giving me errors ''value too large'' until the total is <= 256. Im using the long stack. thanks for your time chris2004-05-11 10:15 PM
Remember the ST7 is only an 8bit micro with a small stack, max 256bytes on some devices.
Cosmic will allocate all locals on the stack, as most c compilers - but this is not an infinite resource. As a possible you could have a look a using a software stack, possibly modmm, this might give you more memory to use. Regards sjo[ This message was edited by: sjo on 12-05-2004 10:49 ]2004-05-13 01:38 PM
thanks sjo,
i found out that it was because they were local variables - duhh. I had tried to make them global and that didnt work, which made me think something was wierd but i found that problem was in my linker file -not declaring proper segments. thanks again chris