From a86d741fc9e379efc574ac19c8dd45b2f0bcd45e Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 28 Nov 2019 21:10:31 +0800 Subject: [PATCH] esp_rom: remove esp_rom.c --- components/esp_rom/CMakeLists.txt | 14 +++++--------- .../esp_rom/include/esp32s2beta/rom/ets_sys.h | 6 ------ components/esp_rom/include/esp32s2beta/rom/hmac.h | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index bf788dd122..dc067717af 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -1,29 +1,25 @@ idf_build_get_property(target IDF_TARGET) +idf_component_register(INCLUDE_DIRS include) + if(BOOTLOADER_BUILD) - # For bootloader, all we need is headers - idf_component_register(INCLUDE_DIRS include) set(scripts "${target}/ld/${target}.rom.ld" "${target}/ld/${target}.rom.newlib-funcs.ld" "${target}/ld/${target}.rom.libgcc.ld" ) - if (target STREQUAL "esp32s2beta") + if(target STREQUAL "esp32s2beta") list(APPEND scripts "esp32s2beta/ld/esp32s2beta.rom.spiflash.ld") endif() target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}") -else() - # Regular app build - idf_component_register(SRCS "esp_rom.c" - INCLUDE_DIRS include) - +else() # Regular app build set(scripts "${target}/ld/${target}.rom.ld" "${target}/ld/${target}.rom.libgcc.ld" "${target}/ld/${target}.rom.newlib-data.ld") - if (target STREQUAL "esp32") + if(target STREQUAL "esp32") list(APPEND scripts "${target}/ld/${target}.rom.syscalls.ld") if(NOT CONFIG_SPIRAM_CACHE_WORKAROUND) diff --git a/components/esp_rom/include/esp32s2beta/rom/ets_sys.h b/components/esp_rom/include/esp32s2beta/rom/ets_sys.h index f52994ad87..653ca2826c 100644 --- a/components/esp_rom/include/esp32s2beta/rom/ets_sys.h +++ b/components/esp_rom/include/esp32s2beta/rom/ets_sys.h @@ -19,12 +19,6 @@ #include "soc/soc.h" -#include "sdkconfig.h" - -#ifndef CONFIG_IDF_TARGET_ESP32S2BETA -#error "This header should only be included when building for esp32s2beta" -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/components/esp_rom/include/esp32s2beta/rom/hmac.h b/components/esp_rom/include/esp32s2beta/rom/hmac.h index 723769ce27..f5f82d5b23 100644 --- a/components/esp_rom/include/esp32s2beta/rom/hmac.h +++ b/components/esp_rom/include/esp32s2beta/rom/hmac.h @@ -21,7 +21,7 @@ extern "C" { #include #include -#include "rom/efuse.h" +#include "efuse.h" void ets_hmac_enable(void);