File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11IDF_PATH ?= /root/.espressif/components
22ESP_COMPONENTS = soc hal log esp_common esp_hw_support riscv \
3- esp_rom newlib esp_system
3+ esp_rom newlib esp_system heap
44
55all : build
66
7- build :
7+ build : build-lib
88 make -C main build ARCH=esp32c3
99
1010build-lib :
1111 @$(foreach item, $(ESP_COMPONENTS ) , make -C esp32c3/components/$(item ) build-lib ARCH=esp32c3 LIBDIR=$(item ) IDF_PATH=$(IDF_PATH ) ;)
12+
13+ clean :
14+ make -C main clean ARCH=esp32c3
15+ @$(foreach item, $(ESP_COMPONENTS), rm -f esp32c3/components/$(item)/*.o esp32c3/components/$(item)/*.
16+
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ESPUTIL ?= $(MDK)/esputil/esputil
55LIB_CFLAGS ?= -W \
66 -I$(MDK ) \
77 -I/root/.espressif/components/esp_common/include \
8+ -I/root/.espressif/components/esp_system/include \
89 -I/root/.espressif/components/esp_rom/$(ARCH ) \
910 -I/root/.espressif/components/esp_rom/include \
1011 -I/root/.espressif/components/esp_rom/include/$(ARCH ) \
@@ -89,7 +90,9 @@ CFLAGS ?= -W \
8990 -I$(MDK ) /components/firefly-display/include \
9091 -I$(MDK ) /components/firefly-scene/include \
9192 $(EXTRA_CFLAGS )
92- LINKFLAGS ?= -T$(MDK ) /$(ARCH ) /memory.ld -T$(MDK ) /$(ARCH ) /sections.ld -T$(MDK ) /$(ARCH ) /link.ld -nostdlib -nostartfiles -Wl,--gc-sections $(EXTRA_LINKFLAGS )
93+ LINKFLAGS ?= -T$(MDK ) /$(ARCH ) /components/esp_system/ld/memory.ld \
94+ -T$(MDK ) /$(ARCH ) /components/esp_system/ld/sections.ld \
95+ -T$(MDK ) /$(ARCH ) /link.ld -nostdlib -nostartfiles -Wl,--gc-sections $(EXTRA_LINKFLAGS )
9396CWD ?= $(realpath $(CURDIR ) )
9497FLASH_ADDR ?= 0 # 2nd stage bootloader flash offset
9598FFY_SCENE ?= $(MDK ) /components/firefly-scene
@@ -112,7 +115,7 @@ CRYPTO_SRCS ?= $(MDK)/components/crypto/bip32.c \
112115PIXIE_SRCS ?= $(CRYPTO_SRCS ) $(DISPLAY_SRCS ) $(SCENE_SRCS )
113116SRCS ?= $(MDK ) /$(ARCH ) /boot.c $(PIXIE_SRCS ) $(SOURCES )
114117
115- build : $(PROG ) .bin
118+ build : $(PROG ) .elf
116119
117120$(PROG ) .elf : $(SRCS )
118121 gcc $(CFLAGS ) $(SRCS ) $(LINKFLAGS ) -o $@
You can’t perform that action at this time.
0 commit comments