Jim Mussared ef03ca8bf2 esp8266: Add board variant support.
This merges the existing GENERIC, GENERIC_1M, and GENERIC_512k boards
into variants of the new ESP8266_GENERIC board (renamed from GENERIC so
as not to clash with other ports).

Also moves the generation of the "OTA" variant (previously generated by
autobuild/build-esp8266-latest.sh) into the variant.

Following the convention established for the WEACTSTUDIO rp2 board, the
names of the variants are FLASH_1M and FLASH_512K (but rename the .ld files
to use MiB and kiB).

Updates autobuild to build esp8266 firmware the same way as other ports.
This requires renaming the output from firmware-combined.bin to just
firmware.bin.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-23 15:49:37 +10:00

51 lines
1.0 KiB
Makefile

ifeq ($(BOARD_VARIANT),)
LD_FILES = boards/esp8266_2MiB.ld
MICROPY_ESPNOW ?= 1
MICROPY_PY_BTREE ?= 1
MICROPY_VFS_FAT ?= 1
MICROPY_VFS_LFS2 ?= 1
# Add asyncio and extra micropython-lib packages (in addition to the port manifest).
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest_2MiB.py
# Configure mpconfigboard.h.
CFLAGS += -DMICROPY_ESP8266_2M
endif
ifeq ($(BOARD_VARIANT),FLASH_1M)
LD_FILES = boards/esp8266_1MiB.ld
MICROPY_ESPNOW ?= 1
MICROPY_PY_BTREE ?= 1
MICROPY_VFS_LFS2 ?= 1
# Note: Implicitly uses the port manifest.
# Configure mpconfigboard.h.
CFLAGS += -DMICROPY_ESP8266_1M
endif
ifeq ($(BOARD_VARIANT),OTA)
LD_FILES = boards/esp8266_ota.ld
MICROPY_ESPNOW ?= 1
MICROPY_PY_BTREE ?= 1
MICROPY_VFS_LFS2 ?= 1
# Note: Implicitly uses the port manifest.
# Configure mpconfigboard.h.
CFLAGS += -DMICROPY_ESP8266_1M
endif
ifeq ($(BOARD_VARIANT),FLASH_512K)
LD_FILES = boards/esp8266_512kiB.ld
# Note: Use the minimal manifest.py.
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest_512kiB.py
# Configure mpconfigboard.h.
CFLAGS += -DMICROPY_ESP8266_512K
endif