kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'fix_coredump_build_error' into 'master'
Fix coredump build error Closes IDFGH-12547 See merge request espressif/esp-idf!30099pull/13660/head
commit
0da5dae9a6
|
@ -70,13 +70,13 @@ FORCE_INLINE_ATTR void esp_core_dump_setup_stack(void)
|
|||
s_core_dump_sp = (uint8_t *)((uint32_t)(s_coredump_stack + ESP_COREDUMP_STACK_SIZE - 1) & ~0xf);
|
||||
memset(s_coredump_stack, COREDUMP_STACK_FILL_BYTE, ESP_COREDUMP_STACK_SIZE);
|
||||
|
||||
/* watchpoint 1 can be used for task stack overflow detection, re-use it, it is no more necessary */
|
||||
/* watchpoint 1 can be used for task stack overflow detection, reuse it, it is no more necessary */
|
||||
//esp_cpu_clear_watchpoint(1);
|
||||
//esp_cpu_set_watchpoint(1, s_coredump_stack, 1, ESP_WATCHPOINT_STORE);
|
||||
|
||||
#if CONFIG_ESP_SYSTEM_HW_STACK_GUARD
|
||||
/* Save the current area we are watching to restore it later */
|
||||
esp_hw_stack_guard_get_bounds(&s_stack_context.sp_min, &s_stack_context.sp_max);
|
||||
esp_hw_stack_guard_get_bounds(xPortGetCoreID(), &s_stack_context.sp_min, &s_stack_context.sp_max);
|
||||
/* Since the stack is going to change, make sure we disable protection or an exception would be triggered */
|
||||
esp_hw_stack_guard_monitor_stop();
|
||||
#endif // CONFIG_ESP_SYSTEM_HW_STACK_GUARD
|
||||
|
|
|
@ -9,37 +9,50 @@ import pexpect
|
|||
import pytest
|
||||
from test_panic_util import PanicTestDut
|
||||
|
||||
# Markers for all the targets this test currently runs on
|
||||
TARGETS_TESTED = [
|
||||
pytest.mark.esp32,
|
||||
TARGETS_XTENSA_SINGLE_CORE = [
|
||||
pytest.mark.esp32s2,
|
||||
pytest.mark.esp32c3,
|
||||
]
|
||||
|
||||
TARGETS_XTENSA_DUAL_CORE = [
|
||||
pytest.mark.esp32,
|
||||
pytest.mark.esp32s3,
|
||||
]
|
||||
|
||||
TARGETS_XTENSA = TARGETS_XTENSA_SINGLE_CORE + TARGETS_XTENSA_DUAL_CORE
|
||||
|
||||
TARGETS_RISCV_SINGLE_CORE = [
|
||||
pytest.mark.esp32c2,
|
||||
pytest.mark.esp32c3,
|
||||
pytest.mark.esp32c6,
|
||||
pytest.mark.esp32h2,
|
||||
]
|
||||
|
||||
TARGETS_RISCV_DUAL_CORE = [
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
|
||||
TARGETS_RISCV = TARGETS_RISCV_SINGLE_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
|
||||
# Markers for all the targets this test currently runs on
|
||||
TARGETS_ALL = TARGETS_XTENSA + TARGETS_RISCV
|
||||
|
||||
# Some tests only run on dual-core targets, they use the config below.
|
||||
TARGETS_DUAL_CORE = TARGETS_XTENSA_DUAL_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
|
||||
# Most tests run on all targets and with all configs.
|
||||
# This list is passed to @pytest.mark.parametrize for each of the test cases.
|
||||
# It creates an outer product of the sets: [configs] x [targets],
|
||||
# with some exceptions.
|
||||
CONFIGS = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('gdbstub', marks=TARGETS_TESTED),
|
||||
pytest.param('panic', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_flash_custom_stack', marks=TARGETS_RISCV),
|
||||
pytest.param('gdbstub', marks=TARGETS_ALL),
|
||||
pytest.param('panic', marks=TARGETS_ALL),
|
||||
]
|
||||
|
||||
# Some tests only run on dual-core targets, they use the config below.
|
||||
TARGETS_DUAL_CORE = [
|
||||
pytest.mark.esp32,
|
||||
pytest.mark.esp32s3,
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
CONFIGS_DUAL_CORE = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_DUAL_CORE),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_DUAL_CORE),
|
||||
|
@ -60,28 +73,20 @@ CONFIGS_EXTRAM_STACK = [
|
|||
pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32s3, pytest.mark.quad_psram]),
|
||||
]
|
||||
|
||||
TARGETS_HW_STACK_GUARD = [
|
||||
pytest.mark.esp32c2,
|
||||
pytest.mark.esp32c3,
|
||||
pytest.mark.esp32c6,
|
||||
pytest.mark.esp32h2,
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
|
||||
CONFIGS_HW_STACK_GUARD = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('gdbstub', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('panic', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('gdbstub', marks=TARGETS_RISCV),
|
||||
pytest.param('panic', marks=TARGETS_RISCV),
|
||||
]
|
||||
|
||||
CONFIGS_HW_STACK_GUARD_DUAL_CORE = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_uart_bin_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_uart_elf_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('gdbstub', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('panic', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('gdbstub', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('panic', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
]
|
||||
|
||||
# Panic abort information will start with this string.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
|
||||
CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y
|
||||
CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
||||
CONFIG_ESP_COREDUMP_STACK_SIZE=2048
|
|
@ -140,6 +140,7 @@ class PanicTestDut(IdfDut):
|
|||
espcoredump_args = [
|
||||
sys.executable,
|
||||
espcoredump_script,
|
||||
'-b115200',
|
||||
'info_corefile',
|
||||
'--core',
|
||||
coredump_file_name,
|
||||
|
|
Ładowanie…
Reference in New Issue