Coredump directly to littlefs .bin file?
Posted: Thu Nov 14, 2024 10:42 pm
I have some devices in the field that sporadically seem to crash.
Unfortunately they don't have a partition table with a coredump partition.
Since replacement is difficult at the moment I was wondering if it would be possible to save a coredump directly to an existing littlefs partition table and store it there? Perhaps multiple bin files so I can track any crash for a longer period of time.
I was checking out the coredump related code here:
https://github.com/espressif/esp-idf/bl ... 18-L108C48
I'm wondering if anyone tried to directly write the dump into a .bin file on a littlefs partition instead of first to a coredump partition.
Would it be possible?
Perhaps by rewriting one of below functions and save the raw data directly to a bin file?
esp_core_dump_to_flash()
esp_core_dump_flash_write_data()
Unfortunately they don't have a partition table with a coredump partition.
Since replacement is difficult at the moment I was wondering if it would be possible to save a coredump directly to an existing littlefs partition table and store it there? Perhaps multiple bin files so I can track any crash for a longer period of time.
I was checking out the coredump related code here:
https://github.com/espressif/esp-idf/bl ... 18-L108C48
I'm wondering if anyone tried to directly write the dump into a .bin file on a littlefs partition instead of first to a coredump partition.
Would it be possible?
Perhaps by rewriting one of below functions and save the raw data directly to a bin file?
esp_core_dump_to_flash()
esp_core_dump_flash_write_data()