-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (33 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#-------------------------------------------------------------------------------
# Example Makefile to assembly, link and debug ARM source code
# Author: Santiago Romani
# Date: February 2016
# Licence: Public Domain
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# options for code generation
#-------------------------------------------------------------------------------
ASFLAGS := -march=armv5te -mlittle-endian -g
LDFLAGS := -z max-page-size=0x8000
#-------------------------------------------------------------------------------
# make commands
#-------------------------------------------------------------------------------
practicaFC.elf : startup.o barcos_j.o barcos_p.o
arm-none-eabi-ld $(LDFLAGS) startup.o barcos_j.o barcos_p.o libBarcos.a -o practicaFC.elf
barcos_j.o : barcos_j.s
arm-none-eabi-as $(ASFLAGS) barcos_j.s -o barcos_j.o
barcos_p.o : barcos_p.s
arm-none-eabi-as $(ASFLAGS) barcos_p.s -o barcos_p.o
startup.o : startup.s
arm-none-eabi-as $(ASFLAGS) startup.s -o startup.o
#-------------------------------------------------------------------------------
# clean commands
#-------------------------------------------------------------------------------
clean :
@rm -fv *.o
@rm -fv *.elf
#-------------------------------------------------------------------------------
# debug commands
#-------------------------------------------------------------------------------
debug : PracticaFC.elf
arm-eabi-insight practicaFC.elf &