As mentioned in the docs the linker places the data area
as low as possible (which is a good thing) and the stack
right on top of it (which is also ok if there is no idata).
The idata area is placed at 0x80 by default. Now if you
do use idata I think it would be better to locate idata on
top of data and to locate the stack on top of idata.
Right now I have to play for linker myself and adjust --
idata-loc and --stack-loc by hand every time something
changes in the memory layout. Could this please be
And now a more daunting task: If one also uses bdata,
the data area moves up and ignores the memory of
unused register banks. Would it be possible to have the
linker also use the space of unused register banks? I
understand this complicates things, but a simple greedy
algorithm (find the first area where a variable fits) will do
I think. There usually are enough variables of only one
byte to fill the register bank area to the max.
Trying to help improve SDCC,
Log in to post a comment.