Hi everybody,
I'm working with SDCC to compile code for 8051. My System: KUbuntu-10.04.
I'm trying to use the --xstack option to compile code. Therefor I had to
recompile the mcs51 libraries. Here is the way I did it:
In the following folder:
/sdcc/device/lib
I called the Makefile with the following model:
make model-mcs51-xstack-auto
In the build folder, I got the following new folders:
-large-xstack-auto
-medium-xstack-auto
-small-xstack-auto
Now If I try to compile/build my code, with the following arguments:
--model-large -c --use-stdout --xstack (compile)
--model-large --xram-size 8448 --code-size 131072 --use-stdout (build
I get the following error:
?Aslink-Warning-Undefined Global '__modsint_PARM_2' referenced by module test
So the Linker does not find all libraries. Waht I mentioned is, the model in
the Makefile looks like this:
model-mcs51-xstack-auto:
if grep '^mcs51\>' $(top_builddir)/ports.build > /dev/null; then \
for model in $(MODELS); do \
mkdir -p $${model}-xstack-auto; cp $${model}/Makefile
$${model}-xstack-auto; \
$(MAKE) MODELFLAGS="--model-$$model --xstack --stack-auto"
PORT=$${model}-xstack-auto PORTDIR=$(BUILDDIR)/$${model}-xstack-auto
PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
The libraries are compiled with the following arguments:
MODELFLAGS="--model-$$model --xstack --stack-auto"
Because I only wanted to compile the libs with the option --xstack, I changed
the MODELFLAGS to:
MODELFLAGS="--model-$$model --xstack"
Now, when I try to compile my code, I do not get any error, but when I flash
the code on my Chip, it does not work.
My output.mem looked like this:
Name Start End Size Max
---------------- -------- -------- -------- --------
PAGED EXT. RAM 0x0000 0x0cff 99 256
Thats what I axpected, but unfortunately, my code did not work
So my question:
How can I compile the libraries to use the --xstack-option. I do not want to
use the --stack-auto-option. I only want to bring all reentrant-function
(functions I marked as __reentrant) to PAGED EXT. RAM.
Regards
Oliver
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user