File tree Expand file tree Collapse file tree 7 files changed +43
-8
lines changed Expand file tree Collapse file tree 7 files changed +43
-8
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m0 -mthumb
23
23
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs
37
38
all: $(PROJECT).bin $(PROJECT).hex size
38
39
39
40
clean:
40
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
41
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
41
42
42
43
.s.o:
43
44
$(AS) $(CPU) -o $@ $<
@@ -65,3 +66,7 @@ lst: $(PROJECT).lst
65
66
66
67
size:
67
68
$(SIZE) $(PROJECT).elf
69
+
70
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
71
+ -include $(DEPS)
72
+
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m3 -mthumb
23
23
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs
36
37
all: $(PROJECT).bin $(PROJECT).hex size
37
38
38
39
clean:
39
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
40
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
40
41
41
42
.s.o:
42
43
$(AS) $(CPU) -o $@ $<
@@ -64,3 +65,7 @@ lst: $(PROJECT).lst
64
65
65
66
size:
66
67
$(SIZE) $(PROJECT).elf
68
+
69
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
70
+ -include $(DEPS)
71
+
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
20
20
SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
23
- CC_FLAGS = $(CPU) -c -g3 -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
23
+ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float
36
37
all: $(PROJECT).bin $(PROJECT).hex size
37
38
38
39
clean:
39
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
40
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
40
41
41
42
.s.o:
42
43
$(AS) $(CPU) -o $@ $<
@@ -64,3 +65,7 @@ lst: $(PROJECT).lst
64
65
65
66
size:
66
67
$(SIZE) $(PROJECT).elf
68
+
69
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
70
+ -include $(DEPS)
71
+
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m0 -mthumb
23
23
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs
36
37
all: $(PROJECT).bin $(PROJECT).hex size
37
38
38
39
clean:
39
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
40
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
40
41
41
42
.s.o:
42
43
$(AS) $(CPU) -o $@ $<
@@ -69,3 +70,7 @@ lst: $(PROJECT).lst
69
70
70
71
size:
71
72
$(SIZE) $(PROJECT).elf
73
+
74
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
75
+ -include $(DEPS)
76
+
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m0 -mthumb
23
23
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs
36
37
all: $(PROJECT).bin $(PROJECT).hex size
37
38
38
39
clean:
39
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
40
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
40
41
41
42
.s.o:
42
43
$(AS) $(CPU) -o $@ $<
@@ -69,3 +70,7 @@ lst: $(PROJECT).lst
69
70
70
71
size:
71
72
$(SIZE) $(PROJECT).elf
73
+
74
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
75
+ -include $(DEPS)
76
+
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ SIZE = $(GCC_BIN)arm-none-eabi-size
21
21
22
22
CPU = -mcpu=cortex-m0 -mthumb
23
23
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
24
+ CC_FLAGS += -MMD -MP
24
25
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
25
26
26
27
LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs
36
37
all: $(PROJECT).bin $(PROJECT).hex size
37
38
38
39
clean:
39
- rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS)
40
+ rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
40
41
41
42
.s.o:
42
43
$(AS) $(CPU) -o $@ $<
@@ -69,3 +70,7 @@ lst: $(PROJECT).lst
69
70
70
71
size:
71
72
$(SIZE) $(PROJECT).elf
73
+
74
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
75
+ -include $(DEPS)
76
+
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
19
19
20
20
CPU = -mcpu=cortex-m3 -mthumb
21
21
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
22
+ CC_FLAGS += -MMD -MP
22
23
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
23
24
24
25
LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float
33
34
all: $(PROJECT).bin
34
35
35
36
clean:
36
- rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS)
37
+ rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS) $(DEPS)
37
38
38
39
.s.o:
39
40
$(AS) $(CPU) -o $@ $<
@@ -50,3 +51,7 @@ $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
50
51
51
52
$(PROJECT).bin: $(PROJECT).elf
52
53
$(OBJCOPY) -O binary $< $@
54
+
55
+ DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
56
+ -include $(DEPS)
57
+
You can’t perform that action at this time.
0 commit comments