I've been struggling with the 8051 memory models and using SDCC on a
Silicon Labs c8051f340-series chip for a few days now, and I was hoping
someone could help. Extensive googling has been less than helpful.
As I understand it the 8051 has two memory spaces -- a program space
and a data space. In the data space, for a chip like the si c8051f34x,
the data memory space's lower 256 bytes are registers, sfrs, etc.
Everything up to 0x800 is then on-chip xdata memory, that can be
accessed via movx.
The large memory model is supposed to locate all variables in this xdata
space, right? So by linking with:
sdcc -o mmc.ihx --model-large --xram-loc 0x100 main.rel mmc.rel
diskiommc.rel diskio.rel tff.rel
All static variables, in-function variables, etc. should be accessed
with movx instructions via dptr?
When I try building my project, it bombs out with
?ASlink-Error-Could not get 137 consecutive bytes in internal RAM for
area DSEG.
make: *** [mmc.ihx] Error 1
I'm not clear why SDCC still wants internal memory in the large model!
Is this a bug -- or more likely, an error in my understanding of SDCC?
(I've stuck my makefile and code at web.mit.edu/jonas/Public/8051.zip if
anyone wants to reproduce the result for themselves)
Thanks!
...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