esp32c3: Add support for building image with a minimum target revision

This commit is contained in:
Angus Gratton 2021-02-23 17:40:38 +11:00 committed by Jack
parent fb9de62f74
commit 67a1858bb1
2 changed files with 31 additions and 1 deletions

View File

@ -23,6 +23,28 @@ menu "ESP32C3-Specific"
default 80 if ESP32C3_DEFAULT_CPU_FREQ_80
default 160 if ESP32C3_DEFAULT_CPU_FREQ_160
choice ESP32C3_REV_MIN
prompt "Minimum Supported ESP32-C3 Revision"
default ESP32C3_REV_MIN_0
help
Minimum revision that ESP-IDF would support.
Only supporting higher chip revisions can reduce binary size.
config ESP32C3_REV_MIN_0
bool "Rev 0"
config ESP32C3_REV_MIN_1
bool "Rev 1"
config ESP32C3_REV_MIN_2
bool "Rev 2"
endchoice
config ESP32C3_REV_MIN
int
default 0 if ESP32C3_REV_MIN_0
default 1 if ESP32C3_REV_MIN_1
default 2 if ESP32C3_REV_MIN_2
choice ESP32C3_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address"
default ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO

View File

@ -39,7 +39,15 @@ if(NOT CONFIG_SECURE_BOOT_ALLOW_SHORT_APP_PARTITION AND
endif()
if(CONFIG_ESP32_REV_MIN)
list(APPEND esptool_elf2image_args --min-rev ${CONFIG_ESP32_REV_MIN})
set(min_rev ${CONFIG_ESP32_REV_MIN})
endif()
if(CONFIG_ESP32C3_REV_MIN)
set(min_rev ${CONFIG_ESP32C3_REV_MIN})
endif()
if(min_rev)
list(APPEND esptool_elf2image_args --min-rev ${min_rev})
unset(min_rev)
endif()
if(CONFIG_ESPTOOLPY_FLASHSIZE_DETECT)