On February 29, 2008 02:22:40 am Ankur Maheshwari wrote:
> Hi all,
>
> I want to compile sdcc with --model-large and --stack-auto. How do I do
> this.
It seems that these flags apply to the target processor, not SDCC itself.
> I tried ./configure CFLAGS=--stack-auto, but it fails configure to run.
> What is the correct method to this please suggest.
If you're trying to compile SDCC, "./configure --help" will give you help on
configuration options. This will apply to SDCC for your development platform
only; not the target processor for which SDCC compiles programs for.
If you want to compile a program for a target microprocessor, you'll have to
make your own Makefile. "./configure" won't apply, here.
Here's an example (attachment) for a particular Z80 target.
Your specific flags (--model-large --stack-auto) should go in the MFLAGS
variable.
Good luck!
JP
>
> thanks,
> Ankur
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
#
MAPTOHEADER = map2header.awk
CC = sdcc -mz80
AS = as-z80
ASFLAGS = -plogsff
CFLAGS =
LFLAGS = --code-loc 0x2000 --data-loc 0x8000 --no-std-crt0
MFLAGS = --model-small --stack-loc 0x7d00
OBJECTS = main.o serial.o lcd.o rout_min.o
HEADERS = bios.h serial.h lcd.h rout_min.h
all: main.ihx
sim:
sz80 main.ihx
_dummy:
clean:
rm -f core *~ \#* *.asm *.cdb *.o *.hex *.ihx *.lst *.map \
*.rst *.sym *.lnk *.lib *.bin
load:
cp main.ihx /dev/ttyS0
bios.h: mini.MAP
gawk -f $(MAPTOHEADER) $< > $@
main.ihx: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
%.rel: %.c $(HEADERS)
$(CC) $(CFLAGS) $(MFLAGS) -c $<
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $<
%.o: %.s
$(AS) $(ASFLAGS) $@ $<
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user