change(coredump): return ESP_ERR_NOT_FOUND for blank partition

Closes https://github.com/espressif/esp-idf/issues/15153
This commit is contained in:
Erhan Kurubas
2025-07-05 23:02:42 +02:00
parent fb53d6e719
commit a877a070cb
2 changed files with 3 additions and 1 deletions

View File

@@ -476,7 +476,7 @@ esp_err_t esp_core_dump_partition_and_size_get(const esp_partition_t **partition
/* Verify that the size read from the flash is not corrupted. */
if (core_size == 0xFFFFFFFF) {
ESP_COREDUMP_LOGD("Blank core dump partition!");
return ESP_ERR_INVALID_SIZE;
return ESP_ERR_NOT_FOUND;
}
if ((core_size < sizeof(uint32_t)) || (core_size > core_part->size)) {

View File

@@ -100,3 +100,5 @@ Core Dump
Binary data format has been dropped. `CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN` is no longer supported. Elf is now the default data format.
CRC data integrity check has been dropped. `ESP_COREDUMP_CHECKSUM_CRC32` is no longer supported. SHA256 is now the default checksum algorithm.
The function :cpp:func:`esp_core_dump_partition_and_size_get()` now returns `ESP_ERR_NOT_FOUND` for blank (erased) partitions instead of `ESP_ERR_INVALID_SIZE`.