Skip to content

Commit

Permalink
feat: 增加16M flash的ESP32固件配置
Browse files Browse the repository at this point in the history
  • Loading branch information
BunnySakura committed Sep 8, 2024
1 parent 3033eff commit 64c6593
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 2 deletions.
22 changes: 22 additions & 0 deletions ports/esp32/boards/GENERIC_16M/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"BLE",
"WiFi"
],
"id": "esp32",
"images": [
"esp32_devkitc.jpg"
],
"mcu": "esp32",
"product": "ESP32",
"thumbnail": "",
"url": "https://www.espressif.com/en/products/modules",
"variants": {
"idf3": "Compiled with IDF 3.x"
},
"vendor": "Espressif"
}
3 changes: 3 additions & 0 deletions ports/esp32/boards/GENERIC_16M/board.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The following files are daily firmware for ESP32-based boards without external SPIRAM.

This firmware is compiled using ESP-IDF v4.x. Some older releases are also provided that are compiled with ESP-IDF v3.x.
5 changes: 5 additions & 0 deletions ports/esp32/boards/GENERIC_16M/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
boards/GENERIC_16M/sdkconfig.board
)
2 changes: 2 additions & 0 deletions ports/esp32/boards/GENERIC_16M/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MICROPY_HW_BOARD_NAME "ESP32 module"
#define MICROPY_HW_MCU_NAME "ESP32"
19 changes: 19 additions & 0 deletions ports/esp32/boards/GENERIC_16M/sdkconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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"

4 changes: 2 additions & 2 deletions ports/esp32/network_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ STATIC mp_obj_t esp_phy_mode(size_t n_args, const mp_obj_t *args) {
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(esp_network_phy_mode_obj, 0, 1, esp_phy_mode);

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
#define TEST_WIFI_AUTH_MAX 9
#define TEST_WIFI_AUTH_MAX 10
#else
#define TEST_WIFI_AUTH_MAX 8
#define TEST_WIFI_AUTH_MAX 10
#endif
_Static_assert(WIFI_AUTH_MAX == TEST_WIFI_AUTH_MAX, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");

0 comments on commit 64c6593

Please sign in to comment.