I’m trying to debug a project. It’s a PlatformIO project leaf/platformio.ini at main · DangerMonkeys/leaf · GitHub
So far, I’ve noticed I’m using the default 8MB partition table:
# ~3.2Mb for A and B partitions to allow for updates
board_build.partitions = default_8MB.csv
I’ve crashed my code (put an assert(0)),
I’ve read the dump from the coredump partition using:
pio pkg exec -p "tool-esptoolpy" -- esptool.py --chip esp32-s3 --port /dev/ttyACM0 --baud 115200 read_flash 8323072 65536 coredump.bin
Then I’ve tried to read the core dump, but, debug having debug symbols enabled, I’m not getting much info. Any help would be appreciated:
(env) [scott@sob-desktop local-scott]$ esp-coredump info_corefile -t raw -c Documents/leaf/coredump.bin --gdb ~/Downloads/riscv32-esp-elf-gdb-15.2_20241112-x86_64-linux-gnu/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.13 --rom-elf ~/Downloads/esp-rom-elfs-20240305/esp32s3_rev0_rom.elf Documents/leaf/.pio/build/leaf_3_2_5_dev/firmware.elf
espcoredump.py v1.13.1
===============================================================
==================== ESP32 CORE DUMP START ====================
Crashed task handle: 0x3fcc06fc, name: 'loopTask', GDB name: 'process 1070335740'
Crashed task is not in the interrupt context
Panic reason: assert failed: virtual void SimpleSettingsMenuPage::draw() menu_page.cpp:84 (0)
================== CURRENT THREAD REGISTERS ===================
exccause 0x1d (StoreProhibitedCause)
excvaddr 0x0
epc1 0x4037a8eb
epc2 0x0
epc3 0x0
epc4 0x0
epc5 0x0
epc6 0x0
eps2 0x0
eps3 0x0
eps4 0x0
eps5 0x0
eps6 0x0
ra <unavailable>
sp <unavailable>
gp <unavailable>
tp <unavailable>
t0 <unavailable>
t1 <unavailable>
t2 <unavailable>
fp <unavailable>
s1 <unavailable>
a0 <unavailable>
a1 <unavailable>
a2 <unavailable>
a3 <unavailable>
a4 <unavailable>
a5 <unavailable>
a6 <unavailable>
a7 <unavailable>
s2 <unavailable>
s3 <unavailable>
s4 <unavailable>
s5 <unavailable>
s6 <unavailable>
s7 <unavailable>
s8 <unavailable>
s9 <unavailable>
s10 <unavailable>
s11 <unavailable>
t3 <unavailable>
t4 <unavailable>
t5 <unavailable>
t6 <unavailable>
pc <unavailable>
==================== CURRENT THREAD STACK =====================
#0 <unavailable> in ?? ()
======================== THREADS INFO =========================
Id Target Id Frame
* 1 <main task> <unavailable> in ?? ()
TCB NAME PRIO C/B STACK USED/FREE
---------- ---------------- -------- ----------------
Traceback (most recent call last):
File "/homes-local/scott/env/bin/esp-coredump", line 8, in <module>
sys.exit(main())
~~~~^^
File "/homes-local/scott/env/lib/python3.13/site-packages/esp_coredump/__main__.py", line 41, in main
temp_core_files = espcoredump.info_corefile()
File "/homes-local/scott/env/lib/python3.13/site-packages/esp_coredump/coredump.py", line 587, in info_corefile
self.print_threads_info(task_info)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/homes-local/scott/env/lib/python3.13/site-packages/esp_coredump/coredump.py", line 368, in print_threads_info
tcb_addr = self.gdb_esp.gdb2freertos_thread_id(thr['target-id'])
File "/homes-local/scott/env/lib/python3.13/site-packages/esp_coredump/corefile/gdb.py", line 150, in gdb2freertos_thread_id
return int(gdb_target_id.replace('process ', ''), 0)
ValueError: invalid literal for int() with base 0: '<main task>'
(env) [scott@sob-desktop local-scott]$