-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.patch
74 lines (69 loc) · 2.65 KB
/
Makefile.patch
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff --git a/Makefile b/Makefile
index 334e5ef..76066ce 100644
--- a/Makefile
+++ b/Makefile
@@ -254,17 +254,18 @@ $$(IMAGEODIR)/$(1).out: $$(OBJS) $$(DEP_OBJS_$(1)) $$(DEP_LIBS_$(1)) $$(DEPENDS_
endef
$(BINODIR)/%.bin: $(IMAGEODIR)/%.out
+ @mkdir -p $(BIN_PATH)
@mkdir -p $(BINODIR)
-
+
ifeq ($(APP), 0)
- @$(RM) -r ../bin/eagle.S ../bin/eagle.dump
- @$(OBJDUMP) -x -s $< > ../bin/eagle.dump
- @$(OBJDUMP) -S $< > ../bin/eagle.S
+ @$(RM) -r $(BIN_PATH)/eagle.S $(BIN_PATH)/eagle.dump
+ @$(OBJDUMP) -x -s $< > $(BIN_PATH)/eagle.dump
+ @$(OBJDUMP) -S $< > $(BIN_PATH)/eagle.S
else
- mkdir -p ../bin/upgrade
- @$(RM) -r ../bin/upgrade/$(BIN_NAME).S ../bin/upgrade/$(BIN_NAME).dump
- @$(OBJDUMP) -x -s $< > ../bin/upgrade/$(BIN_NAME).dump
- @$(OBJDUMP) -S $< > ../bin/upgrade/$(BIN_NAME).S
+ @mkdir -p $(BIN_PATH)/upgrade
+ @$(RM) -r $(BIN_PATH)/upgrade/$(BIN_NAME).S $(BIN_PATH)/upgrade/$(BIN_NAME).dump
+ @$(OBJDUMP) -x -s $< > $(BIN_PATH)/upgrade/$(BIN_NAME).dump
+ @$(OBJDUMP) -S $< > $(BIN_PATH)/upgrade/$(BIN_NAME).S
endif
@$(OBJCOPY) --only-section .text -O binary $< eagle.app.v6.text.bin
@@ -274,22 +275,24 @@ endif
@echo ""
@echo "!!!"
-
+
ifeq ($(app), 0)
- @python ../tools/gen_appbin.py $< 0 $(mode) $(freqdiv) $(size_map) $(app)
- @mv eagle.app.flash.bin ../bin/eagle.flash.bin
- @mv eagle.app.v6.irom0text.bin ../bin/eagle.irom0text.bin
+ echo "$< 0 $(mode) $(freqdiv) $(size_map)"
+ @python $(SDK_PATH)/tools/gen_appbin.py $< 0 $(mode) $(freqdiv) $(size_map) $(app)
+ @mv eagle.app.flash.bin $(BIN_PATH)/eagle.flash.bin
+ @mv eagle.app.v6.irom0text.bin $(BIN_PATH)/eagle.irom0text.bin
@rm eagle.app.v6.*
@echo "No boot needed."
@echo "Generate eagle.flash.bin and eagle.irom0text.bin successully in folder bin."
@echo "eagle.flash.bin-------->0x00000"
@echo "eagle.irom0text.bin---->0x10000"
else
+
ifneq ($(boot), new)
- @python ../tools/gen_appbin.py $< 1 $(mode) $(freqdiv) $(size_map) $(app)
+ @python $(SDK_PATH)/tools/gen_appbin.py $< 1 $(mode) $(freqdiv) $(size_map) $(app)
@echo "Support boot_v1.1 and +"
else
- @python ../tools/gen_appbin.py $< 2 $(mode) $(freqdiv) $(size_map) $(app)
+ @python $(SDK_PATH)/tools/gen_appbin.py $< 2 $(mode) $(freqdiv) $(size_map) $(app)
ifeq ($(size_map), 6)
@echo "Support boot_v1.4 and +"
@@ -302,9 +305,9 @@ else
endif
endif
- @mv eagle.app.flash.bin ../bin/upgrade/$(BIN_NAME).bin
+ @mv eagle.app.flash.bin $(BIN_PATH)/upgrade/$(BIN_NAME).bin
@rm eagle.app.v6.*
- @echo "Generate $(BIN_NAME).bin successully in folder bin/upgrade."
+ @echo "Generate $(BIN_NAME).bin successully in BIN_PATH"
@echo "boot.bin------------>0x00000"
@echo "$(BIN_NAME).bin--->$(addr)"
endif