diff options
| author | Paul Sokolovsky | 2016-10-25 00:37:33 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2016-10-25 00:43:11 +0300 |
| commit | 2550d7dfd2e9032474a33d8208868f42680c5863 (patch) | |
| tree | 611f9fc1eb580428baed759ea3c548846d4d4b42 /esp8266/Makefile | |
| parent | b78144c64d71e8b850a0fd7051bcaa9ee0cce8dd (diff) | |
esp8266: Add support for building firmware version for 512K modules.
To build, "make 512k".
Disabled are FatFs support (no space for filesystem), Python functionality
related to files, btree module, and recently enabled features. With all
this, there's only one free FlashROM page.
Diffstat (limited to 'esp8266/Makefile')
| -rw-r--r-- | esp8266/Makefile | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/esp8266/Makefile b/esp8266/Makefile index 96f7f0f5c..245f95b40 100644 --- a/esp8266/Makefile +++ b/esp8266/Makefile @@ -5,6 +5,7 @@ QSTR_DEFS = qstrdefsport.h #$(BUILD)/pins_qstr.h MICROPY_PY_USSL = 1 MICROPY_SSL_AXTLS = 1 +MICROPY_FATFS = 1 MICROPY_PY_BTREE = 1 FROZEN_DIR = scripts @@ -45,7 +46,8 @@ CFLAGS_XTENSA = -fsingle-precision-constant -Wdouble-promotion \ CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \ $(CFLAGS_XTENSA) $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) -LDFLAGS = -nostdlib -T esp8266.ld -Map=$(@:.elf=.map) --cref +LDSCRIPT = esp8266.ld +LDFLAGS = -nostdlib -T $(LDSCRIPT) -Map=$(@:.elf=.map) --cref LIBS = -L$(ESP_SDK)/lib -lmain -ljson -llwip_open -lpp -lnet80211 -lwpa -lphy -lnet80211 $(LDFLAGS_MOD) LIBGCC_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) @@ -131,10 +133,14 @@ LIB_SRC_C = $(addprefix lib/,\ utils/pyexec.c \ utils/pyhelp.c \ utils/interrupt_char.c \ - fatfs/ff.c \ - fatfs/option/ccsbcs.c \ ) +ifeq ($(MICROPY_FATFS), 1) +LIB_SRC_C += \ + lib/fatfs/ff.c \ + lib/fatfs/option/ccsbcs.c +endif + DRIVERS_SRC_C = $(addprefix drivers/,\ dht/dht.c \ ) @@ -153,7 +159,9 @@ OBJ += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(EXTMOD_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o)) +ifneq ($(FROZEN_MPY_DIR),) OBJ += $(BUILD)/$(BUILD)/frozen_mpy.o +endif #OBJ += $(BUILD)/pins_$(BOARD).o # List of sources for qstr extraction @@ -206,6 +214,9 @@ $(BUILD)/firmware.elf: $(OBJ) $(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(Q)$(SIZE) $@ +512k: + $(MAKE) LDSCRIPT=esp8266_512k.ld CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_512k.h>"' MICROPY_FATFS=0 MICROPY_PY_BTREE=0 + #MAKE_PINS = boards/make-pins.py #BOARD_PINS = boards/$(BOARD)/pins.csv #AF_FILE = boards/stm32f4xx_af.csv |
