FreeCalypso > hg > freecalypso-sw
annotate target-utils/helloapp/Makefile @ 96:57b8dbb029c2
fc-loadtool: GTA0x flash support
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 01 Sep 2013 04:18:32 +0000 |
parents | f0501c4a8790 |
children | e7ba9fcb3637 |
rev | line source |
---|---|
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 CC= arm-elf-gcc |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 CFLAGS= -Os -fno-builtin |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
3 CPPFLAGS=-I../include |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 LD= arm-elf-ld |
6
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
5 OBJCOPY=arm-elf-objcopy |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
7 PROG= helloapp |
14
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
8 OBJS= crt0.o cmdtab.o main.o mygetchar.o |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
9 LIBS= ../libcommon/libcommon.a ../libprintf/libprintf.a |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
10 LDS= ../env/iram.lds |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 TC_LIBS=`${CC} -print-file-name=libc.a` \ |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 `${CC} -print-file-name=libgcc.a` |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
15 all: ${PROG}.srec |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
17 crt0.S: ../env/crt0.S |
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
18 ln -s $< . |
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
19 |
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
20 ${PROG}.elf: ${OBJS} ${LIBS} ${LDS} |
14
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
21 ${LD} -N --defsym stack_bottom=0x83FFFC -T ${LDS} -o $@ ${OBJS} \ |
f0501c4a8790
helloapp (proto-loadagent) compiles with r8/r16/r32 implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
11
diff
changeset
|
22 --start-group ${LIBS} --end-group \ |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 --start-group ${TC_LIBS} --end-group |
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
25 ${PROG}.srec: ${PROG}.elf |
6
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
26 ${OBJCOPY} -O srec --srec-forceS3 --srec-len=30 $< $@ |
5eaafa83be60
loadagent: generate binary and srec images
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
5
diff
changeset
|
27 |
2
ddda170fa6f4
loadagent.elf compiled and linked, no printf yet
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 clean: |
11
40f607bb0a2c
target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
6
diff
changeset
|
29 rm -f *.o *errs *core *.elf *.bin *.srec crt0.S |
5
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
30 |
4a7a325ed1b6
loadagent: printf hooked in
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
2
diff
changeset
|
31 FRC: |