Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
28 changed files
with
179 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Minimal _boot.py for the 512kiB variant. Does not set up a block device or | ||
# filesystem. Other variants use esp8266/modules/_boot.py. | ||
|
||
import gc | ||
|
||
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
ports/esp8266/boards/GENERIC/board.md → ...s/esp8266/boards/ESP8266_GENERIC/board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#if defined(MICROPY_ESP8266_2M) | ||
|
||
#define MICROPY_HW_BOARD_NAME "ESP module" | ||
#define MICROPY_HW_MCU_NAME "ESP8266" | ||
|
||
#define MICROPY_PERSISTENT_CODE_LOAD (1) | ||
#define MICROPY_EMIT_XTENSA (1) | ||
#define MICROPY_EMIT_INLINE_XTENSA (1) | ||
|
||
#define MICROPY_DEBUG_PRINTERS (1) | ||
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL) | ||
|
||
#define MICROPY_READER_VFS (MICROPY_VFS) | ||
#define MICROPY_VFS (1) | ||
|
||
#define MICROPY_PY_CRYPTOLIB (1) | ||
|
||
#elif defined(MICROPY_ESP8266_1M) | ||
|
||
#define MICROPY_HW_BOARD_NAME "ESP module (1M)" | ||
#define MICROPY_HW_MCU_NAME "ESP8266" | ||
|
||
#define MICROPY_PERSISTENT_CODE_LOAD (1) | ||
#define MICROPY_EMIT_XTENSA (1) | ||
#define MICROPY_EMIT_INLINE_XTENSA (1) | ||
|
||
#define MICROPY_DEBUG_PRINTERS (1) | ||
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL) | ||
|
||
#define MICROPY_READER_VFS (MICROPY_VFS) | ||
#define MICROPY_VFS (1) | ||
|
||
|
||
#define MICROPY_PY_CRYPTOLIB (1) | ||
|
||
#elif defined(MICROPY_ESP8266_512K) | ||
|
||
#define MICROPY_HW_BOARD_NAME "ESP module (512K)" | ||
#define MICROPY_HW_MCU_NAME "ESP8266" | ||
|
||
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE) | ||
|
||
#define MICROPY_PY_FSTRINGS (0) | ||
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (0) | ||
#define MICROPY_PY_ALL_SPECIAL_METHODS (0) | ||
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) | ||
#define MICROPY_PY_SYS_STDIO_BUFFER (0) | ||
#define MICROPY_PY_ASYNCIO (0) | ||
#define MICROPY_PY_RE_SUB (0) | ||
#define MICROPY_PY_FRAMEBUF (0) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.