esp32: Rename GENERIC* boards to ESP32_GENERIC*.
Board names need to be unique across ports, and GENERIC clashes with the ESP8266 (which will be renamed to ESP8266_GENERIC). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
97ffc53ec9
commit
aa23698119
@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
# Set the board if it's not already set.
|
||||
if(NOT MICROPY_BOARD)
|
||||
set(MICROPY_BOARD GENERIC)
|
||||
set(MICROPY_BOARD ESP32_GENERIC)
|
||||
endif()
|
||||
|
||||
# Set the board directory and check that it exists.
|
||||
|
@ -8,12 +8,15 @@ ifdef BOARD_DIR
|
||||
# the path as the board name.
|
||||
BOARD ?= $(notdir $(BOARD_DIR:/=))
|
||||
else
|
||||
# If not given on the command line, then default to GENERIC.
|
||||
BOARD ?= GENERIC
|
||||
# If not given on the command line, then default to ESP32_GENERIC.
|
||||
BOARD ?= ESP32_GENERIC
|
||||
BOARD_DIR ?= boards/$(BOARD)
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard $(BOARD_DIR)/.),)
|
||||
ifeq ($(findstring boards/GENERIC,$(BOARD_DIR)),boards/GENERIC)
|
||||
$(warning The GENERIC* boards have been renamed to ESP32_GENERIC*)
|
||||
endif
|
||||
$(error Invalid BOARD specified: $(BOARD_DIR))
|
||||
endif
|
||||
|
||||
|
@ -93,7 +93,7 @@ $ make submodules
|
||||
$ make
|
||||
```
|
||||
|
||||
This will produce a combined `firmware.bin` image in the `build-GENERIC/`
|
||||
This will produce a combined `firmware.bin` image in the `build-ESP32_GENERIC/`
|
||||
subdirectory (this firmware image is made up of: bootloader.bin, partitions.bin
|
||||
and micropython.bin).
|
||||
|
||||
@ -123,12 +123,12 @@ To flash the MicroPython firmware to your ESP32 use:
|
||||
$ make deploy
|
||||
```
|
||||
|
||||
The default ESP32 board build by the above commands is the `GENERIC` one, which
|
||||
should work on most ESP32 modules. You can specify a different board by passing
|
||||
`BOARD=<board>` to the make commands, for example:
|
||||
The default ESP32 board build by the above commands is the `ESP32_GENERIC`
|
||||
one, which should work on most ESP32 modules. You can specify a different
|
||||
board by passing `BOARD=<board>` to the make commands, for example:
|
||||
|
||||
```bash
|
||||
$ make BOARD=GENERIC_SPIRAM
|
||||
$ make BOARD=ESP32_GENERIC_S3
|
||||
```
|
||||
|
||||
Note: the above "make" commands are thin wrappers for the underlying `idf.py`
|
||||
@ -137,10 +137,25 @@ for example:
|
||||
|
||||
```bash
|
||||
$ idf.py build
|
||||
$ idf.py -D MICROPY_BOARD=GENERIC_SPIRAM build
|
||||
$ idf.py -D MICROPY_BOARD=ESP32_GENERIC build
|
||||
$ idf.py flash
|
||||
```
|
||||
|
||||
Some boards also support "variants", which are allow for small variations of
|
||||
an otherwise similar board. For example different flash sizes or features. For
|
||||
example to build the `OTA` variant of `ESP32_GENERIC`.
|
||||
|
||||
```bash
|
||||
$ make BOARD=ESP32_GENERIC BOARD_VARIANT=OTA
|
||||
```
|
||||
|
||||
or to enable octal-SPIRAM support for the `ESP32_GENERIC_S3` board:
|
||||
|
||||
```bash
|
||||
$ make BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM_OCT
|
||||
```
|
||||
|
||||
|
||||
Getting a Python prompt on the device
|
||||
-------------------------------------
|
||||
|
||||
@ -202,10 +217,10 @@ antenna = machine.Pin(16, machine.Pin.OUT, value=0)
|
||||
Defining a custom ESP32 board
|
||||
-----------------------------
|
||||
|
||||
The default ESP-IDF configuration settings are provided by the `GENERIC`
|
||||
board definition in the directory `boards/GENERIC`. For a custom configuration
|
||||
The default ESP-IDF configuration settings are provided by the `ESP32_GENERIC`
|
||||
board definition in the directory `boards/ESP32_GENERIC`. For a custom configuration
|
||||
you can define your own board directory. Start a new board configuration by
|
||||
copying an existing one (like `GENERIC`) and modifying it to suit your board.
|
||||
copying an existing one (like `ESP32_GENERIC`) and modifying it to suit your board.
|
||||
|
||||
MicroPython specific configuration values are defined in the board-specific
|
||||
`mpconfigboard.h` file, which is included by `mpconfigport.h`. Additional
|
||||
|
@ -6,7 +6,7 @@ set(SDKCONFIG_DEFAULTS
|
||||
if(MICROPY_BOARD_VARIANT STREQUAL "D2WD")
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
${SDKCONFIG_DEFAULTS}
|
||||
boards/GENERIC/sdkconfig.d2wd
|
||||
boards/ESP32_GENERIC/sdkconfig.d2wd
|
||||
)
|
||||
|
||||
list(APPEND MICROPY_DEF_BOARD
|
||||
@ -17,7 +17,7 @@ endif()
|
||||
if(MICROPY_BOARD_VARIANT STREQUAL "OTA")
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
${SDKCONFIG_DEFAULTS}
|
||||
boards/GENERIC/sdkconfig.ota
|
||||
boards/ESP32_GENERIC/sdkconfig.ota
|
||||
)
|
||||
|
||||
list(APPEND MICROPY_DEF_BOARD
|
||||
@ -39,7 +39,7 @@ endif()
|
||||
if(MICROPY_BOARD_VARIANT STREQUAL "UNICORE")
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
${SDKCONFIG_DEFAULTS}
|
||||
boards/GENERIC/sdkconfig.unicore
|
||||
boards/ESP32_GENERIC/sdkconfig.unicore
|
||||
)
|
||||
|
||||
list(APPEND MICROPY_DEF_BOARD
|
@ -3,5 +3,5 @@ set(IDF_TARGET esp32c3)
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.ble
|
||||
boards/GENERIC_C3/sdkconfig.c3usb
|
||||
boards/ESP32_GENERIC_C3/sdkconfig.c3usb
|
||||
)
|
@ -5,7 +5,7 @@ set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.usb
|
||||
boards/sdkconfig.ble
|
||||
boards/sdkconfig.spiram_sx
|
||||
boards/GENERIC_S3/sdkconfig.board
|
||||
boards/ESP32_GENERIC_S3/sdkconfig.board
|
||||
)
|
||||
|
||||
if(MICROPY_BOARD_VARIANT STREQUAL "SPIRAM_OCT")
|
@ -129,9 +129,9 @@ function ci_esp32_build {
|
||||
make ${MAKEOPTS} -C ports/esp32 \
|
||||
USER_C_MODULES=../../../examples/usercmodule/micropython.cmake \
|
||||
FROZEN_MANIFEST=$(pwd)/ports/esp32/boards/manifest_test.py
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=GENERIC_C3
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=GENERIC_S2
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=GENERIC_S3
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_C3
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S2
|
||||
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S3
|
||||
|
||||
# Test building native .mpy with xtensawin architecture.
|
||||
ci_native_mpy_modules_build xtensawin
|
||||
|
Loading…
x
Reference in New Issue
Block a user