Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit 59a7643

Browse files
committed
Cleaned up Makefile
1 parent 2b0b5dc commit 59a7643

File tree

1 file changed

+46
-32
lines changed

1 file changed

+46
-32
lines changed

esp32/Makefile

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PORT ?= /dev/ttyUSB0
1818
BAUD ?= 460800
1919
FLASH_MODE ?= dio
2020
FLASH_FREQ ?= 40m
21-
FLASH_SIZE ?= 4MB
21+
FLASH_SIZE ?= 16MB
2222
CROSS_COMPILE ?= xtensa-esp32-elf-
2323

2424
# paths to ESP IDF and its components
@@ -28,6 +28,7 @@ endif
2828
ESPIDF = $(IDF_PATH)
2929
ESPCOMP = $(ESPIDF)/components
3030
ESPTOOL ?= $(ESPCOMP)/esptool_py/esptool/esptool.py
31+
BADGE = $(IDF_PATH)/..
3132

3233
# verify the ESP IDF version
3334
ESPIDF_SUPHASH := 9b955f4c9f1b32652ea165d3e4cdaad01bba170e
@@ -146,42 +147,23 @@ SRC_C = \
146147
machine_rtc.c \
147148
machine_hw_spi.c \
148149
mpthreadport.c \
149-
../../components/badge/badge_base.c \
150-
../../components/badge/badge_eink.c \
151-
../../components/badge/badge_i2c.c \
152-
../../components/badge/badge_leds.c \
153-
../../components/badge/badge_mpr121.c \
154-
../../components/badge/badge_portexp.c \
155-
../../components/badge/badge_gpiobutton.c \
156-
../../components/badge/badge_touch.c \
157-
../../components/badge/badge_input.c \
158-
../../components/badge/badge_sdcard.c \
159-
../../components/badge/badge_vibrator.c \
160-
../../components/badge/badge_power.c \
161-
../../components/badge/badge_eink_dev.c \
162-
../../components/badge/badge_eink_lut.c \
163-
../../components/badge/badge.c \
164-
../../components/graph/font.c \
165-
../../components/graph/font_16px.c \
166-
../../components/graph/font_8px.c \
167-
../../main/imgv2_menu.c \
168-
../../main/imgv2_nick.c \
169-
../../main/imgv2_sha.c \
170-
../../main/imgv2_test.c \
171-
../../main/imgv2_weather.c \
172-
../../main/madison_gurkha.c \
173-
../../main/leaseweb.c \
174150
esprtcmem.c \
175151
espdeepsleep.c \
176152
ugfx_containers.c \
177153
ugfx_widgets.c \
178154
ugfx_styles.c \
179-
../../components/ugfx/gdisp_lld_framebuffer.c \
180-
../../components/ugfx/ginput_lld_toggle.c \
181-
../../components/ugfx/gfx_mk.c \
182155
$(SRC_MOD)
183156

184-
ESP8266_SRC_C = $(addprefix esp8266/,\
157+
### TODO remove hardcoded images when loader works ;)
158+
159+
BADGE_MAIN_SRC_C = $(addprefix ../../main/,\
160+
imgv2_menu.c \
161+
imgv2_nick.c \
162+
imgv2_sha.c \
163+
imgv2_test.c \
164+
imgv2_weather.c \
165+
madison_gurkha.c \
166+
leaseweb.c \
185167
)
186168

187169
EXTMOD_SRC_C = $(addprefix extmod/,\
@@ -228,13 +210,13 @@ DRIVERS_SRC_C = $(addprefix drivers/,\
228210
OBJ_MP =
229211
OBJ_MP += $(PY_O)
230212
OBJ_MP += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
231-
OBJ_MP += $(addprefix $(BUILD)/, $(ESP8266_SRC_C:.c=.o))
232213
OBJ_MP += $(addprefix $(BUILD)/, $(EXTMOD_SRC_C:.c=.o))
233214
OBJ_MP += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))
234215
OBJ_MP += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
216+
OBJ_MP += $(addprefix $(BUILD)/, $(BADGE_MAIN_C:.c=.o))
235217

236218
# List of sources for qstr extraction
237-
SRC_QSTR += $(SRC_C) $(ESP8266_SRC_C) $(EXTMOD_SRC_C) $(LIB_SRC_C) $(DRIVERS_SRC_C)
219+
SRC_QSTR += $(SRC_C) $(EXTMOD_SRC_C) $(LIB_SRC_C) $(DRIVERS_SRC_C)
238220
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
239221
SRC_QSTR_AUTO_DEPS +=
240222

@@ -603,6 +585,38 @@ OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_NVS_FLASH_O))
603585
OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_OPENSSL_O))
604586
OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_SPI_FLASH_O))
605587
OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_WPA_SUPPLICANT_O))
588+
589+
590+
####################
591+
# Badge magic
592+
593+
$(BUILD)/components/%.o: CFLAGS += -Wno-strict-aliasing
594+
BADGE_COMPONENTS_O = $(addprefix $(BADGE)/components/,\
595+
badge/badge_base.o \
596+
badge/badge_eink.o \
597+
badge/badge_i2c.o \
598+
badge/badge_leds.o \
599+
badge/badge_mpr121.o \
600+
badge/badge_portexp.o \
601+
badge/badge_gpiobutton.o \
602+
badge/badge_touch.o \
603+
badge/badge_input.o \
604+
badge/badge_sdcard.o \
605+
badge/badge_vibrator.o \
606+
badge/badge_power.o \
607+
badge/badge_eink_dev.o \
608+
badge/badge_eink_lut.o \
609+
badge/badge.o \
610+
graph/font.o \
611+
graph/font_16px.o \
612+
graph/font_8px.o \
613+
ugfx/gdisp_lld_framebuffer.o \
614+
ugfx/ginput_lld_toggle.o \
615+
ugfx/gfx_mk.o \
616+
)
617+
618+
OBJ_ESPIDF += $(addprefix $(BUILD)/, $(BADGE_COMPONENTS_O))
619+
606620
################################################################################
607621
# Main targets
608622

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy