File tree Expand file tree Collapse file tree 7 files changed +39
-15
lines changed Expand file tree Collapse file tree 7 files changed +39
-15
lines changed Original file line number Diff line number Diff line change 11set (SDKCONFIG_DEFAULTS
22 ${SDKCONFIG_DEFAULTS}
3+ boards/sdkconfig.flash_2MiB
34 boards/ESP32_GENERIC/sdkconfig.d2wd
45)
56
Original file line number Diff line number Diff line change 1- # Optimise using -Os to reduce size
2- CONFIG_COMPILER_OPTIMIZATION_SIZE=y
3- CONFIG_COMPILER_OPTIMIZATION_PERF=n
4- CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
5-
6- # Change maximum log level to error, to reduce firmware size.
7- CONFIG_LOG_MAXIMUM_LEVEL_ERROR=y
8- CONFIG_LOG_MAXIMUM_LEVEL_INFO=n
9-
10- # Disable SPI Ethernet driver to reduce firmware size.
11- CONFIG_ETH_USE_SPI_ETHERNET=n
12-
1+ # Setting specific to d2wd
132CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
143CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
15- CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
16- CONFIG_PARTITION_TABLE_CUSTOM=y
17- CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-2MiB.csv"
Original file line number Diff line number Diff line change 1818 "product" : " ESP32-C2" ,
1919 "thumbnail" : " " ,
2020 "url" : " https://www.espressif.com/en/products/modules" ,
21+ "variants" : {
22+ "FLASH_2M" : " 2MiB flash"
23+ },
2124 "vendor" : " Espressif"
2225}
Original file line number Diff line number Diff line change 11The following files are firmware images that should work on most ESP32-C2-based
22boards with at least 4MiB of flash and 26MHz crystal frequency. This includes
33ESP8684-WROOM and ESP8684-MINI modules.
4+
5+ If your board has only 2MiB of flash, you should try the FLASH\_ 2M variant
Original file line number Diff line number Diff line change 11// This configuration is for a generic ESP32C2 board with 4MiB (or more) of flash.
22
3+ #ifndef MICROPY_HW_BOARD_NAME
34#define MICROPY_HW_BOARD_NAME "ESP32C2 module"
5+ #endif
6+
7+ #ifndef MICROPY_HW_MCU_NAME
48#define MICROPY_HW_MCU_NAME "ESP32C2"
9+ #endif
510
611#define MICROPY_HW_ENABLE_SDCARD (0)
712#define MICROPY_PY_MACHINE_I2S (0)
Original file line number Diff line number Diff line change 1+ set (SDKCONFIG_DEFAULTS
2+ ${SDKCONFIG_DEFAULTS}
3+ boards/sdkconfig.flash_2MiB
4+ )
5+
6+ list (APPEND MICROPY_DEF_BOARD
7+ MICROPY_HW_BOARD_NAME="Generic ESP32-C2 module with 2MiB Flash"
8+ MICROPY_OPT_COMPUTED_GOTO=0
9+ MICROPY_PY_NETWORK_LAN=0
10+ )
Original file line number Diff line number Diff line change 1+ # Set flash size to 2MiB.
2+ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n
3+ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
4+ CONFIG_PARTITION_TABLE_CUSTOM=y
5+ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-2MiB.csv"
6+
7+ # Disable SPI Ethernet driver to reduce firmware size.
8+ CONFIG_ETH_USE_SPI_ETHERNET=n
9+
10+ # Optimise using -Os to reduce size.
11+ CONFIG_COMPILER_OPTIMIZATION_SIZE=y
12+ CONFIG_COMPILER_OPTIMIZATION_PERF=n
13+ CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
14+
15+ # Change maximum log level to error, to reduce firmware size.
16+ CONFIG_LOG_MAXIMUM_LEVEL_ERROR=y
17+ CONFIG_LOG_MAXIMUM_LEVEL_INFO=n
You can’t perform that action at this time.
0 commit comments