summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Van Oosterwijck <patrick@silicognition.com>2021-07-23 19:31:51 -0600
committerDamien George <damien@micropython.org>2021-08-07 12:50:13 +1000
commit028fc815cdb63b2ea50bc1f377177b19b6a3f9cc (patch)
treee85b204f5ce0f6a57cce056365f51f58a31f1bcb
parenta3675294ae39a724aec6959238c45af0dea92f21 (diff)
esp32/boards: Add Silicognition wESP32 board configuration.
For rev 7+ boards with 16MB of flash. Partition table allocates 2.4 MiB for MicroPython, 11 MiB for the filesystem.
-rw-r--r--ports/esp32/boards/SIL_WESP32/mpconfigboard.cmake10
-rw-r--r--ports/esp32/boards/SIL_WESP32/mpconfigboard.h2
-rw-r--r--ports/esp32/boards/SIL_WESP32/sdkconfig.board22
-rw-r--r--ports/esp32/partitions-16MiB-ota.csv10
4 files changed, 44 insertions, 0 deletions
diff --git a/ports/esp32/boards/SIL_WESP32/mpconfigboard.cmake b/ports/esp32/boards/SIL_WESP32/mpconfigboard.cmake
new file mode 100644
index 000000000..885d4eaa2
--- /dev/null
+++ b/ports/esp32/boards/SIL_WESP32/mpconfigboard.cmake
@@ -0,0 +1,10 @@
+set(SDKCONFIG_DEFAULTS
+ boards/sdkconfig.base
+ boards/sdkconfig.ble
+ boards/sdkconfig.240mhz
+ boards/SIL_WESP32/sdkconfig.board
+)
+
+if(NOT MICROPY_FROZEN_MANIFEST)
+ set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
+endif()
diff --git a/ports/esp32/boards/SIL_WESP32/mpconfigboard.h b/ports/esp32/boards/SIL_WESP32/mpconfigboard.h
new file mode 100644
index 000000000..fc66aac64
--- /dev/null
+++ b/ports/esp32/boards/SIL_WESP32/mpconfigboard.h
@@ -0,0 +1,2 @@
+#define MICROPY_HW_BOARD_NAME "Silicognition wESP32"
+#define MICROPY_HW_MCU_NAME "ESP32"
diff --git a/ports/esp32/boards/SIL_WESP32/sdkconfig.board b/ports/esp32/boards/SIL_WESP32/sdkconfig.board
new file mode 100644
index 000000000..98eef1d10
--- /dev/null
+++ b/ports/esp32/boards/SIL_WESP32/sdkconfig.board
@@ -0,0 +1,22 @@
+# 16 MB flash
+
+CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
+CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
+CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
+CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
+
+# Fast flash
+
+CONFIG_FLASHMODE_QIO=y
+CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
+CONFIG_ESP32_REV_MIN_1=y
+
+# OTA
+
+CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
+CONFIG_PARTITION_TABLE_CUSTOM=y
+CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MiB-ota.csv"
+
+# Network name
+
+CONFIG_LWIP_LOCAL_HOSTNAME="wESP32"
diff --git a/ports/esp32/partitions-16MiB-ota.csv b/ports/esp32/partitions-16MiB-ota.csv
new file mode 100644
index 000000000..a6f83bc46
--- /dev/null
+++ b/ports/esp32/partitions-16MiB-ota.csv
@@ -0,0 +1,10 @@
+# Partition table for MicroPython with OTA support using 16MB flash
+# Notes: the offset of the partition table itself is set in
+# $IDF_PATH/components/partition_table/Kconfig.projbuild.
+# Name, Type, SubType, Offset, Size, Flags
+nvs, data, nvs, 0x9000, 0x4000,
+otadata, data, ota, 0xd000, 0x2000,
+phy_init, data, phy, 0xf000, 0x1000,
+ota_0, app, ota_0, 0x10000, 0x270000,
+ota_1, app, ota_1, 0x280000, 0x270000,
+vfs, data, fat, 0x4f0000, 0xb10000,