@@ -3,37 +3,11 @@ ARCH ?= esp32c3
33MDK ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST ) ) ) /..)
44ESPUTIL ?= $(MDK ) /esputil/esputil
55include $(MDK ) /$(ARCH ) /esp.mk
6- INCLUDES = $(ESP_INCLUDES )
7- LIB_CFLAGS ?= -W -Wno-sign-compare -Wno-old-style-declaration \
8- -I$(MDK ) \
9- -I/root/.espressif/components/esp_bootloader_format/include \
10- -I/root/.espressif/components/esp_common/include \
11- -I/root/.espressif/components/esp_system/include \
12- -I/root/.espressif/components/esp_rom/$(ARCH ) \
13- -I/root/.espressif/components/esp_rom/include \
14- -I/root/.espressif/components/esp_rom/include/$(ARCH ) \
15- -I/root/.espressif/components/soc/$(ARCH ) /include \
16- -I/root/.espressif/components/soc/include \
17- -I/root/.espressif/components/esp_coex/include \
18- -I/root/.espressif/components/log/include \
19- -I/root/.espressif/components/newlib/platform_include \
20- -I/root/.espressif/components/heap/include \
21- -I/root/.espressif/components/hal/include \
22- -I/root/.espressif/components/hal/$(ARCH ) /include \
23- -I/root/.espressif/components/hal/platform_port/include \
24- -I/root/.espressif/components/riscv/include \
25- -I/root/.espressif/components/spi_flash/include \
26- -I/root/.espressif/components/esp_hw_support/include \
27- -I/root/.espressif/components/esp_hw_support/port/$(ARCH ) /include \
28- -I/root/.espressif/components/esp_hw_support/include/soc \
29- -I/root/.espressif/components/esp_hw_support/include/soc/$(ARCH ) \
30- -I/root/.espressif/components/freertos/config/include \
31- -I/root/.espressif/components/freertos/FreeRTOS-Kernel/include \
32- -I/root/.espressif/components/freertos/config/include/freertos\
33- -I/root/.espressif/components/freertos/config/riscv/include \
34- -I/root/.espressif/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos \
35- -I/root/.espressif/components/freertos/FreeRTOS-Kernel/portable/riscv/include \
36- -I/root/.espressif/riscv32-esp-elf/riscv32-esp-elf/include
6+ FFY_INCLUDES = -I$(MDK ) /components/crypto \
7+ -I$(MDK ) /components/firefly-display/src \
8+ -I$(MDK ) /components/firefly-display/include \
9+ -I$(MDK ) /components/firefly-scene/include \
10+ -I$(MDK ) /components/firefly-scene
3711CFLAGS ?= -W -Wno-sign-compare -fno-common \
3812 -march=rv32imczicsr -mabi=ilp32 -Os \
3913 -ffunction-sections -fdata-sections \
@@ -83,7 +57,7 @@ SRCS ?= /root/.espressif/components/bootloader/subproject/main/bootloader
8357build : $(PROG ) .elf
8458
8559$(PROG ) .elf : $(SRCS )
86- gcc $(CFLAGS ) $(EXTRA_CFLAGS ) $(INCLUDES ) $(SRCS ) $(LINKFLAGS ) -o $@
60+ gcc $(CFLAGS ) $(EXTRA_CFLAGS ) $(ESP_INCLUDES ) $( FFY_INCLUDES ) $(SRCS ) $(LINKFLAGS ) -o $@
8761# $(TOOLCHAIN)-size $@
8862
8963$(PROG ) .bin : $(PROG ) .elf $(ESPUTIL )
@@ -92,7 +66,7 @@ $(PROG).bin: $(PROG).elf $(ESPUTIL)
9266build-lib : $(LIB )
9367
9468$(LIB ) : $(LIB_SRCS )
95- gcc -Wno-old-style-declaration $(CFLAGS ) $(INCLUDES ) $(EXTRA_CFLAGS ) -c $(LIB_SRCS )
69+ gcc -Wno-old-style-declaration $(CFLAGS ) $(ESP_INCLUDES ) $(EXTRA_CFLAGS ) -c $(LIB_SRCS )
9670 riscv32-esp-elf-ar rcs $@ * .o
9771
9872flash : $(PROG ) .bin $(ESPUTIL )
0 commit comments