mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
move common include files from esp32 into esp_common
This commit is contained in:
parent
9f3b550ff4
commit
a2f07b0806
@ -21,7 +21,7 @@
|
||||
#include "soc/timer_group_struct.h"
|
||||
#include "soc/timer_group_reg.h"
|
||||
#include "esp_app_trace.h"
|
||||
#include "esp_dbg_stubs.h"
|
||||
#include "esp_private/dbg_stubs.h"
|
||||
|
||||
#if CONFIG_ESP32_GCOV_ENABLE
|
||||
|
||||
|
@ -10,11 +10,11 @@ if(NOT IDF_PATH)
|
||||
"in by the parent build process.")
|
||||
endif()
|
||||
|
||||
set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_support log spi_flash micro-ecc soc main efuse)
|
||||
set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_support log spi_flash micro-ecc main efuse)
|
||||
set(BOOTLOADER_BUILD 1)
|
||||
add_definitions(-DBOOTLOADER_BUILD=1)
|
||||
|
||||
set(COMPONENT_REQUIRES_COMMON esp_rom log esp32 soc)
|
||||
set(COMPONENT_REQUIRES_COMMON log esp32 soc esp_rom esp_common)
|
||||
|
||||
include("${IDF_PATH}/tools/cmake/project.cmake")
|
||||
project(bootloader)
|
||||
|
@ -14,9 +14,10 @@ COMPONENTS := esptool_py bootloader_support log spi_flash micro-ecc soc main efu
|
||||
CFLAGS =
|
||||
CXXFLAGS =
|
||||
|
||||
#We cannot include the esp32 and esp_rom component directly but we need their includes.
|
||||
#We cannot include the esp32, esp_rom, esp_common component directly but we need their includes.
|
||||
CFLAGS += -I $(IDF_PATH)/components/esp32/include
|
||||
CFLAGS += -I $(IDF_PATH)/components/esp_rom/include
|
||||
CFLAGS += -I $(IDF_PATH)/components/esp_common/include
|
||||
|
||||
# The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
|
||||
#
|
||||
|
@ -22,7 +22,6 @@ set(COMPONENT_SRCS "can.c"
|
||||
"uart.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")
|
||||
|
||||
set(COMPONENT_REQUIRES esp_ringbuf)
|
||||
|
||||
register_component()
|
||||
|
@ -48,8 +48,8 @@
|
||||
#include "esp_event.h"
|
||||
#include "esp_spi_flash.h"
|
||||
#include "esp_ipc.h"
|
||||
#include "esp_crosscore_int.h"
|
||||
#include "esp32/dport_access.h"
|
||||
#include "esp_private/crosscore_int.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_vfs_dev.h"
|
||||
#include "esp_newlib.h"
|
||||
@ -63,7 +63,7 @@
|
||||
#include "esp_panic.h"
|
||||
#include "esp_core_dump.h"
|
||||
#include "esp_app_trace.h"
|
||||
#include "esp_dbg_stubs.h"
|
||||
#include "esp_private/dbg_stubs.h"
|
||||
#include "esp_efuse.h"
|
||||
#include "esp32/spiram.h"
|
||||
#include "esp_clk_internal.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "soc/uart_reg.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
#include "esp_gdbstub.h"
|
||||
#include "esp_private/gdbstub.h"
|
||||
#include "esp_panic.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "soc/rtc.h"
|
||||
#include "soc/rtc_wdt.h"
|
||||
|
||||
#include "esp_gdbstub.h"
|
||||
#include "esp_private/gdbstub.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_err.h"
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "esp_err.h"
|
||||
#include "esp_pm.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_crosscore_int.h"
|
||||
#include "esp32/clk.h"
|
||||
#include "esp_private/crosscore_int.h"
|
||||
|
||||
#include "soc/rtc.h"
|
||||
|
||||
|
@ -1,19 +1,27 @@
|
||||
set(COMPONENT_SRCS
|
||||
"src/dbg_stubs.c"
|
||||
"src/esp_err_to_name.c"
|
||||
"src/esp_timer.c"
|
||||
"src/ets_timer_legacy.c"
|
||||
"src/pm_locks.c"
|
||||
"src/stack_check.c")
|
||||
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(
|
||||
"src/stack_check.c"
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
-fno-stack-protector)
|
||||
if(BOOTLOADER_BUILD)
|
||||
# For bootloader, all we need from esp_common is headers
|
||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
|
||||
set(COMPONENT_SRCS )
|
||||
register_component()
|
||||
else()
|
||||
# Regular app build
|
||||
set(COMPONENT_SRCS
|
||||
"src/dbg_stubs.c"
|
||||
"src/esp_err_to_name.c"
|
||||
"src/esp_timer.c"
|
||||
"src/ets_timer_legacy.c"
|
||||
"src/pm_locks.c"
|
||||
"src/stack_check.c")
|
||||
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(
|
||||
"src/stack_check.c"
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
-fno-stack-protector)
|
||||
endif()
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "eri.h"
|
||||
#include "xtensa-debug-module.h"
|
||||
#include "esp_dbg_stubs.h"
|
||||
#include "esp_private/dbg_stubs.h"
|
||||
#include "esp_attr.h"
|
||||
|
||||
#if CONFIG_ESP32_DEBUG_STUBS_ENABLE
|
||||
|
@ -24,6 +24,7 @@ INCLUDE_DIRS := \
|
||||
esp_rom/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
esp_common/include \
|
||||
bootloader_support/include \
|
||||
app_update/include \
|
||||
spi_flash/include \
|
||||
|
@ -78,7 +78,7 @@ extern "C" {
|
||||
#include <xtensa/config/core.h>
|
||||
#include <xtensa/config/system.h> /* required for XSHAL_CLIB */
|
||||
#include <xtensa/xtruntime.h>
|
||||
#include "esp_crosscore_int.h"
|
||||
#include "esp_private/crosscore_int.h"
|
||||
#include "esp_timer.h" /* required for FreeRTOS run time stats */
|
||||
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
#include "esp_panic.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_crosscore_int.h"
|
||||
#include "esp_private/crosscore_int.h"
|
||||
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
|
@ -23,6 +23,7 @@ INCLUDE_DIRS := \
|
||||
) \
|
||||
$(addprefix ../../../components/, \
|
||||
esp_rom/include \
|
||||
esp_common/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
bootloader_support/include \
|
||||
|
@ -18,6 +18,7 @@ INCLUDE_DIRS := \
|
||||
sdmmc/include \
|
||||
vfs/include \
|
||||
$(addprefix ../../../../components/, \
|
||||
esp_common/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
bootloader_support/include \
|
||||
|
@ -25,6 +25,7 @@ INCLUDE_DIRS := \
|
||||
) \
|
||||
$(addprefix ../../../components/, \
|
||||
esp_rom/include \
|
||||
esp_common/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
bootloader_support/include \
|
||||
|
@ -24,6 +24,7 @@ INCLUDE_DIRS := \
|
||||
) \
|
||||
$(addprefix ../../../components/, \
|
||||
esp_rom/include \
|
||||
esp_common/include \
|
||||
soc/esp32/include \
|
||||
esp32/include \
|
||||
bootloader_support/include \
|
||||
|
@ -158,8 +158,8 @@ INPUT = \
|
||||
../../components/esp32/include/esp_intr_alloc.h \
|
||||
## Watchdogs
|
||||
## NOTE: for two lines below header_file.inc is not used
|
||||
../../components/esp32/include/esp_int_wdt.h \
|
||||
../../components/esp32/include/esp_task_wdt.h \
|
||||
../../components/esp_common/include/esp_int_wdt.h \
|
||||
../../components/esp_common/include/esp_task_wdt.h \
|
||||
## Hooks
|
||||
../../components/esp32/include/esp_freertos_hooks.h \
|
||||
## Inter-Processor Call
|
||||
@ -174,7 +174,7 @@ INPUT = \
|
||||
../../components/log/include/esp_log.h \
|
||||
## Base MAC address
|
||||
## NOTE: for line below header_file.inc is not used
|
||||
../../components/esp32/include/esp_system.h \
|
||||
../../components/esp_common/include/esp_system.h \
|
||||
##
|
||||
## ULP Coprocessor - API Guides
|
||||
##
|
||||
@ -185,10 +185,10 @@ INPUT = \
|
||||
##
|
||||
../../components/app_trace/include/esp_app_trace.h \
|
||||
### Power management
|
||||
../../components/esp32/include/esp_pm.h \
|
||||
../../components/esp_common/include/esp_pm.h \
|
||||
../../components/esp32/include/esp32/pm.h \
|
||||
### esp_timer, High Resolution Timer
|
||||
../../components/esp32/include/esp_timer.h \
|
||||
../../components/esp_common/include/esp_timer.h \
|
||||
### esp_event, Event Loop Library
|
||||
../../components/esp_event/include/esp_event.h \
|
||||
../../components/esp_event/include/esp_event_base.h \
|
||||
@ -207,9 +207,9 @@ INPUT = \
|
||||
### Ringbuffer
|
||||
../../components/esp_ringbuf/include/freertos/ringbuf.h \
|
||||
### Helper functions for error codes
|
||||
../../components/esp32/include/esp_err.h \
|
||||
../../components/esp_common/include/esp_err.h \
|
||||
### System APIs
|
||||
../../components/esp32/include/esp_system.h \
|
||||
../../components/esp_common/include/esp_system.h \
|
||||
### Modbus controller component header file
|
||||
../../components/freemodbus/modbus_controller/mbcontroller.h
|
||||
|
||||
|
@ -58,7 +58,7 @@ 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")
|
||||
set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log soc esp_rom esp_common")
|
||||
|
||||
set(IDF_PROJECT_PATH "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user