Files
morrisandCursor 2972e03b3f fix(mspi): drop per-sample debug log in PSRAM DQS delayline tuning
PSRAM DQS delayline tuning calls mspi_timing_config_psram_set_tuning_delayline()
once per sample (~3100 times on ESP32-P4). A DEBUG print there blocks on UART
long enough to trip the bootloader RTC WDT (default 9s), so DEBUG builds
reset-loop and never reach app_main().

Remove that per-sample log. The selected phase is already reported once by
the phase-tuning stage. Add a startup test config that boots with SPIRAM
and DEBUG logging.

Closes https://github.com/espressif/esp-idf/issues/19158

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 10:56:07 +08:00

62 lines
1.9 KiB
Python

# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
from pytest_embedded_idf.utils import soc_filtered_targets
@pytest.mark.generic
@idf_parametrize(
'config,target',
[
('flash_80m_qio', 'supported_targets'),
('no_vfs', 'supported_targets'),
('no_vfs_partial', 'supported_targets'),
('opt_o0', 'supported_targets'),
('opt_o2', 'supported_targets'),
('opt_os_lto', 'supported_targets'),
('stack_check_verbose_log', 'supported_targets'),
('sram1_iram', 'esp32'),
('main_task_cpu1', 'esp32'),
('main_task_cpu1', 'esp32s3'),
],
indirect=['config', 'target'],
)
def test_sys_startup(dut: Dut) -> None:
dut.expect_exact('app_main running')
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'single_core_variant',
],
indirect=True,
)
@idf_parametrize('target', ['esp32', 'esp32s3'], indirect=['target'])
def test_sys_startup_single_core_variant(dut: Dut) -> None:
dut.expect('Running on single core variant of a chip, but app is built with multi-core support.')
dut.expect(r'abort\(\) was called at PC [0-9xa-f]+ on core 0')
def get_spiram_debug_log_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
if target == 'esp32s3':
return (pytest.mark.quad_psram,)
elif target == 'esp32':
return (pytest.mark.psram,)
return (pytest.mark.generic,)
@pytest.mark.parametrize(
'config, target',
[
pytest.param('spiram_debug_log', target, marks=get_spiram_debug_log_marks(target))
for target in soc_filtered_targets('SOC_SPIRAM_SUPPORTED == 1')
],
indirect=True,
)
def test_sys_startup_spiram_debug_log(dut: Dut) -> None:
dut.expect_exact('app_main running')