]> granicus.if.org Git - esp-idf/commitdiff
create xtensa component
authormorris <maoshengrong@espressif.com>
Mon, 25 Mar 2019 13:11:53 +0000 (21:11 +0800)
committersuda-morris <362953310@qq.com>
Wed, 27 Mar 2019 12:24:28 +0000 (20:24 +0800)
1. move xtensa specific files out of esp32 component
2. merge xtensa-debug-module component into xtensa

49 files changed:
components/app_trace/CMakeLists.txt
components/bootloader/subproject/CMakeLists.txt
components/bootloader/subproject/Makefile
components/esp32/CMakeLists.txt
components/esp_common/CMakeLists.txt
components/fatfs/test_fatfs_host/Makefile.files
components/lwip/test_afl_host/Makefile
components/soc/CMakeLists.txt
components/spi_flash/sim/Makefile.files
components/spi_flash/sim/stubs/Makefile.files
components/spiffs/test_spiffs_host/Makefile.files
components/wear_levelling/test_wl_host/Makefile.files
components/xtensa-debug-module/CMakeLists.txt [deleted file]
components/xtensa-debug-module/component.mk [deleted file]
components/xtensa-debug-module/linker.lf [deleted file]
components/xtensa/CMakeLists.txt [new file with mode: 0644]
components/xtensa/component.mk [new file with mode: 0644]
components/xtensa/eri.c [moved from components/xtensa-debug-module/eri.c with 100% similarity]
components/xtensa/esp32/include/xtensa/config/core-isa.h [moved from components/esp32/include/xtensa/config/core-isa.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/core-matmap.h [moved from components/esp32/include/xtensa/config/core-matmap.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/core.h [moved from components/esp32/include/xtensa/config/core.h with 99% similarity]
components/xtensa/esp32/include/xtensa/config/defs.h [moved from components/esp32/include/xtensa/config/defs.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/specreg.h [moved from components/esp32/include/xtensa/config/specreg.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/system.h [moved from components/esp32/include/xtensa/config/system.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/tie-asm.h [moved from components/esp32/include/xtensa/config/tie-asm.h with 100% similarity]
components/xtensa/esp32/include/xtensa/config/tie.h [moved from components/esp32/include/xtensa/config/tie.h with 100% similarity]
components/xtensa/include/eri.h [moved from components/xtensa-debug-module/include/eri.h with 100% similarity]
components/xtensa/include/trax.h [moved from components/xtensa-debug-module/include/trax.h with 100% similarity]
components/xtensa/include/xtensa-debug-module.h [moved from components/xtensa-debug-module/include/xtensa-debug-module.h with 100% similarity]
components/xtensa/include/xtensa/cacheasm.h [moved from components/esp32/include/xtensa/cacheasm.h with 100% similarity]
components/xtensa/include/xtensa/cacheattrasm.h [moved from components/esp32/include/xtensa/cacheattrasm.h with 100% similarity]
components/xtensa/include/xtensa/core-macros.h [moved from components/esp32/include/xtensa/core-macros.h with 100% similarity]
components/xtensa/include/xtensa/coreasm.h [moved from components/esp32/include/xtensa/coreasm.h with 100% similarity]
components/xtensa/include/xtensa/corebits.h [moved from components/esp32/include/xtensa/corebits.h with 100% similarity]
components/xtensa/include/xtensa/hal.h [moved from components/esp32/include/xtensa/hal.h with 100% similarity]
components/xtensa/include/xtensa/specreg.h [moved from components/esp32/include/xtensa/specreg.h with 100% similarity]
components/xtensa/include/xtensa/traxreg.h [moved from components/esp32/include/xtensa/traxreg.h with 100% similarity]
components/xtensa/include/xtensa/xdm-regs.h [moved from components/esp32/include/xtensa/xdm-regs.h with 100% similarity]
components/xtensa/include/xtensa/xt_perf_consts.h [moved from components/esp32/include/xtensa/xt_perf_consts.h with 100% similarity]
components/xtensa/include/xtensa/xtensa-libdb-macros.h [moved from components/esp32/include/xtensa/xtensa-libdb-macros.h with 100% similarity]
components/xtensa/include/xtensa/xtensa-versions.h [moved from components/esp32/include/xtensa/xtensa-versions.h with 100% similarity]
components/xtensa/include/xtensa/xtensa-xer.h [moved from components/esp32/include/xtensa/xtensa-xer.h with 100% similarity]
components/xtensa/include/xtensa/xtruntime-core-state.h [moved from components/esp32/include/xtensa/xtruntime-core-state.h with 100% similarity]
components/xtensa/include/xtensa/xtruntime-frames.h [moved from components/esp32/include/xtensa/xtruntime-frames.h with 100% similarity]
components/xtensa/include/xtensa/xtruntime.h [moved from components/esp32/include/xtensa/xtruntime.h with 100% similarity]
components/xtensa/linker.lf [new file with mode: 0644]
components/xtensa/trax.c [moved from components/xtensa-debug-module/trax.c with 100% similarity]
tools/ci/test_build_system_cmake.sh
tools/cmake/idf_functions.cmake

index bc8d7b8476685d585212e83a490d76a95487aaad..c1b3537ca694b4fafd1f0e0cfca3cfc9851f5fd9 100644 (file)
@@ -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()
index e116b28bb5a96ecbc3e4c518b8b87516e9af785a..e576ccc1557ff68553c148709f62adb194496641 100644 (file)
@@ -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)
index ce959428440265d463de8806c8809b24e37e4a92..33ab19c6e34e21e16e6b7a841fee3ef21ae21182 100644 (file)
@@ -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.
 #
index 97f73dcacd172c92551463b224350aa12c5c605f..5b418269da07a4f063395a2f9b034820d8cedbca 100644 (file)
@@ -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)
 
index 88dfee3c31441bb27091a88013f4244ed7295a3b..df3501ff30ce44c61e4db40760e4b1329f65fbda 100644 (file)
@@ -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(
index a619c262287f3e3022def956b495a2d0e087975a..a56c5b1f09a74f7ae40c68642a703cd36051efdf 100644 (file)
@@ -22,6 +22,8 @@ INCLUDE_DIRS := \
        ) \
        $(addprefix ../../../components/, \
        esp_rom/include \
+       xtensa/include \
+       xtensa/esp32/include \
        soc/esp32/include \
        esp32/include \
        esp_common/include \
index e98c37537bafce79c836eb738de98e88aec30cf5..d31858417dc7536d23e27b24e6ced1dd8199e158 100644 (file)
@@ -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
index 89191cb66f0533028f6b57ed116585ed0e5097fb..ec532ad8723141ddd4ea04286c44483f07c04845 100644 (file)
@@ -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()
index 653b61d99b2896176e324ca3df6ec9c59888a135..44e0977185e1f719d652332dd015649554356869 100644 (file)
@@ -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 \
index d987631bebf63515eefdc0572f5f20385092a517..50aecd3d8b6d26061869473be7096258c9252817 100644 (file)
@@ -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 \
index 27d2b9dff69c3f09d943fe602cce5eca9e44a387..8b65de0f8107ee5320153629eeede6f583368a9d 100644 (file)
@@ -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 \
index 5b0cbc9d26e6e7dac43bfb69ae7912bd088e9f3c..87ef34ad39e1d01f67b8c8f9181ceb7f3a942de7 100644 (file)
@@ -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 (file)
index d485366..0000000
+++ /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 (file)
index 5d39676..0000000
+++ /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 (file)
index 44dea62..0000000
+++ /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 (file)
index 0000000..09dd93c
--- /dev/null
@@ -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 (file)
index 0000000..69e9ad2
--- /dev/null
@@ -0,0 +1,4 @@
+COMPONENT_ADD_INCLUDEDIRS := include esp32/include
+
+COMPONENT_ADD_LDFRAGMENTS += linker.lf
+
similarity index 99%
rename from components/esp32/include/xtensa/config/core.h
rename to components/xtensa/esp32/include/xtensa/config/core.h
index 0204757b0557fa7186e36a0aef6e34dbcc6acf6a..f8c39fa0e6fa0ed2463db1e6aff138cece8d96fd 100644 (file)
@@ -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 <xtensa/hal.h>
 #include <xtensa/xtensa-versions.h>
 #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/xtensa/linker.lf b/components/xtensa/linker.lf
new file mode 100644 (file)
index 0000000..6486410
--- /dev/null
@@ -0,0 +1,4 @@
+[mapping]
+archive: libxtensa.a
+entries:
+    eri (noflash_text)
index 7913da33a51ff21f2b9563f9724c3e12ce163aeb..6dc10abca675c1edbfde10359c1b86bc34b9a1eb 100755 (executable)
@@ -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\
index c2e694e43ab8edfc5da6ae60dedd0878d98893fd..a2412426e537f4910896eda1029ea34fc671aee8 100644 (file)
@@ -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}")