feat(coredump): save .bss, .data and .heap sections to the elf file

This commit is contained in:
Erhan Kurubas
2024-03-11 21:19:17 +01:00
parent 3f632df143
commit 617f5a7052
15 changed files with 387 additions and 77 deletions

View File

@@ -56,9 +56,26 @@ Setting this option to 0 bytes will cause the core dump routines to run from the
.. note::
If a separate stack is used, the recommended stack size should be larger than 800 bytes to ensure that the core dump routines themselves do not cause a stack overflow.
If a separate stack is used, the recommended stack size should be larger than 1300 bytes to ensure that the core dump routines themselves do not cause a stack overflow.
Core Dump Memory Regions
^^^^^^^^^^^^^^^^^^^^^^^^
By default, core dumps typically save CPU registers, tasks data and summary of the panic reason. When the :ref:`CONFIG_ESP_COREDUMP_CAPTURE_DRAM` option is selected, ``.bss`` and ``.data`` sections and ``heap`` data will also be part of the dump.
For a better debugging experience, it is recommended to dump these sections. However, this will result in a larger coredump file. The required additional storage space may vary based on the amount of DRAM the application uses.
.. note::
.. only:: SOC_SPIRAM_SUPPORTED
Apart from the crashed task's TCB and stack, data located in the external RAM will not be stored in the core dump file, this include variables defined with ``EXT_RAM_BSS_ATTR`` or ``EXT_RAM_NOINIT_ATTR`` attributes, as well as any data stored in the ``extram_bss`` section.
.. note::
This feature is only enabled when using the ELF file format.
Core Dump to Flash
------------------