doc: add "manual/" directory in its entirety to dist
[openocd.git] / src / flash / ocl / at91sam7x / makefile
1 ##############################################################################################
2 # Start of default section
3 #
4
5 TRGT = arm-elf-
6 CC = $(TRGT)gcc
7 CP = $(TRGT)objcopy
8 AS = $(TRGT)gcc -x assembler-with-cpp
9 HEX = $(CP) -O ihex
10 BIN = $(CP) -O binary
11 OBJDUMP = $(TRGT)objdump
12
13 MCU = arm7tdmi
14
15 # List all default C defines here, like -D_DEBUG=1
16 DDEFS =
17
18 # List all default ASM defines here, like -D_DEBUG=1
19 DADEFS =
20
21 # List all default directories to look for include files here
22 DINCDIR =
23
24 # List the default directory to look for the libraries here
25 DLIBDIR =
26
27 # List all default libraries here
28 DLIBS =
29
30 #
31 # End of default section
32 ##############################################################################################
33
34 ##############################################################################################
35 # Start of user section
36 #
37
38 # Define project name here
39 PROJECT = at91sam7x_ocl
40
41 # Define linker script file here
42 LDSCRIPT= at91sam7x_ram.ld
43
44 # List all user C define here, like -D_DEBUG=1
45 UDEFS =
46
47 # Define ASM defines here
48 UADEFS =
49
50 # List C source files here
51 SRC = main.c dcc.c samflash.c
52
53 # List ASM source files here
54 ASRC = crt.s
55
56 # List all user directories here
57 UINCDIR =
58
59 # List the user directory to look for the libraries here
60 ULIBDIR =
61
62 # List all user libraries here
63 ULIBS =
64
65 # Define optimisation level here
66 OPT = -O2
67
68 #
69 # End of user defines
70 ##############################################################################################
71
72
73 INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
74 LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
75 DEFS = $(DDEFS) $(UDEFS)
76 ADEFS = $(DADEFS) $(UADEFS)
77 OBJS = $(ASRC:.s=.o) $(SRC:.c=.o)
78 LIBS = $(DLIBS) $(ULIBS)
79 MCFLAGS = -mcpu=$(MCU)
80
81 ASFLAGS = $(MCFLAGS) -g -gdwarf-2 -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
82 CPFLAGS = $(MCFLAGS) $(OPT) -gdwarf-2 -mthumb-interwork -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=$(<:.c=.lst) $(DEFS)
83 LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
84
85 # Generate dependency information
86 #CPFLAGS += -MD -MP -MF .dep/$(@F).d
87
88 #
89 # makefile rules
90 #
91
92 all: $(OBJS) $(PROJECT).elf $(PROJECT).hex $(PROJECT).bin $(PROJECT).lst
93
94 %o : %c
95 $(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
96
97 %o : %s
98 $(AS) -c $(ASFLAGS) $< -o $@
99
100 %elf: $(OBJS)
101 $(CC) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
102
103 %hex: %elf
104 $(HEX) $< $@
105
106 %bin: %elf
107 $(BIN) $< $@
108
109 %.lst: %.elf
110 $(OBJDUMP) -h -S $< > $@
111
112 clean:
113 -rm -f $(OBJS)
114 -rm -f $(PROJECT).elf
115 -rm -f $(PROJECT).map
116 -rm -f $(PROJECT).hex
117 -rm -f $(PROJECT).bin
118 -rm -f $(PROJECT).lst
119 -rm -f $(SRC:.c=.c.bak)
120 -rm -f $(SRC:.c=.lst)
121 -rm -f $(ASRC:.s=.s.bak)
122 -rm -f $(ASRC:.s=.lst)
123 -rm -fR .dep
124
125 #
126 # Include the dependency files, should be the last of the makefile
127 #
128 #-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
129
130 # *** EOF ***

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)