From 4ebad0a47dbbdf80aed87666d53520a856724a5d Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Thu, 20 Nov 2025 15:36:26 +0800 Subject: [PATCH] fix(rom): fixed systimer hal implementation from ROM always being used on P4 --- .../esp32h4/ld/esp32h4.rom.beta5.systimer.ld | 6 +++-- .../esp32h4/ld/esp32h4.rom.systimer.ld | 6 +++-- .../esp_rom/esp32p4/ld/esp32p4.rom.eco5.ld | 22 ------------------- .../esp_rom/test_apps/.build-test-rules.yml | 4 ---- .../pytest_esp_rom_impl_components.py | 1 - 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/components/esp_rom/esp32h4/ld/esp32h4.rom.beta5.systimer.ld b/components/esp_rom/esp32h4/ld/esp32h4.rom.beta5.systimer.ld index 56bb8115ca..9b884abe8a 100644 --- a/components/esp_rom/esp32h4/ld/esp32h4.rom.beta5.systimer.ld +++ b/components/esp_rom/esp32h4/ld/esp32h4.rom.beta5.systimer.ld @@ -9,8 +9,10 @@ ***************************************/ /* Functions */ -systimer_hal_init = 0x4000039c; -systimer_hal_deinit = 0x400003a0; +/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */ +/* systimer_hal_init = 0x4000039c; */ +/* systimer_hal_deinit = 0x400003a0; */ + systimer_hal_set_tick_rate_ops = 0x400003a4; systimer_hal_get_counter_value = 0x400003a8; systimer_hal_get_time = 0x400003ac; diff --git a/components/esp_rom/esp32h4/ld/esp32h4.rom.systimer.ld b/components/esp_rom/esp32h4/ld/esp32h4.rom.systimer.ld index cb52df3d64..e54ac9e4e6 100644 --- a/components/esp_rom/esp32h4/ld/esp32h4.rom.systimer.ld +++ b/components/esp_rom/esp32h4/ld/esp32h4.rom.systimer.ld @@ -18,8 +18,10 @@ ***************************************/ /* Functions */ -systimer_hal_init = 0x4000036c; -systimer_hal_deinit = 0x40000370; +/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */ +/* systimer_hal_init = 0x4000036c; */ +/* systimer_hal_deinit = 0x40000370; */ + systimer_hal_set_tick_rate_ops = 0x40000374; systimer_hal_get_counter_value = 0x40000378; systimer_hal_get_time = 0x4000037c; diff --git a/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.ld b/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.ld index 9a7b75a27e..eb227ead1d 100644 --- a/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.ld +++ b/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.ld @@ -170,28 +170,6 @@ rom_spiflash_legacy_data = 0x4ffbffe8; g_flash_guard_ops = 0x4ffbfff0; -/*************************************** - Group hal_systimer - ***************************************/ - -/* Functions */ -systimer_hal_init = 0x4fc00228; -systimer_hal_deinit = 0x4fc0022c; -systimer_hal_set_tick_rate_ops = 0x4fc00230; -systimer_hal_get_counter_value = 0x4fc00234; -systimer_hal_get_time = 0x4fc00238; -systimer_hal_set_alarm_target = 0x4fc0023c; -systimer_hal_set_alarm_period = 0x4fc00240; -systimer_hal_get_alarm_value = 0x4fc00244; -systimer_hal_enable_alarm_int = 0x4fc00248; -systimer_hal_on_apb_freq_update = 0x4fc0024c; -systimer_hal_counter_value_advance = 0x4fc00250; -systimer_hal_enable_counter = 0x4fc00254; -systimer_hal_select_alarm_mode = 0x4fc00258; -systimer_hal_connect_alarm_counter = 0x4fc0025c; -systimer_hal_counter_can_stall_by_cpu = 0x4fc00260; - - /*************************************** Group cache ***************************************/ diff --git a/components/esp_rom/test_apps/.build-test-rules.yml b/components/esp_rom/test_apps/.build-test-rules.yml index 8365d06340..7d6745313d 100644 --- a/components/esp_rom/test_apps/.build-test-rules.yml +++ b/components/esp_rom/test_apps/.build-test-rules.yml @@ -10,10 +10,6 @@ components/esp_rom/test_apps/rom_impl_components: - if: CONFIG_NAME == "rom_impl_components" and ((ESP_ROM_HAS_HAL_WDT != 1 and ESP_ROM_HAS_HAL_SYSTIMER != 1) and (ESP_ROM_HAS_HEAP_TLSF != 1 and ESP_ROM_HAS_SPI_FLASH != 1)) - if: CONFIG_NAME == "no_rom_impl_components" and ((ESP_ROM_HAS_HAL_WDT != 1 and ESP_ROM_HAS_HAL_SYSTIMER != 1) and (ESP_ROM_HAS_HEAP_TLSF != 1 and ESP_ROM_HAS_SPI_FLASH != 1)) - if: SOC_WDT_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: p4 rev3 migration # TODO: IDF-14417 components/esp_rom/test_apps/rom_tests: disable_test: diff --git a/components/esp_rom/test_apps/rom_impl_components/pytest_esp_rom_impl_components.py b/components/esp_rom/test_apps/rom_impl_components/pytest_esp_rom_impl_components.py index be167655ba..4efbe677c0 100644 --- a/components/esp_rom/test_apps/rom_impl_components/pytest_esp_rom_impl_components.py +++ b/components/esp_rom/test_apps/rom_impl_components/pytest_esp_rom_impl_components.py @@ -15,6 +15,5 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14417') def test_esp_rom_impl_components(dut: Dut) -> None: dut.run_all_single_board_cases()