-
Notifications
You must be signed in to change notification settings - Fork 8
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
Coredump to flash not working in SDK V5.2.1 (bin or elf same error) (IDFGH-12462) #8
Comments
Espressif IoT Development Framework Configuration or Data destination (Flash) ---> have the same behavior on trying to read |
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. Core 0 register dump: A2 : 0x00000000 A3 : 0x3f40ff7c A4 : 0x00000000 A5 : 0x3ffe3c78 A10 : 0x00000019 A11 : 0x00060823 A12 : 0x00060820 A13 : 0xffffffff Backtrace: 0x400f0e2c:0x3fff30b0 0x40138bd5:0x3fff3110 0x40111dd6:0x3fff3150 0x40111ea5:0x3fff31b0 0x4011208d:0x3fff3200 0x400992c2:0x3fff3240 ELF file SHA256: cfca5fe5e Rebooting... |
Hi @filzek,
Please replace |
Sorry, I have just realized that I have missed one important thing from your report - it seems, from the partition table, that you have enabled the flash encryption. In that case, the error makes a lot of sense now. So when the esp-coredump is reading the partition table it is not able to decode bytes because they are encrypted. The issue is that the encryption key is typically not known to the host where the esp-coredump tool is being run. I am afraid that in this case it is expected behavior and there is not much that can be done. If you are still developing the application I would suggest printing the coredump to UART, where the esp-idf-monitor would be able to decode it. In the case of an already deployed application, the easiest way would be to decode the coredump on a chip and send the core file somewhere where you can analyze it. For a similar report see: https://www.esp32.com/viewtopic.php?t=34714&p=117051 |
partition as of
nvs, data, nvs, 0xA000, 24K,
otadata, data, ota, , 8K,
phy_init, data, phy, , 4K,
nvs_keys, data, nvs_keys, , 24K,
factory_nvs, data, nvs, , 24K,
ota_0, app, ota_0, 0x20000, 0x340000,encrypted
coredump, data, coredump, , 64K, encrypted
made proposital error doing
//crash proposital area for coredump
global_var = 25;
int *ptr = NULL;
*ptr = 42; // This will cause a crash due to null pointer dereference
int zero = 0;
int result = 10 / zero; // This will cause a crash due to division by zero
//end crash area for coredump
so this will bring the coredump to be executed,
after it, set the debug board to run in download mode and run
idf.py coredump-debug --port com3
Executing action: coredump-debug
Failed to load core dump: parttool script execution failed with error 1, failed command was: 'C:\Espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\parttool.py --port com3 --baud 460800 --partition-table-offset 0x9000
read_partition --partition-type data --partition-subtype coredump --output C:\Users\devop\AppData\Local\Temp\tmpz_btbjwn'
┌────── Additional information about the error:
│
│ esptool.py v4.7.0
│ Serial port com3
│ Connecting...
│ Failed to get PID of a device on com3, using standard reset sequence.
│ ...............................
│ Detecting chip type... Unsupported detection protocol, switching and trying again...
│ Connecting...
│ Failed to get PID of a device on com3, using standard reset sequence.
│ Detecting chip type... ESP32
│ Chip is ESP32-D0WD-V3 (revision v3.0)
│ Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
│ Crystal is 40MHz
│ MAC: 08:3a:f2:04:a3:c8
│ Uploading stub...
│ Running stub...
│ Stub running...
│ Changing baud rate to 460800
│ Changed.
│ 3072 (100 %)
│ 3072 (100 %)
│ Read 3072 bytes at 0x00009000 in 0.1 seconds (305.4 kbit/s)...
│ Hard resetting via RTS pin...
│ Running C:\Espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.2\components\esptool_py\esptool\esptool.py --port com3 --baud 460800 read_flash 36864 3072 C:\Users\devop\AppData\Local\Temp\tmp4thh57q6...
│ Traceback (most recent call last):
│ File "C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\parttool.py", line 363, in
│ main()
│ File "C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\parttool.py", line 332, in main
│ target = ParttoolTarget(**target_args)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│ File "C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\parttool.py", line 105, in init
│ partition_table = gen.PartitionTable.from_binary(f.read())
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│ File "C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\gen_esp32part.py", line 319, in from_binary
│ result.append(PartitionDefinition.from_binary(data))
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│ File "C:\Espressif\frameworks\esp-idf-v5.2\components\partition_table\gen_esp32part.py", line 475, in from_binary
│ res.name = res.name.decode()
│ ^^^^^^^^^^^^^^^^^
│ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbd in position 2: invalid start byte
The text was updated successfully, but these errors were encountered: