endif()
set(COMPONENT_REQUIRES)
-set(COMPONENT_PRIV_REQUIRES xtensa-debug-module)
+set(COMPONENT_PRIV_REQUIRES)
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
register_component()
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)
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.
#
# 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)
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(
) \
$(addprefix ../../../components/, \
esp_rom/include \
+ xtensa/include \
+ xtensa/esp32/include \
soc/esp32/include \
esp32/include \
esp_common/include \
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
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
-set(COMPONENT_REQUIRES esp_rom)
+set(COMPONENT_REQUIRES)
register_component()
$(addprefix ../../../components/, \
esp_rom/include \
esp_common/include \
+ xtensa/include \
+ xtensa/esp32/include \
soc/esp32/include \
esp32/include \
bootloader_support/include \
$(addprefix ../../../../components/, \
esp_common/include \
soc/esp32/include \
+ xtensa/include \
+ xtensa/esp32/include \
esp32/include \
bootloader_support/include \
app_update/include \
$(addprefix ../../../components/, \
esp_rom/include \
esp_common/include \
+ xtensa/include \
+ xtensa/esp32/include \
soc/esp32/include \
esp32/include \
bootloader_support/include \
$(addprefix ../../../components/, \
esp_rom/include \
esp_common/include \
+ xtensa/include \
+ xtensa/esp32/include \
soc/esp32/include \
esp32/include \
bootloader_support/include \
+++ /dev/null
-set(COMPONENT_SRCS "eri.c"
- "trax.c")
-set(COMPONENT_ADD_INCLUDEDIRS "include")
-
-set(COMPONENT_REQUIRES "")
-
-set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
-
-register_component()
+++ /dev/null
-#
-# Component Makefile
-#
-# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
-COMPONENT_ADD_LDFRAGMENTS += linker.lf
+++ /dev/null
-[mapping]
-archive: libxtensa-debug-module.a
-entries:
- eri (noflash_text)
--- /dev/null
+set(COMPONENT_SRCS "eri.c" "trax.c")
+
+set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include")
+
+set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
+
+register_component()
--- /dev/null
+COMPONENT_ADD_INCLUDEDIRS := include esp32/include
+
+COMPONENT_ADD_LDFRAGMENTS += linker.lf
+
-/*
+/*
* xtensa/config/core.h -- HAL definitions dependent on CORE configuration
*
* This header file is sometimes referred to as the "compile-time HAL" or CHAL.
#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: */
--- /dev/null
+[mapping]
+archive: libxtensa.a
+entries:
+ eri (noflash_text)
# 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\
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}")