From 2fb4c6771a266d13630c4f46040f08cbe53e86ca Mon Sep 17 00:00:00 2001 From: Chen Jichang Date: Wed, 11 Jun 2025 15:13:13 +0800 Subject: [PATCH] test(pcnt): with malloc comes from PSRAM by default --- .../esp_driver_pcnt/test_apps/pulse_cnt/main/CMakeLists.txt | 2 +- .../test_apps/pulse_cnt/sdkconfig.defaults.esp32p4 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 components/esp_driver_pcnt/test_apps/pulse_cnt/sdkconfig.defaults.esp32p4 diff --git a/components/esp_driver_pcnt/test_apps/pulse_cnt/main/CMakeLists.txt b/components/esp_driver_pcnt/test_apps/pulse_cnt/main/CMakeLists.txt index 043307bcb3..46cef03b9a 100644 --- a/components/esp_driver_pcnt/test_apps/pulse_cnt/main/CMakeLists.txt +++ b/components/esp_driver_pcnt/test_apps/pulse_cnt/main/CMakeLists.txt @@ -13,5 +13,5 @@ endif() # In order for the cases defined by `TEST_CASE` to be linked into the final elf, # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} - PRIV_REQUIRES unity esp_driver_pcnt esp_driver_gpio spi_flash + PRIV_REQUIRES unity esp_driver_pcnt esp_driver_gpio spi_flash esp_psram WHOLE_ARCHIVE) diff --git a/components/esp_driver_pcnt/test_apps/pulse_cnt/sdkconfig.defaults.esp32p4 b/components/esp_driver_pcnt/test_apps/pulse_cnt/sdkconfig.defaults.esp32p4 new file mode 100644 index 0000000000..d2699b2221 --- /dev/null +++ b/components/esp_driver_pcnt/test_apps/pulse_cnt/sdkconfig.defaults.esp32p4 @@ -0,0 +1,3 @@ +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_HEX=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0