Hi, > it seems that when I define larger variable something still goes > wrong.
How? What? Why? Where? Huh?!? > char largetestvar [100]; > > will cause the program to crash. Which program? What's crash supposed to mean: how do you observe that? > Changing that to: > char at 0x300 largetestvar [100]; > > Removes the crash but the array does not seem to behave correctly > (have not investigated this in detail). > > I'm using the standard linker script. > > I've tried to apply various changes to the linker script that I've > googled up but have not been able get this to work. Well, what are you trying to do? Without some (compiling and failing subset of your) source code and without compiler flags, linker flags, compiler and gputils versions I cannot help you at all. > Can someone explain how the linker should be configured to allow more > memory for variables. Why would you want this? The default linker script (should) declare all availble memory banks (256 bytes each)---there is nothing you can do to increase the available memory just by editing the linker script. You can edit the linker script, combining two or more successive banks into one in order to become able to have a large array stored there (> 256 bytes). If you do not have such an array, any regular multi-byte variable (which is assumed to be completely in one bank by the compiler) will be accessed incorrectly if it crosses 256-byte bank boundaries: There will be BANKSELs missing or just issued to the wrong bank! Editing the linker script in this way is STRONGLY DISCOURAGED! Please post more information about the problem, expected behaviour, observed behaviour, error messages/warnings from compiler and/or linker, .map file (sdcc -Wl,-m when linking or gplink -m), and source code. Regards, Raphael ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user