fix(psram): fixed psram ptr check under xip_psram condition

Closes https://github.com/espressif/esp-idf/pull/15999
Closes https://github.com/espressif/esp-idf/issues/15997
This commit is contained in:
armando
2025-06-09 10:34:11 +08:00
parent c5e02f95dd
commit 70fe58d935
5 changed files with 50 additions and 42 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -140,6 +140,18 @@ TEST_CASE("test spi1 flash operation after putting .text and .rodata into psram"
TEST_ESP_OK(gptimer_disable(gptimer));
TEST_ESP_OK(gptimer_del_timer(gptimer));
}
TEST_CASE("test esp_psram_check_ptr_addr with xip rodata and instruction region", "[psram]")
{
bool on_psram = false;
on_psram = esp_psram_check_ptr_addr(s_get_partition);
TEST_ASSERT(on_psram);
on_psram = esp_psram_check_ptr_addr(s_test_buf);
TEST_ASSERT(on_psram);
}
#endif //CONFIG_SPIRAM_FETCH_INSTRUCTIONS && CONFIG_SPIRAM_RODATA
TEST_CASE("test psram unaligned access", "[psram]")