source: trunk/software/firmware/Makefile

Last change on this file was 11, checked in by bouyer, 5 years ago

Firmware for V2 boards

File size: 831 bytes
Line 
1.SUFFIXES: .o .hex
2
3CC= sdcc  --use-non-free --Werror
4ASM = gpasm
5CFLAGS= -I${.CURDIR} -I${.CURDIR}/../lib/J1939 -I${.CURDIR}/../lib/eeprom
6CFLAGS+= --fomit-frame-pointer --denable-peeps --optimize-cmp --optimize-df
7OBJECTS= main.o serial.o serial2.o
8HEADERS= my_serial.h my_serial2.h
9
10all: capteur.bin
11
12obj:
13        mkdir obj
14
15capteur.bin: capteur.hex
16        /local/armandeche1/bin/hex2bin1k ${.ALLSRC} ${.TARGET}
17        @ls -lh ${.TARGET}
18
19capteur.hex: ${OBJECTS}
20        ${CC} -V -Wl,-s${.CURDIR}/pic18f27j13.lkr --no-crt --ivt-loc=0x400 --obanksel=2 -mpic16 -p18f27j13 -Wl,libc18f.lib ${.ALLSRC} -o ${.TARGET} -llibm18f.lib
21
22${OBJECTS}: ${HEADERS} Makefile
23
24.c.o:
25        ${CC} ${CFLAGS} -V --no-crt --ivt-loc=0x400 --obanksel=2 -mpic16 -p18f27j13 -c ${.IMPSRC} -o ${.TARGET}
26
27.s.o:
28        ${ASM} -c -o ${.TARGET} ${.IMPSRC}
29
30clean:
31        rm -f capteur.* *.o *.lst *.asm
Note: See TracBrowser for help on using the repository browser.