diff --git a/components/partition_table/Kconfig.projbuild b/components/partition_table/Kconfig.projbuild index de3f74223b..6aaef75875 100644 --- a/components/partition_table/Kconfig.projbuild +++ b/components/partition_table/Kconfig.projbuild @@ -9,21 +9,79 @@ menu "Partition Table" be found. The predefined partition table CSV descriptions can be found - in the components/partition_table directory. Otherwise it's - possible to create a new custom partition CSV for your application. + in the components/partition_table directory. These are mostly intended + for example and development use, it's expect that for production use you + will copy one of these CSV files and create a custom partition CSV for + your application. config PARTITION_TABLE_SINGLE_APP bool "Single factory app, no OTA" + help + This is the default partition table, designed to fit into a 2MB or + larger flash with a single 1MB app partition. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_singleapp.csv + + This partition table is not suitable for an app that needs OTA + (over the air update) capability. + config PARTITION_TABLE_SINGLE_APP_LARGE + bool "Single factory app (large), no OTA" + help + This is a variation of the default partition table, that expands + the 1MB app partition size to 1.5MB to fit more code. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_singleapp_large.csv + + This partition table is not suitable for an app that needs OTA + (over the air update) capability. config PARTITION_TABLE_TWO_OTA bool "Factory app, two OTA definitions" + help + This is a basic OTA-enabled partition table with a factory app + partition plus two OTA app partitions. All are 1MB, so this + partition table requires 4MB or larger flash size. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_two_ota.csv config PARTITION_TABLE_CUSTOM bool "Custom partition table CSV" + help + Specify the path to the partition table CSV to use for your project. + + Consult the Partition Table section in the ESP-IDF Programmers Guide + for more information. config PARTITION_TABLE_SINGLE_APP_ENCRYPTED_NVS bool "Single factory app, no OTA, encrypted NVS" depends on !ESP32_COREDUMP_ENABLE_TO_FLASH && NVS_ENCRYPTION + help + This is a variation of the default "Single factory app, no OTA" partition table + that supports encrypted NVS when using flash encryption. See the Flash Encryption section + in the ESP-IDF Programmers Guide for more information. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_singleapp_encr_nvs.csv + config PARTITION_TABLE_SINGLE_APP_LARGE_ENC_NVS + bool "Single factory app (large), no OTA, encrypted NVS" + depends on !ESP32_COREDUMP_ENABLE_TO_FLASH && NVS_ENCRYPTION + help + This is a variation of the "Single factory app (large), no OTA" partition table + that supports encrypted NVS when using flash encryption. See the Flash Encryption section + in the ESP-IDF Programmers Guide for more information. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_singleapp_large_encr_nvs.csv config PARTITION_TABLE_TWO_OTA_ENCRYPTED_NVS bool "Factory app, two OTA definitions, encrypted NVS" depends on !ESP_COREDUMP_ENABLE_TO_FLASH && NVS_ENCRYPTION + help + This is a variation of the "Factory app, two OTA definitions" partition table + that supports encrypted NVS when using flash encryption. See the Flash Encryption section + in the ESP-IDF Programmers Guide for more information. + + The corresponding CSV file in the IDF directory is + components/partition_table/partitions_two_ota_encr_nvs.csv endchoice config PARTITION_TABLE_CUSTOM_FILENAME @@ -38,6 +96,9 @@ menu "Partition Table" default "partitions_singleapp.csv" if PARTITION_TABLE_SINGLE_APP && !ESP_COREDUMP_ENABLE_TO_FLASH default "partitions_singleapp_coredump.csv" if PARTITION_TABLE_SINGLE_APP && ESP_COREDUMP_ENABLE_TO_FLASH default "partitions_singleapp_encr_nvs.csv" if PARTITION_TABLE_SINGLE_APP_ENCRYPTED_NVS + default "partitions_singleapp_large.csv" if PARTITION_TABLE_SINGLE_APP_LARGE && !ESP_COREDUMP_ENABLE_TO_FLASH + default "partitions_singleapp_large_coredump.csv" if PARTITION_TABLE_SINGLE_APP_LARGE && ESP_COREDUMP_ENABLE_TO_FLASH # NOERROR + default "partitions_singleapp_large_encr_nvs.csv" if PARTITION_TABLE_SINGLE_APP_LARGE_ENC_NVS default "partitions_two_ota.csv" if PARTITION_TABLE_TWO_OTA && !ESP_COREDUMP_ENABLE_TO_FLASH default "partitions_two_ota_coredump.csv" if PARTITION_TABLE_TWO_OTA && ESP_COREDUMP_ENABLE_TO_FLASH default "partitions_two_ota_encr_nvs.csv" if PARTITION_TABLE_TWO_OTA_ENCRYPTED_NVS diff --git a/components/partition_table/partitions_singleapp_large.csv b/components/partition_table/partitions_singleapp_large.csv new file mode 100644 index 0000000000..8bc7d7c8fe --- /dev/null +++ b/components/partition_table/partitions_singleapp_large.csv @@ -0,0 +1,5 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, , 0x6000, +phy_init, data, phy, , 0x1000, +factory, app, factory, , 1500K, diff --git a/components/partition_table/partitions_singleapp_large_coredump.csv b/components/partition_table/partitions_singleapp_large_coredump.csv new file mode 100644 index 0000000000..61172d5ce0 --- /dev/null +++ b/components/partition_table/partitions_singleapp_large_coredump.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, , 0x6000 +phy_init, data, phy, , 0x1000 +factory, app, factory, , 1500K +coredump, data, coredump, , 64K diff --git a/components/partition_table/partitions_singleapp_large_encr_nvs.csv b/components/partition_table/partitions_singleapp_large_encr_nvs.csv new file mode 100644 index 0000000000..61ea3e5339 --- /dev/null +++ b/components/partition_table/partitions_singleapp_large_encr_nvs.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, , 0x6000, +phy_init, data, phy, , 0x1000, +factory, app, factory, , 1500K, +nvs_key, data, nvs_keys,, 0x1000, encrypted diff --git a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults index 04506e6825..cc1440f272 100644 --- a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults +++ b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults @@ -1,6 +1,12 @@ # Override some defaults so BT stack is enabled # in this example +# +# Partition Table +# (It's possible to fit Blufi in 1MB app partition size with some other optimizations, but +# default config is close to 1MB.) +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y + # # BT config # diff --git a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32 b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32 index 501543ed3d..61abce54cf 100644 --- a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32 +++ b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32 @@ -25,18 +25,6 @@ CONFIG_APP_BUILD_BOOTLOADER=y CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y # end of Build type -# -# Partition Table -# -CONFIG_PARTITION_TABLE_SINGLE_APP=y -# CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y -# end of Partition Table - # # Application manager # diff --git a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32c3 b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32c3 index 91b94080a6..1cea2f754e 100644 --- a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32c3 +++ b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32c3 @@ -25,18 +25,6 @@ CONFIG_APP_BUILD_BOOTLOADER=y CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y # end of Build type -# -# Partition Table -# -CONFIG_PARTITION_TABLE_SINGLE_APP=y -# CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y -# end of Partition Table - # # Application manager # diff --git a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32s3 b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32s3 index 92013f0a80..e569824663 100644 --- a/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32s3 +++ b/examples/bluetooth/bluedroid/ble/blufi/sdkconfig.defaults.esp32s3 @@ -26,18 +26,6 @@ CONFIG_APP_BUILD_BOOTLOADER=y CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y # end of Build type -# -# Partition Table -# -CONFIG_PARTITION_TABLE_SINGLE_APP=y -# CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y -# end of Partition Table - # # Application manager # diff --git a/examples/protocols/asio/chat_client/sdkconfig.defaults b/examples/protocols/asio/chat_client/sdkconfig.defaults index ce53d73ece..b02a3a3ef6 100644 --- a/examples/protocols/asio/chat_client/sdkconfig.defaults +++ b/examples/protocols/asio/chat_client/sdkconfig.defaults @@ -1 +1,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 + +# +# Partition Table +# +# Leave some room for larger apps without needing to reduce other features +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y diff --git a/examples/protocols/asio/chat_server/sdkconfig.defaults b/examples/protocols/asio/chat_server/sdkconfig.defaults index ce53d73ece..b02a3a3ef6 100644 --- a/examples/protocols/asio/chat_server/sdkconfig.defaults +++ b/examples/protocols/asio/chat_server/sdkconfig.defaults @@ -1 +1,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 + +# +# Partition Table +# +# Leave some room for larger apps without needing to reduce other features +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y diff --git a/examples/protocols/asio/ssl_client_server/sdkconfig.defaults b/examples/protocols/asio/ssl_client_server/sdkconfig.defaults index 7340a4467f..30bba61d40 100644 --- a/examples/protocols/asio/ssl_client_server/sdkconfig.defaults +++ b/examples/protocols/asio/ssl_client_server/sdkconfig.defaults @@ -2,3 +2,9 @@ CONFIG_ASIO_SSL_SUPPORT=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + +# +# Partition Table +# +# Leave some room for larger apps without needing to reduce other features +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y diff --git a/examples/protocols/asio/tcp_echo_server/sdkconfig.defaults b/examples/protocols/asio/tcp_echo_server/sdkconfig.defaults index ce53d73ece..b02a3a3ef6 100644 --- a/examples/protocols/asio/tcp_echo_server/sdkconfig.defaults +++ b/examples/protocols/asio/tcp_echo_server/sdkconfig.defaults @@ -1 +1,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 + +# +# Partition Table +# +# Leave some room for larger apps without needing to reduce other features +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y diff --git a/examples/protocols/asio/udp_echo_server/sdkconfig.defaults b/examples/protocols/asio/udp_echo_server/sdkconfig.defaults index ce53d73ece..b02a3a3ef6 100644 --- a/examples/protocols/asio/udp_echo_server/sdkconfig.defaults +++ b/examples/protocols/asio/udp_echo_server/sdkconfig.defaults @@ -1 +1,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 + +# +# Partition Table +# +# Leave some room for larger apps without needing to reduce other features +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y