I ran across this post while trying to find a solution to
the same problem.  I thought I would add my 2-cents worth
for the archives.  The original post was 2 months ago.

Maarten is correct.  Here are the details.
Change the following line in the Makefile in device/lib from:

TARGETS        += models small-mcs51-stack-auto

to:

TARGETS        += models model-mcs51-stack-auto

before running make (after configure).  This will build 
all of the regular standard libraries as well as the 
reentrant (stack-auto) versions. A "make install" will create
small, medium and large library directories as well 
as small-stack-auto, medium-stack-auto, and large-stack-auto
directories under lib/.

As Maarten notes, using stack-auto is not recommended due
to the small stack on the 8051.  This option is necessary
for building FreeRTOS though.  (The FreeRTOS port to the
8051 works around the small stack limitation by 
copying the stack to external memory on a task switch.)

Tony Richardson

Maarten Brock <[EMAIL PROTECTED]> writes:
> Hi Ankur (and others),
>
> To use both --model-large and --stack-auto (which I do not recommend)
you
> must use them while compiling your project of course. But you must
also
> recompile the libraries with these options. On *nix I would adapt the
> Makefile in /device/lib/ to create them.
>
> HTH,
> Maarten
>
>> Quoting Ankur Maheshwari <[EMAIL PROTECTED]>:
>>
>>> Hi all,
>>>
>>> I want to compile sdcc with --model-large and --stack-auto. How do I
do
>>> this.
>>> I tried ./configure CFLAGS=--stack-auto, but it fails configure to
run.
>>> What is the correct method to this please suggest.
>>>
>>> thanks,
>>> Ankur
>>
>>
>>
>> The --model-large and --stack-auto flags are not for building the
>> compiler itself, you are supposed to use them when you compile the
>> code for the microcontroller, like;
>>
>> sdcc ${CFLAGS} --model-large --stack-auto file.c
>>
>>
>> regards,
>>
>> Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to