comparison nuc-fw/finlink/Makefile @ 80:39b1c369b67f

nuc-fw: links to an ELF image
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 16 Aug 2013 02:25:58 +0000
parents
children 147861b15cda
comparison
equal deleted inserted replaced
79:947b1f473960 80:39b1c369b67f
1 CC= arm-elf-gcc
2 LD= arm-elf-ld
3 OBJCOPY=arm-elf-objcopy
4
5 RAM_TARGET= ramImage.elf
6
7 LIBC_A= `${CC} -print-file-name=libc.a -mthumb-interwork`
8 LIBC_T= `${CC} -print-file-name=libc.a -mthumb-interwork -mthumb`
9 LIBGCC_A= `${CC} -print-file-name=libgcc.a -mthumb-interwork`
10 LIBGCC_T= `${CC} -print-file-name=libgcc.a -mthumb-interwork -mthumb`
11
12 LOCAL_LIBS= ../nucleus/libplus.iram.a ../nucleus/libplus.xip.a \
13 ../sprintf/libsprintf.a
14
15 INT_PIECES= ../sysglue/sysinit.o
16 EXT_PIECES= ../nucdemo/demo.o
17
18 all: ${RAM_TARGET}
19 ramImage: ${RAM_TARGET}
20
21 iramcode.o: ${INT_PIECES}
22 ${LD} -r -o $@ ${INT_PIECES}
23
24 xipcode.o: ${EXT_PIECES}
25 ${LD} -r -o $@ ${EXT_PIECES}
26
27 ramImage.elf: iramcode.o xipcode.o ${LOCAL_LIBS} xram.lds
28 ${LD} -N -T xram.lds -o $@ -Map ramImage.map iramcode.o xipcode.o \
29 --start-group ${LOCAL_LIBS} --end-group \
30 --start-group ${LIBC_A} ${LIBGCC_A} --end-group
31
32 clean:
33 rm -f *.o *errs *core *.elf *.bin *.srec
34
35 FRC: