Wow, okay, this has all been so informative; thank you so much for
continuing to put up with me.
>
> > Everything builds (yay!) when I use stack-auto. My code even runs. But
> > when I then try and create a large global buffer (say, to store a single
> > sector) things build just fine, but the program itself doesn't run.
>
> This large buffer is in xdata right? Otherwise it eats up your precious
> data memory.
So, I think the large buffer is in external memory because 1. _buffer
shows up in XSEG in the .map and I'm using a --large model.
> Well it can't. Maybe the calculation for this report has a bug.
>
Ohh, that's unfortunate, but makes a bit more sense.
sdcc -v gives me :
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.7.0 #4818 (Nov 6 2007) (UNIX)
is there any chance an svn build might have fixed it?
> > Hexadecimal
> >
> > Area Addr Size Decimal Bytes
> > (Attributes)
> > -------------------------------- ---- ---- ------- -----
> > XSEG 0100 022B = 555. bytes
> >
> > Value Global
> > -------- --------------------------------
> > 0D:0100 _buffer
> > 0D:0305 __gptrput_PARM_2
> > 0D:0306 __mulint_PARM_2
> > 0D:0308 _memcmp_PARM_2
> > 0D:030B _memcmp_PARM_3
> > 0D:0310 __divulong_PARM_2
> > 0D:031C _memset_PARM_2
> > 0D:031D _memset_PARM_3
> > 0D:031F _memcpy_PARM_2
> > 0D:0322 _memcpy_PARM_3
> > 0D:0327 __mullong_PARM_2
>
> This is for --model-large right? Without --stack-auto right?
> Btw. Make sure that you use the same options for compiling and linking.
So, this is with :
(compile)
sdcc -mmcs51 --model-large --xram-loc 0x100 --stack-auto -c main.c
(linking)
sdcc -o mmc.ihx --model-large --xram-loc 0x100 main.rel mmc.rel
diskiommc.rel diskio.rel tff.rel
I.e. there's no --stack-auto in the linking; when I put it there I get:
sdcc -o mmc.ihx --model-large --xram-loc 0x100 --stack-auto main.rel
mmc.rel diskiommc.rel diskio.rel tff.rel
?ASlink-Warning-Couldn't find library 'mcs51'
?ASlink-Warning-Couldn't find library 'libsdcc'
?ASlink-Warning-Couldn't find library 'libint'
?ASlink-Warning-Couldn't find library 'liblong'
?ASlink-Warning-Couldn't find library 'libfloat'
?ASlink-Warning-Undefined Global '__mcs51_genRAMCLEAR' referenced by
module 'main'
...
Is stack-auto something that the default libraries need to have been
compiled with ?
Thanks again,
...Eric
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user