default 0x4000 if MEMMAP_TRACEMEM && !MEMMAP_TRACEMEM_TWOBANKS
default 0x0
+menu "Core dump"
+
choice ESP32_COREDUMP_TO_FLASH_OR_UART
- prompt "Core dump destination"
+ prompt "Data destination"
default ESP32_ENABLE_COREDUMP_TO_NONE
help
Select place to store core dump: flash, uart or none (to disable core dumps generation).
help
Enables/disable core dump module.
+config ESP32_CORE_DUMP_MAX_TASKS_NUM
+ int "Maximum number of tasks"
+ depends on ESP32_ENABLE_COREDUMP
+ default 64
+ help
+ Maximum number of tasks snapshots in core dump.
+
config ESP32_CORE_DUMP_UART_DELAY
- int "Core dump print to UART delay"
+ int "Delay before print to UART"
depends on ESP32_ENABLE_COREDUMP_TO_UART
default 0
help
Config delay (in ms) before printing core dump to UART.
Delay can be interrupted by pressing Enter key.
+endmenu
+
choice NUMBER_OF_UNIVERSAL_MAC_ADDRESS
bool "Number of universally administered (by IEEE) MAC address"
default FOUR_UNIVERSAL_MAC_ADDRESS
#define ESP_COREDUMP_LOG_PROCESS( format, ... ) do{/*(__VA_ARGS__);*/}while(0)
#endif
-// TODO: allow user to set this in menuconfig or get tasks iteratively
-#define COREDUMP_MAX_TASKS_NUM 32
#define COREDUMP_MAX_TASK_STACK_SIZE (64*1024)
{
int cur_task_bad = 0;
esp_err_t err;
- TaskSnapshot_t tasks[COREDUMP_MAX_TASKS_NUM];
+ TaskSnapshot_t tasks[CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM];
UBaseType_t tcb_sz, tcb_sz_padded, task_num;
uint32_t data_len = 0, i, len;
union
core_dump_task_header_t task_hdr;
} dump_data;
- task_num = uxTaskGetSnapshotAll(tasks, COREDUMP_MAX_TASKS_NUM, &tcb_sz);
+ task_num = uxTaskGetSnapshotAll(tasks, CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM, &tcb_sz);
// take TCB padding into account, actual TCB size will be stored in header
if (tcb_sz % sizeof(uint32_t))
tcb_sz_padded = (tcb_sz / sizeof(uint32_t) + 1) * sizeof(uint32_t);
There are a number of core dump related configuration options which user can choose in configuration menu of the application (`make menuconfig`).
-1. Core dump data destination (`Components -> ESP32-specific config -> Core dump destination`):
+1. Core dump data destination (`Components -> ESP32-specific config -> Core dump -> Data destination`):
* Disable core dump generation
* Save core dump to flash
* Print core dump to UART
-2. Delay before core dump will be printed to UART (`Components -> ESP32-specific config -> Core dump print to UART delay`). Value is in ms.
+2. Maximum number of tasks snapshots in core dump (`Components -> ESP32-specific config -> Core dump -> Maximum number of tasks`).
+
+3. Delay before core dump is printed to UART (`Components -> ESP32-specific config -> Core dump -> Delay before print to UART`). Value is in ms.
Save core dump to flash