diff --git a/components/espcoredump/src/core_dump_flash.c b/components/espcoredump/src/core_dump_flash.c index 7223d6e260..0b39a3f6dd 100644 --- a/components/espcoredump/src/core_dump_flash.c +++ b/components/espcoredump/src/core_dump_flash.c @@ -83,6 +83,10 @@ void esp_core_dump_flash_init(void) s_core_flash_config.partition.size = core_part->size; s_core_flash_config.partition.encrypted = core_part->encrypted; s_core_flash_config.partition_config_crc = esp_core_dump_calc_flash_config_crc(); + + if (esp_flash_encryption_enabled() && !core_part->encrypted) { + ESP_COREDUMP_LOGW("core dump partition is plain text, consider enabling `encrypted` flag"); + } } static esp_err_t esp_core_dump_flash_write_data(core_dump_write_data_t* priv, uint8_t* data, uint32_t data_size) diff --git a/docs/en/api-guides/core_dump.rst b/docs/en/api-guides/core_dump.rst index 5a6ebb099e..0b3a156b7d 100644 --- a/docs/en/api-guides/core_dump.rst +++ b/docs/en/api-guides/core_dump.rst @@ -84,6 +84,11 @@ as it is shown below:: factory, app, factory, 0x10000, 1M coredump, data, coredump,, 64K +.. important:: + If :doc:`Flash Encryption <../security/flash-encryption>` is enabled on the device then please add `encrypted` flag to the coredump partition:: + + coredump, data, coredump,, 64K, encrypted + There are no special requirements for partition name. It can be chosen according to the user application needs, but partition type should be 'data' and sub-type should be 'coredump'. Also when choosing partition size note that core dump data structure introduces constant overhead of 20 bytes and per-task overhead of 12 bytes. This overhead does not include size of TCB and stack for every task. So partition size should be at least 20 + max tasks number x (12 + TCB size + max task stack size) bytes.