|
From: <M.v...@ca...> - 2001-09-17 07:50:12
|
The problem with your -L... line is that it's wrong. The correct path is
c:\sdcc\lib\large (for large model) and c:\sdcc\lib\small for small model.
I put it all in my makefile, which is as follows (requires gnu make, which
you can get off the net, precompiled for Win32 - I put it in the c:\sdcc\bin
directory):
======8><== BEGIN MAKEFILE ========================
# Makefile for ADuC812 project
#
# v 1.0 - initial version - 2001-09-11 MvdW
#
MODEL= large
ifeq ($(MODEL), large)
STACK= --stack-after-data
else
STACK= --stack-after-data
endif
CFLAGS= -I c:/apps/sdcc/include -L c:/apps/sdcc/lib/$(MODEL) \
--verbose --nooverlay --model-$(MODEL) $(STACK)
CFILES= main.c serial.c
RELFILES= main.rel serial.rel
CC= sdcc
all: main.hex
main.hex: main.ihx
packihx main.ihx > main.hex
cat main.map | grep 'bytes'
main.ihx: $(RELFILES)
$(CC) --version
$(CC) $(CFLAGS) $(RELFILES)
%.rel: %.c %.h ADuC812.h
$(CC) --version
$(CC) $(CFLAGS) -c $<
force: clean all
clean:
rm -f $(RELFILES) main.ihx main.hex
====== 8>< ======== END MAKEFILE ============================
This isn't the simplest makefile there is, and there are some redundant
parts (from when I was trying various things), but it works for me.
You might want to get some help on makefiles (http://www.gnu.org is a good
place to start) if you want to learn more about them. It beats a batch file
hands down.
Cheers,
Matthew van de Werken
Electronics Engineer
CSIRO Exploration & Mining - Gravity Group
1 Technology Court - Pullenvale - Qld - 4069
ph: (07) 3327 4685 fax: (07) 3327 4455
email: m.v...@ca...
> -----Original Message-----
> From: M. Fahmy F. [mailto:m_f...@ho...]
> Sent: Monday, 17 September 2001 5:06 PM
> To: sdc...@li...
> Subject: [Sdcc-user] compiler warnings
>
>
> Hi all,
> These warning msgs appeared while I was trying to compile my
> code using
> latest SDCC 222 Borland... using this options: ( already put
> c:\sdcc\bin in
> my path ! )
> sdcc -I c:\sdcc\include -L c:\sdcc\lib --model-small atwriter.c
> I am not using Cygwin...
>
> =======
> ?ASlink-Warning-Undefined Global '__sdcc_external_startup'
> referenced by
> module 'atwriter'
>
> ?ASlink-Warning-Undefined Global '__gptrget' referenced by
> module 'atwriter'
> =======
>
> I wanted to get rid of them... help please :(
>
> rgds,
> fhy
>
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdc...@li...
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
|