-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented esp_core_dump_image_erase() (IDFGH-4832) #6631
Conversation
… now returns ESP_ERR_NOT_FOUND when partition is blank
Thanks for your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
I added few comments, mostly details, please feel free to give me your opinion on them.
* | ||
* @return ESP_OK on success, otherwise \see esp_err_t | ||
*/ | ||
esp_err_t esp_core_dump_image_erase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, can you explicitly put void
in the parenthesis to forbid passing arguments to the function?
anything I can do for this PR? |
Hello @0xFEEDC0DE64 , Sorry for the delay (again), your PR has been accepted and is currently passing internal reviews. Once merged, it will be synced to Github after passing the internal tests. |
…mage_get() now returns ESP_ERR_NOT_FOUND when partition is blank Closes #6631
Implemented esp_core_dump_image_erase() and esp_core_dump_image_get() now returns ESP_ERR_NOT_FOUND when partition is blank/erased.
esp_core_dump_image_erase() calls esp_partition_erase_range() and additionally writes size 0xFFFFFFFF to avoid problems when flash encryption is enabled. Without explicitly writing 0xFFFFFFFF for size, esp_core_dump_image_get() will read a garbage size when the erased bytes are being decrypted.
With size 0xFFFFFFFF esp_core_dump_image_get() now returns ESP_ERR_NOT_FOUND instead of ESP_ERR_INVALID_SIZE
I needed to know if an error happened during reading the coredump or if it has simply been not found / been invalid or erased (because never crashed or coredump has been transmitted already successfully)