i've recently discovered sdcc's (highly unusual :-) trick of
letting two variables overlap, without much in the way of
user warning.
i have variables in xdata on an 8051 that need to be "locked
down" with something like:
unsigned char at GLOBAL_V_LOCATION+0x86 FooBar;
it turns out that sdcc will happily reuse that location for its
own purposes, as documented (thanks to frieder for pointing this
out): "Thus it is left to the programmer to make sure there are
no overlaps with other variables that are declared without the
absolute address." (took me quite a while to find this -- i
consider this a bug in the linker. at the least, the docs
should have a more prominent "WARNING" at that point.)
the obvious workaround is to tell the linker that xdata lives in
a region not used by my "locked down" variables. however, i
really need to tell it about two separate sections -- the space
in between needs to be locked down for "legacy" reasons. (i can
probably change this, but i'd much rather not.)
so i'd like to do something like:
$(LD) --xram-loc-1 0xf400 --xram-size-1 256 --xram-loc-2 0xf800 \
--xram-size-2 256
is the sdcc linker capable of this?
paul
=---------------------
paul fox, [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user