From dbdb299bb1cb571787c97951ec4724e02afbf4af Mon Sep 17 00:00:00 2001 From: morris Date: Mon, 25 Mar 2019 21:11:53 +0800 Subject: [PATCH] create xtensa component 1. move xtensa specific files out of esp32 component 2. merge xtensa-debug-module component into xtensa --- components/app_trace/CMakeLists.txt | 2 +- components/bootloader/subproject/CMakeLists.txt | 2 +- components/bootloader/subproject/Makefile | 1 + components/esp32/CMakeLists.txt | 2 +- components/esp_common/CMakeLists.txt | 3 +-- components/fatfs/test_fatfs_host/Makefile.files | 2 ++ components/lwip/test_afl_host/Makefile | 2 +- components/soc/CMakeLists.txt | 2 +- components/spi_flash/sim/Makefile.files | 2 ++ components/spi_flash/sim/stubs/Makefile.files | 2 ++ components/spiffs/test_spiffs_host/Makefile.files | 2 ++ components/wear_levelling/test_wl_host/Makefile.files | 2 ++ components/xtensa-debug-module/CMakeLists.txt | 9 --------- components/xtensa-debug-module/component.mk | 5 ----- components/xtensa-debug-module/linker.lf | 4 ---- components/xtensa/CMakeLists.txt | 7 +++++++ components/xtensa/component.mk | 4 ++++ components/{xtensa-debug-module => xtensa}/eri.c | 0 .../{ => xtensa}/esp32/include/xtensa/config/core-isa.h | 0 .../esp32/include/xtensa/config/core-matmap.h | 0 .../{ => xtensa}/esp32/include/xtensa/config/core.h | 6 +++--- .../{ => xtensa}/esp32/include/xtensa/config/defs.h | 0 .../{ => xtensa}/esp32/include/xtensa/config/specreg.h | 0 .../{ => xtensa}/esp32/include/xtensa/config/system.h | 0 .../{ => xtensa}/esp32/include/xtensa/config/tie-asm.h | 0 .../{ => xtensa}/esp32/include/xtensa/config/tie.h | 0 components/{xtensa-debug-module => xtensa}/include/eri.h | 0 .../{xtensa-debug-module => xtensa}/include/trax.h | 0 .../include/xtensa-debug-module.h | 0 components/{esp32 => xtensa}/include/xtensa/cacheasm.h | 0 .../{esp32 => xtensa}/include/xtensa/cacheattrasm.h | 0 .../{esp32 => xtensa}/include/xtensa/core-macros.h | 0 components/{esp32 => xtensa}/include/xtensa/coreasm.h | 0 components/{esp32 => xtensa}/include/xtensa/corebits.h | 0 components/{esp32 => xtensa}/include/xtensa/hal.h | 0 components/{esp32 => xtensa}/include/xtensa/specreg.h | 0 components/{esp32 => xtensa}/include/xtensa/traxreg.h | 0 components/{esp32 => xtensa}/include/xtensa/xdm-regs.h | 0 .../{esp32 => xtensa}/include/xtensa/xt_perf_consts.h | 0 .../include/xtensa/xtensa-libdb-macros.h | 0 .../{esp32 => xtensa}/include/xtensa/xtensa-versions.h | 0 components/{esp32 => xtensa}/include/xtensa/xtensa-xer.h | 0 .../include/xtensa/xtruntime-core-state.h | 0 .../{esp32 => xtensa}/include/xtensa/xtruntime-frames.h | 0 components/{esp32 => xtensa}/include/xtensa/xtruntime.h | 0 components/xtensa/linker.lf | 4 ++++ components/{xtensa-debug-module => xtensa}/trax.c | 0 tools/ci/test_build_system_cmake.sh | 1 + tools/cmake/idf_functions.cmake | 3 ++- 49 files changed, 38 insertions(+), 29 deletions(-) delete mode 100644 components/xtensa-debug-module/CMakeLists.txt delete mode 100644 components/xtensa-debug-module/component.mk delete mode 100644 components/xtensa-debug-module/linker.lf create mode 100644 components/xtensa/CMakeLists.txt create mode 100644 components/xtensa/component.mk rename components/{xtensa-debug-module => xtensa}/eri.c (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/core-isa.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/core-matmap.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/core.h (99%) rename components/{ => xtensa}/esp32/include/xtensa/config/defs.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/specreg.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/system.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/tie-asm.h (100%) rename components/{ => xtensa}/esp32/include/xtensa/config/tie.h (100%) rename components/{xtensa-debug-module => xtensa}/include/eri.h (100%) rename components/{xtensa-debug-module => xtensa}/include/trax.h (100%) rename components/{xtensa-debug-module => xtensa}/include/xtensa-debug-module.h (100%) rename components/{esp32 => xtensa}/include/xtensa/cacheasm.h (100%) rename components/{esp32 => xtensa}/include/xtensa/cacheattrasm.h (100%) rename components/{esp32 => xtensa}/include/xtensa/core-macros.h (100%) rename components/{esp32 => xtensa}/include/xtensa/coreasm.h (100%) rename components/{esp32 => xtensa}/include/xtensa/corebits.h (100%) rename components/{esp32 => xtensa}/include/xtensa/hal.h (100%) rename components/{esp32 => xtensa}/include/xtensa/specreg.h (100%) rename components/{esp32 => xtensa}/include/xtensa/traxreg.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xdm-regs.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xt_perf_consts.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtensa-libdb-macros.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtensa-versions.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtensa-xer.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtruntime-core-state.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtruntime-frames.h (100%) rename components/{esp32 => xtensa}/include/xtensa/xtruntime.h (100%) create mode 100644 components/xtensa/linker.lf rename components/{xtensa-debug-module => xtensa}/trax.c (100%) diff --git a/components/app_trace/CMakeLists.txt b/components/app_trace/CMakeLists.txt index bc8d7b8476..c1b3537ca6 100644 --- a/components/app_trace/CMakeLists.txt +++ b/components/app_trace/CMakeLists.txt @@ -17,7 +17,7 @@ if(CONFIG_SYSVIEW_ENABLE) endif() set(COMPONENT_REQUIRES) -set(COMPONENT_PRIV_REQUIRES xtensa-debug-module) +set(COMPONENT_PRIV_REQUIRES) set(COMPONENT_ADD_LDFRAGMENTS linker.lf) register_component() diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index e116b28bb5..e576ccc155 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -14,7 +14,7 @@ set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_suppor set(BOOTLOADER_BUILD 1) add_definitions(-DBOOTLOADER_BUILD=1) -set(COMPONENT_REQUIRES_COMMON log esp32 soc esp_rom esp_common) +set(COMPONENT_REQUIRES_COMMON log esp32 soc esp_rom esp_common xtensa) include("${IDF_PATH}/tools/cmake/project.cmake") project(bootloader) diff --git a/components/bootloader/subproject/Makefile b/components/bootloader/subproject/Makefile index ce95942844..33ab19c6e3 100644 --- a/components/bootloader/subproject/Makefile +++ b/components/bootloader/subproject/Makefile @@ -18,6 +18,7 @@ CXXFLAGS = CFLAGS += -I $(IDF_PATH)/components/esp32/include CFLAGS += -I $(IDF_PATH)/components/esp_rom/include CFLAGS += -I $(IDF_PATH)/components/esp_common/include +CFLAGS += -I $(IDF_PATH)/components/xtensa/include -I $(IDF_PATH)/components/xtensa/esp32/include # The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included. # diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index 97f73dcacd..5b418269da 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -48,7 +48,7 @@ else() # app_update is added here because cpu_start.c uses esp_ota_get_app_description() function. set(COMPONENT_PRIV_REQUIRES app_trace app_update bootloader_support log mbedtls nvs_flash - pthread smartconfig_ack spi_flash vfs wpa_supplicant xtensa-debug-module espcoredump esp_common) + pthread smartconfig_ack spi_flash vfs wpa_supplicant espcoredump esp_common) set(COMPONENT_ADD_LDFRAGMENTS linker.lf ld/esp32_fragments.lf) diff --git a/components/esp_common/CMakeLists.txt b/components/esp_common/CMakeLists.txt index 88dfee3c31..df3501ff30 100644 --- a/components/esp_common/CMakeLists.txt +++ b/components/esp_common/CMakeLists.txt @@ -16,8 +16,7 @@ else() set(COMPONENT_ADD_INCLUDEDIRS "include") set(COMPONENT_PRIV_INCLUDEDIRS) set(COMPONENT_REQUIRES) - # dbg_stubs.c needs eri.h from xtensa-debug-module - set(COMPONENT_PRIV_REQUIRES "xtensa-debug-module") + register_component() set_source_files_properties( diff --git a/components/fatfs/test_fatfs_host/Makefile.files b/components/fatfs/test_fatfs_host/Makefile.files index a619c26228..a56c5b1f09 100644 --- a/components/fatfs/test_fatfs_host/Makefile.files +++ b/components/fatfs/test_fatfs_host/Makefile.files @@ -22,6 +22,8 @@ INCLUDE_DIRS := \ ) \ $(addprefix ../../../components/, \ esp_rom/include \ + xtensa/include \ + xtensa/esp32/include \ soc/esp32/include \ esp32/include \ esp_common/include \ diff --git a/components/lwip/test_afl_host/Makefile b/components/lwip/test_afl_host/Makefile index e98c37537b..d31858417d 100644 --- a/components/lwip/test_afl_host/Makefile +++ b/components/lwip/test_afl_host/Makefile @@ -1,7 +1,7 @@ COMPONENTS_DIR=../.. CFLAGS=-std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -nostdlib -Wall -Werror=all -Wno-int-to-pointer-cast -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra \ -Wno-unused-parameter -Wno-sign-compare -Wno-address -Wno-unused-variable -DESP_PLATFORM -D IDF_VER=\"v3.1\" -MMD -MP -DWITH_POSIX -INC_DIRS=-I . -I ./build/config -I $(COMPONENTS_DIR)/newlib/platform_include -I $(COMPONENTS_DIR)/newlib/include -I $(COMPONENTS_DIR)/driver/include -I $(COMPONENTS_DIR)/esp32/include -I $(COMPONENTS_DIR)/ethernet/include -I $(COMPONENTS_DIR)/freertos/include -I $(COMPONENTS_DIR)/heap/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include -I $(COMPONENTS_DIR)/lwip/include/apps -I $(COMPONENTS_DIR)/lwip/lwip/src/include/netif -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/port/esp32/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/include/apps/ping -I $(COMPONENTS_DIR)/soc/esp32/include -I $(COMPONENTS_DIR)/soc/include -I $(COMPONENTS_DIR)/tcpip_adapter/include -I $(COMPONENTS_DIR)/esp_rom/include -I $(COMPONENTS_DIR)/xtensa-debug-module/include +INC_DIRS=-I . -I ./build/config -I $(COMPONENTS_DIR)/newlib/platform_include -I $(COMPONENTS_DIR)/newlib/include -I $(COMPONENTS_DIR)/driver/include -I $(COMPONENTS_DIR)/esp32/include -I $(COMPONENTS_DIR)/ethernet/include -I $(COMPONENTS_DIR)/freertos/include -I $(COMPONENTS_DIR)/heap/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include -I $(COMPONENTS_DIR)/lwip/include/apps -I $(COMPONENTS_DIR)/lwip/lwip/src/include/netif -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/port/esp32/include -I $(COMPONENTS_DIR)/lwip/lwip/src/include/posix -I $(COMPONENTS_DIR)/lwip/include/apps/ping -I $(COMPONENTS_DIR)/soc/esp32/include -I $(COMPONENTS_DIR)/soc/include -I $(COMPONENTS_DIR)/tcpip_adapter/include -I $(COMPONENTS_DIR)/esp_rom/include -I $(COMPONENTS_DIR)/esp_common/include -I $(COMPONENTS_DIR)/xtensa/include TEST_NAME=test FUZZ=afl-fuzz GEN_CFG=generate_config diff --git a/components/soc/CMakeLists.txt b/components/soc/CMakeLists.txt index 89191cb66f..ec532ad872 100644 --- a/components/soc/CMakeLists.txt +++ b/components/soc/CMakeLists.txt @@ -13,6 +13,6 @@ list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c") set(COMPONENT_ADD_LDFRAGMENTS linker.lf) -set(COMPONENT_REQUIRES esp_rom) +set(COMPONENT_REQUIRES) register_component() diff --git a/components/spi_flash/sim/Makefile.files b/components/spi_flash/sim/Makefile.files index 653b61d99b..44e0977185 100644 --- a/components/spi_flash/sim/Makefile.files +++ b/components/spi_flash/sim/Makefile.files @@ -24,6 +24,8 @@ INCLUDE_DIRS := \ $(addprefix ../../../components/, \ esp_rom/include \ esp_common/include \ + xtensa/include \ + xtensa/esp32/include \ soc/esp32/include \ esp32/include \ bootloader_support/include \ diff --git a/components/spi_flash/sim/stubs/Makefile.files b/components/spi_flash/sim/stubs/Makefile.files index d987631beb..50aecd3d8b 100644 --- a/components/spi_flash/sim/stubs/Makefile.files +++ b/components/spi_flash/sim/stubs/Makefile.files @@ -20,6 +20,8 @@ INCLUDE_DIRS := \ $(addprefix ../../../../components/, \ esp_common/include \ soc/esp32/include \ + xtensa/include \ + xtensa/esp32/include \ esp32/include \ bootloader_support/include \ app_update/include \ diff --git a/components/spiffs/test_spiffs_host/Makefile.files b/components/spiffs/test_spiffs_host/Makefile.files index 27d2b9dff6..8b65de0f81 100644 --- a/components/spiffs/test_spiffs_host/Makefile.files +++ b/components/spiffs/test_spiffs_host/Makefile.files @@ -26,6 +26,8 @@ INCLUDE_DIRS := \ $(addprefix ../../../components/, \ esp_rom/include \ esp_common/include \ + xtensa/include \ + xtensa/esp32/include \ soc/esp32/include \ esp32/include \ bootloader_support/include \ diff --git a/components/wear_levelling/test_wl_host/Makefile.files b/components/wear_levelling/test_wl_host/Makefile.files index 5b0cbc9d26..87ef34ad39 100644 --- a/components/wear_levelling/test_wl_host/Makefile.files +++ b/components/wear_levelling/test_wl_host/Makefile.files @@ -25,6 +25,8 @@ INCLUDE_DIRS := \ $(addprefix ../../../components/, \ esp_rom/include \ esp_common/include \ + xtensa/include \ + xtensa/esp32/include \ soc/esp32/include \ esp32/include \ bootloader_support/include \ diff --git a/components/xtensa-debug-module/CMakeLists.txt b/components/xtensa-debug-module/CMakeLists.txt deleted file mode 100644 index d485366ce4..0000000000 --- a/components/xtensa-debug-module/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(COMPONENT_SRCS "eri.c" - "trax.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") - -set(COMPONENT_REQUIRES "") - -set(COMPONENT_ADD_LDFRAGMENTS linker.lf) - -register_component() diff --git a/components/xtensa-debug-module/component.mk b/components/xtensa-debug-module/component.mk deleted file mode 100644 index 5d39676e29..0000000000 --- a/components/xtensa-debug-module/component.mk +++ /dev/null @@ -1,5 +0,0 @@ -# -# Component Makefile -# -# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) -COMPONENT_ADD_LDFRAGMENTS += linker.lf diff --git a/components/xtensa-debug-module/linker.lf b/components/xtensa-debug-module/linker.lf deleted file mode 100644 index 44dea6263d..0000000000 --- a/components/xtensa-debug-module/linker.lf +++ /dev/null @@ -1,4 +0,0 @@ -[mapping] -archive: libxtensa-debug-module.a -entries: - eri (noflash_text) diff --git a/components/xtensa/CMakeLists.txt b/components/xtensa/CMakeLists.txt new file mode 100644 index 0000000000..09dd93c475 --- /dev/null +++ b/components/xtensa/CMakeLists.txt @@ -0,0 +1,7 @@ +set(COMPONENT_SRCS "eri.c" "trax.c") + +set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include") + +set(COMPONENT_ADD_LDFRAGMENTS linker.lf) + +register_component() diff --git a/components/xtensa/component.mk b/components/xtensa/component.mk new file mode 100644 index 0000000000..69e9ad2b4e --- /dev/null +++ b/components/xtensa/component.mk @@ -0,0 +1,4 @@ +COMPONENT_ADD_INCLUDEDIRS := include esp32/include + +COMPONENT_ADD_LDFRAGMENTS += linker.lf + diff --git a/components/xtensa-debug-module/eri.c b/components/xtensa/eri.c similarity index 100% rename from components/xtensa-debug-module/eri.c rename to components/xtensa/eri.c diff --git a/components/esp32/include/xtensa/config/core-isa.h b/components/xtensa/esp32/include/xtensa/config/core-isa.h similarity index 100% rename from components/esp32/include/xtensa/config/core-isa.h rename to components/xtensa/esp32/include/xtensa/config/core-isa.h diff --git a/components/esp32/include/xtensa/config/core-matmap.h b/components/xtensa/esp32/include/xtensa/config/core-matmap.h similarity index 100% rename from components/esp32/include/xtensa/config/core-matmap.h rename to components/xtensa/esp32/include/xtensa/config/core-matmap.h diff --git a/components/esp32/include/xtensa/config/core.h b/components/xtensa/esp32/include/xtensa/config/core.h similarity index 99% rename from components/esp32/include/xtensa/config/core.h rename to components/xtensa/esp32/include/xtensa/config/core.h index 0204757b05..f8c39fa0e6 100644 --- a/components/esp32/include/xtensa/config/core.h +++ b/components/xtensa/esp32/include/xtensa/config/core.h @@ -1,4 +1,4 @@ -/* +/* * xtensa/config/core.h -- HAL definitions dependent on CORE configuration * * This header file is sometimes referred to as the "compile-time HAL" or CHAL. @@ -41,8 +41,8 @@ #include #include #else -#include "../hal.h" -#include "../xtensa-versions.h" +#include "xtensa/hal.h" +#include "xtensa/xtensa-versions.h" #endif /* CONFIGURATION SPECIFIC DEFINITIONS: */ diff --git a/components/esp32/include/xtensa/config/defs.h b/components/xtensa/esp32/include/xtensa/config/defs.h similarity index 100% rename from components/esp32/include/xtensa/config/defs.h rename to components/xtensa/esp32/include/xtensa/config/defs.h diff --git a/components/esp32/include/xtensa/config/specreg.h b/components/xtensa/esp32/include/xtensa/config/specreg.h similarity index 100% rename from components/esp32/include/xtensa/config/specreg.h rename to components/xtensa/esp32/include/xtensa/config/specreg.h diff --git a/components/esp32/include/xtensa/config/system.h b/components/xtensa/esp32/include/xtensa/config/system.h similarity index 100% rename from components/esp32/include/xtensa/config/system.h rename to components/xtensa/esp32/include/xtensa/config/system.h diff --git a/components/esp32/include/xtensa/config/tie-asm.h b/components/xtensa/esp32/include/xtensa/config/tie-asm.h similarity index 100% rename from components/esp32/include/xtensa/config/tie-asm.h rename to components/xtensa/esp32/include/xtensa/config/tie-asm.h diff --git a/components/esp32/include/xtensa/config/tie.h b/components/xtensa/esp32/include/xtensa/config/tie.h similarity index 100% rename from components/esp32/include/xtensa/config/tie.h rename to components/xtensa/esp32/include/xtensa/config/tie.h diff --git a/components/xtensa-debug-module/include/eri.h b/components/xtensa/include/eri.h similarity index 100% rename from components/xtensa-debug-module/include/eri.h rename to components/xtensa/include/eri.h diff --git a/components/xtensa-debug-module/include/trax.h b/components/xtensa/include/trax.h similarity index 100% rename from components/xtensa-debug-module/include/trax.h rename to components/xtensa/include/trax.h diff --git a/components/xtensa-debug-module/include/xtensa-debug-module.h b/components/xtensa/include/xtensa-debug-module.h similarity index 100% rename from components/xtensa-debug-module/include/xtensa-debug-module.h rename to components/xtensa/include/xtensa-debug-module.h diff --git a/components/esp32/include/xtensa/cacheasm.h b/components/xtensa/include/xtensa/cacheasm.h similarity index 100% rename from components/esp32/include/xtensa/cacheasm.h rename to components/xtensa/include/xtensa/cacheasm.h diff --git a/components/esp32/include/xtensa/cacheattrasm.h b/components/xtensa/include/xtensa/cacheattrasm.h similarity index 100% rename from components/esp32/include/xtensa/cacheattrasm.h rename to components/xtensa/include/xtensa/cacheattrasm.h diff --git a/components/esp32/include/xtensa/core-macros.h b/components/xtensa/include/xtensa/core-macros.h similarity index 100% rename from components/esp32/include/xtensa/core-macros.h rename to components/xtensa/include/xtensa/core-macros.h diff --git a/components/esp32/include/xtensa/coreasm.h b/components/xtensa/include/xtensa/coreasm.h similarity index 100% rename from components/esp32/include/xtensa/coreasm.h rename to components/xtensa/include/xtensa/coreasm.h diff --git a/components/esp32/include/xtensa/corebits.h b/components/xtensa/include/xtensa/corebits.h similarity index 100% rename from components/esp32/include/xtensa/corebits.h rename to components/xtensa/include/xtensa/corebits.h diff --git a/components/esp32/include/xtensa/hal.h b/components/xtensa/include/xtensa/hal.h similarity index 100% rename from components/esp32/include/xtensa/hal.h rename to components/xtensa/include/xtensa/hal.h diff --git a/components/esp32/include/xtensa/specreg.h b/components/xtensa/include/xtensa/specreg.h similarity index 100% rename from components/esp32/include/xtensa/specreg.h rename to components/xtensa/include/xtensa/specreg.h diff --git a/components/esp32/include/xtensa/traxreg.h b/components/xtensa/include/xtensa/traxreg.h similarity index 100% rename from components/esp32/include/xtensa/traxreg.h rename to components/xtensa/include/xtensa/traxreg.h diff --git a/components/esp32/include/xtensa/xdm-regs.h b/components/xtensa/include/xtensa/xdm-regs.h similarity index 100% rename from components/esp32/include/xtensa/xdm-regs.h rename to components/xtensa/include/xtensa/xdm-regs.h diff --git a/components/esp32/include/xtensa/xt_perf_consts.h b/components/xtensa/include/xtensa/xt_perf_consts.h similarity index 100% rename from components/esp32/include/xtensa/xt_perf_consts.h rename to components/xtensa/include/xtensa/xt_perf_consts.h diff --git a/components/esp32/include/xtensa/xtensa-libdb-macros.h b/components/xtensa/include/xtensa/xtensa-libdb-macros.h similarity index 100% rename from components/esp32/include/xtensa/xtensa-libdb-macros.h rename to components/xtensa/include/xtensa/xtensa-libdb-macros.h diff --git a/components/esp32/include/xtensa/xtensa-versions.h b/components/xtensa/include/xtensa/xtensa-versions.h similarity index 100% rename from components/esp32/include/xtensa/xtensa-versions.h rename to components/xtensa/include/xtensa/xtensa-versions.h diff --git a/components/esp32/include/xtensa/xtensa-xer.h b/components/xtensa/include/xtensa/xtensa-xer.h similarity index 100% rename from components/esp32/include/xtensa/xtensa-xer.h rename to components/xtensa/include/xtensa/xtensa-xer.h diff --git a/components/esp32/include/xtensa/xtruntime-core-state.h b/components/xtensa/include/xtensa/xtruntime-core-state.h similarity index 100% rename from components/esp32/include/xtensa/xtruntime-core-state.h rename to components/xtensa/include/xtensa/xtruntime-core-state.h diff --git a/components/esp32/include/xtensa/xtruntime-frames.h b/components/xtensa/include/xtensa/xtruntime-frames.h similarity index 100% rename from components/esp32/include/xtensa/xtruntime-frames.h rename to components/xtensa/include/xtensa/xtruntime-frames.h diff --git a/components/esp32/include/xtensa/xtruntime.h b/components/xtensa/include/xtensa/xtruntime.h similarity index 100% rename from components/esp32/include/xtensa/xtruntime.h rename to components/xtensa/include/xtensa/xtruntime.h diff --git a/components/xtensa/linker.lf b/components/xtensa/linker.lf new file mode 100644 index 0000000000..6486410cec --- /dev/null +++ b/components/xtensa/linker.lf @@ -0,0 +1,4 @@ +[mapping] +archive: libxtensa.a +entries: + eri (noflash_text) diff --git a/components/xtensa-debug-module/trax.c b/components/xtensa/trax.c similarity index 100% rename from components/xtensa-debug-module/trax.c rename to components/xtensa/trax.c diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh index 7913da33a5..6dc10abca6 100755 --- a/tools/ci/test_build_system_cmake.sh +++ b/tools/ci/test_build_system_cmake.sh @@ -275,6 +275,7 @@ function run_tests() # Next two tests will use this fake 'esp31b' target export fake_target=esp31b mkdir -p components/$fake_target + mkdir -p ${IDF_PATH}/components/xtensa/$fake_target/include touch components/$fake_target/CMakeLists.txt cp ${IDF_PATH}/tools/cmake/toolchain-esp32.cmake components/$fake_target/toolchain-$fake_target.cmake sed -i.bak '/cmake_minimum_required/ a\ diff --git a/tools/cmake/idf_functions.cmake b/tools/cmake/idf_functions.cmake index c2e694e43a..a2412426e5 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -58,7 +58,8 @@ macro(idf_set_variables) set_default(IDF_COMPONENT_DIRS "${IDF_EXTRA_COMPONENT_DIRS} ${IDF_PATH}/components") set_default(IDF_COMPONENTS "") - set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log soc esp_rom esp_common") + set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log soc \ + esp_rom esp_common xtensa") set(IDF_PROJECT_PATH "${CMAKE_SOURCE_DIR}")