diff --git a/components/esp32c3/CMakeLists.txt b/components/esp32c3/CMakeLists.txt index a785c520dc..1d00a870ee 100644 --- a/components/esp32c3/CMakeLists.txt +++ b/components/esp32c3/CMakeLists.txt @@ -14,8 +14,7 @@ else() set(srcs "dport_access.c" "esp_hmac.c" "esp_ds.c" - "esp_crypto_lock.c" - "memprot.c") + "esp_crypto_lock.c") set(include_dirs "include") set(requires driver efuse soc riscv) #unfortunately rom/uart uses SOC registers directly diff --git a/components/esp32s2/CMakeLists.txt b/components/esp32s2/CMakeLists.txt index 737d0ed696..209579c67b 100644 --- a/components/esp32s2/CMakeLists.txt +++ b/components/esp32s2/CMakeLists.txt @@ -11,8 +11,7 @@ if(BOOTLOADER_BUILD) else() # Regular app build - set(srcs "memprot.c" - "dport_access.c" + set(srcs "dport_access.c" "spiram.c" "spiram_psram.c" "esp_crypto_lock.c" diff --git a/components/esp32s3/CMakeLists.txt b/components/esp32s3/CMakeLists.txt index bf3205df54..f4a19a15da 100644 --- a/components/esp32s3/CMakeLists.txt +++ b/components/esp32s3/CMakeLists.txt @@ -14,7 +14,6 @@ else() set(srcs "dport_access.c" "esp_crypto_lock.c" - "memprot.c" "spiram.c" "spi_timing_config.c") set(include_dirs "include") diff --git a/components/esp32c3/include/esp32c3/memprot.h b/components/esp_hw_support/include/soc/esp32c3/memprot.h similarity index 99% rename from components/esp32c3/include/esp32c3/memprot.h rename to components/esp_hw_support/include/soc/esp32c3/memprot.h index 094f28f42e..0d7e6ca40d 100644 --- a/components/esp32c3/include/esp32c3/memprot.h +++ b/components/esp_hw_support/include/soc/esp32c3/memprot.h @@ -20,6 +20,8 @@ #pragma once #include +#include + #include "esp_attr.h" #ifdef __cplusplus diff --git a/components/esp32s2/include/esp32s2/memprot.h b/components/esp_hw_support/include/soc/esp32s2/memprot.h similarity index 100% rename from components/esp32s2/include/esp32s2/memprot.h rename to components/esp_hw_support/include/soc/esp32s2/memprot.h diff --git a/components/esp32s3/include/esp32s3/memprot.h b/components/esp_hw_support/include/soc/esp32s3/memprot.h similarity index 100% rename from components/esp32s3/include/esp32s3/memprot.h rename to components/esp_hw_support/include/soc/esp32s3/memprot.h diff --git a/components/esp_hw_support/port/esp32c3/CMakeLists.txt b/components/esp_hw_support/port/esp32c3/CMakeLists.txt index 3738e9b305..0bde69c4b8 100644 --- a/components/esp_hw_support/port/esp32c3/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32c3/CMakeLists.txt @@ -9,7 +9,7 @@ set(srcs "cpu_util_esp32c3.c" ) if(NOT BOOTLOADER_BUILD) - list(APPEND srcs "../async_memcpy_impl_gdma.c") + list(APPEND srcs "../async_memcpy_impl_gdma.c" "memprot.c") endif() add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") diff --git a/components/esp32c3/memprot.c b/components/esp_hw_support/port/esp32c3/memprot.c similarity index 100% rename from components/esp32c3/memprot.c rename to components/esp_hw_support/port/esp32c3/memprot.c diff --git a/components/esp_hw_support/port/esp32s2/CMakeLists.txt b/components/esp_hw_support/port/esp32s2/CMakeLists.txt index bd63e46898..2f46610a4b 100644 --- a/components/esp_hw_support/port/esp32s2/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32s2/CMakeLists.txt @@ -14,7 +14,7 @@ set(srcs ) if(NOT BOOTLOADER_BUILD) - list(APPEND srcs "async_memcpy_impl_cp_dma.c") + list(APPEND srcs "async_memcpy_impl_cp_dma.c" "memprot.c") endif() add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") diff --git a/components/esp32s2/memprot.c b/components/esp_hw_support/port/esp32s2/memprot.c similarity index 100% rename from components/esp32s2/memprot.c rename to components/esp_hw_support/port/esp32s2/memprot.c diff --git a/components/esp_hw_support/port/esp32s3/CMakeLists.txt b/components/esp_hw_support/port/esp32s3/CMakeLists.txt index 740c693562..b698f0b02e 100644 --- a/components/esp_hw_support/port/esp32s3/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32s3/CMakeLists.txt @@ -13,7 +13,7 @@ set(srcs ) if(NOT BOOTLOADER_BUILD) - list(APPEND srcs "../async_memcpy_impl_gdma.c") + list(APPEND srcs "../async_memcpy_impl_gdma.c" "memprot.c") endif() add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") diff --git a/components/esp32s3/memprot.c b/components/esp_hw_support/port/esp32s3/memprot.c similarity index 100% rename from components/esp32s3/memprot.c rename to components/esp_hw_support/port/esp32s3/memprot.c