diff options
| author | Damien George | 2020-09-23 15:55:55 +1000 |
|---|---|---|
| committer | Damien George | 2021-02-15 12:48:39 +1100 |
| commit | 9b9088214687221d06f75a2932e9e0bd1c1b4103 (patch) | |
| tree | 845773cd45a1e199ce08ae9c4a6e16f892b9c225 /ports/esp32/boards | |
| parent | 66098c09850ccc31b49b341e7eb7a5f8526e359d (diff) | |
esp32: Add support to build using IDF with cmake.
This commit adds support for building the esp32 port with cmake, and in
particular it builds MicroPython as a component within the ESP-IDF. Using
cmake and the ESP-IDF build infrastructure makes it much easier to maintain
the port, especially with the various new ESP32 MCUs and their required
toolchains.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32/boards')
| -rw-r--r-- | ports/esp32/boards/GENERIC/mpconfigboard.cmake | 2 | ||||
| -rw-r--r-- | ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake | 6 | ||||
| -rw-r--r-- | ports/esp32/boards/GENERIC_D2WD/sdkconfig.board | 5 | ||||
| -rw-r--r-- | ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake | 6 | ||||
| -rw-r--r-- | ports/esp32/boards/GENERIC_OTA/sdkconfig.board | 2 | ||||
| -rw-r--r-- | ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake | 6 | ||||
| -rw-r--r-- | ports/esp32/boards/TINYPICO/mpconfigboard.cmake | 8 | ||||
| -rw-r--r-- | ports/esp32/boards/sdkconfig.base | 5 |
8 files changed, 40 insertions, 0 deletions
diff --git a/ports/esp32/boards/GENERIC/mpconfigboard.cmake b/ports/esp32/boards/GENERIC/mpconfigboard.cmake new file mode 100644 index 000000000..8fea52455 --- /dev/null +++ b/ports/esp32/boards/GENERIC/mpconfigboard.cmake @@ -0,0 +1,2 @@ +set(SDKCONFIG_DEFAULTS boards/sdkconfig.base) +set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) diff --git a/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake new file mode 100644 index 000000000..4e23666f1 --- /dev/null +++ b/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake @@ -0,0 +1,6 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/GENERIC_D2WD/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) diff --git a/ports/esp32/boards/GENERIC_D2WD/sdkconfig.board b/ports/esp32/boards/GENERIC_D2WD/sdkconfig.board new file mode 100644 index 000000000..367283ded --- /dev/null +++ b/ports/esp32/boards/GENERIC_D2WD/sdkconfig.board @@ -0,0 +1,5 @@ +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-2MiB.csv" diff --git a/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake new file mode 100644 index 000000000..7b1e14600 --- /dev/null +++ b/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake @@ -0,0 +1,6 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/GENERIC_OTA/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) diff --git a/ports/esp32/boards/GENERIC_OTA/sdkconfig.board b/ports/esp32/boards/GENERIC_OTA/sdkconfig.board index b0ed171d8..ca1f4276f 100644 --- a/ports/esp32/boards/GENERIC_OTA/sdkconfig.board +++ b/ports/esp32/boards/GENERIC_OTA/sdkconfig.board @@ -1,4 +1,6 @@ CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-ota.csv" # ESP-IDF v3: CONFIG_APP_ROLLBACK_ENABLE=y diff --git a/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake new file mode 100644 index 000000000..bb441d9eb --- /dev/null +++ b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake @@ -0,0 +1,6 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.spiram +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) diff --git a/ports/esp32/boards/TINYPICO/mpconfigboard.cmake b/ports/esp32/boards/TINYPICO/mpconfigboard.cmake new file mode 100644 index 000000000..990e3e035 --- /dev/null +++ b/ports/esp32/boards/TINYPICO/mpconfigboard.cmake @@ -0,0 +1,8 @@ +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.240mhz + boards/sdkconfig.spiram + boards/TINYPICO/sdkconfig.board +) + +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/esp32/boards/sdkconfig.base b/ports/esp32/boards/sdkconfig.base index 67e2424a1..de6e42c8f 100644 --- a/ports/esp32/boards/sdkconfig.base +++ b/ports/esp32/boards/sdkconfig.base @@ -51,3 +51,8 @@ CONFIG_PPP_SUPPORT=y CONFIG_PPP_PAP_SUPPORT=y CONFIG_PPP_CHAP_SUPPORT=y CONFIG_ULP_COPROC_ENABLED=y + +# For cmake build +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" |
