Parcourir la source

feat(tools): Enables unicore_bootloader test for ESP32P4

KonstantinKondrashov il y a 2 ans
Parent
commit
a2802ef121

+ 4 - 6
components/esp_system/port/cpu_start.c

@@ -319,8 +319,7 @@ static void start_other_core(void)
     }
 }
 
-#if !CONFIG_IDF_TARGET_ESP32P4
-//TODO: IDF-7692
+#if !SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
 // This function is needed to make the multicore app runnable on a unicore bootloader (built with FREERTOS UNICORE).
 // It does some cache settings for other CPUs.
 void IRAM_ATTR do_multicore_settings(void)
@@ -351,7 +350,7 @@ void IRAM_ATTR do_multicore_settings(void)
     cache_hal_enable(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
 #endif
 }
-#endif  //#if !CONFIG_IDF_TARGET_ESP32P4
+#endif // !SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
 #endif // !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
 
 /*
@@ -432,11 +431,10 @@ void IRAM_ATTR call_start_cpu0(void)
     ESP_EARLY_LOGI(TAG, "Unicore app");
 #else
     ESP_EARLY_LOGI(TAG, "Multicore app");
-#if !CONFIG_IDF_TARGET_ESP32P4
-    //TODO: IDF-7692
+#if !SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
     // It helps to fix missed cache settings for other cores. It happens when bootloader is unicore.
     do_multicore_settings();
-#endif  //#if !CONFIG_IDF_TARGET_ESP32P4
+#endif // !SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
 #endif
 #endif // !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
 

+ 0 - 4
tools/test_apps/.build-test-rules.yml

@@ -178,7 +178,3 @@ tools/test_apps/system/unicore_bootloader:
   enable:
     - if: SOC_CPU_CORES_NUM > 1
       reason: the test should be run on multicore chips
-  disable:
-    - if: IDF_TARGET in ["esp32p4"] # TODO: IDF-7692
-      temporary: true
-      reason: not supported on esp32p4 yet

+ 2 - 2
tools/test_apps/system/unicore_bootloader/README.md

@@ -1,2 +1,2 @@
-| Supported Targets | ESP32 | ESP32-S3 |
-| ----------------- | ----- | -------- |
+| Supported Targets | ESP32 | ESP32-P4 | ESP32-S3 |
+| ----------------- | ----- | -------- | -------- |

+ 2 - 0
tools/test_apps/system/unicore_bootloader/pytest_unicore_bootloader.py

@@ -9,6 +9,7 @@ from pytest_embedded import Dut
 
 @pytest.mark.esp32
 @pytest.mark.esp32s3
+@pytest.mark.esp32p4
 @pytest.mark.generic
 @pytest.mark.parametrize('config', ['multicore'], indirect=True)
 def test_multicore_app_and_unicore_bootloader(dut: Dut) -> None:
@@ -25,6 +26,7 @@ def test_multicore_app_and_unicore_bootloader(dut: Dut) -> None:
 
 @pytest.mark.esp32
 @pytest.mark.esp32s3
+@pytest.mark.esp32p4
 @pytest.mark.generic
 @pytest.mark.parametrize('config', ['unicore'], indirect=True)
 def test_unicore_app_and_multicore_bootloader(dut: Dut) -> None: