Hi Oliver,

I don't see much wrong in your approach. The values for --xram-size and
--code-size are a bit weird though and so is the reported End of Paged Ext
Ram. Isn't the external ram 8192 bytes and 256 bytes internal (default)?
And does your code need more than 64k code? If so, are you using banked
functions or banked constant data?

And finally, what does "did not work" mean exactly? Are you by any chance
using a SiLabs C8051F12x or other mcu that you can debug in-circuit? Can
you try to find out what/where it goes wrong?

HTH,
Maarten

> 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


------------------------------------------------------------------------------

_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to