kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'feature/separate_xtensa_from_esp32' into 'master'
separate xtensa from esp32 See merge request idf/esp-idf!4625pull/3236/head
commit
85fb54a501
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
#
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -22,6 +22,8 @@ INCLUDE_DIRS := \
|
|||
) \
|
||||
$(addprefix ../../../components/, \
|
||||
esp_rom/include \
|
||||
xtensa/include \
|
||||
xtensa/esp32/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
esp_common/include \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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()
|
|
@ -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
|
|
@ -1,4 +0,0 @@
|
|||
[mapping]
|
||||
archive: libxtensa-debug-module.a
|
||||
entries:
|
||||
eri (noflash_text)
|
|
@ -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()
|
|
@ -0,0 +1,4 @@
|
|||
COMPONENT_ADD_INCLUDEDIRS := include esp32/include
|
||||
|
||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||
|
|
@ -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: */
|
|
@ -0,0 +1,4 @@
|
|||
[mapping]
|
||||
archive: libxtensa.a
|
||||
entries:
|
||||
eri (noflash_text)
|
|
@ -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\
|
||||
|
|
|
@ -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}")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue