]> granicus.if.org Git - esp-idf/commitdiff
move common include files from esp32 into esp_common
authormorris <maoshengrong@espressif.com>
Fri, 15 Mar 2019 09:44:27 +0000 (17:44 +0800)
committermorris <maoshengrong@espressif.com>
Tue, 26 Mar 2019 03:57:03 +0000 (11:57 +0800)
32 files changed:
components/app_trace/gcov/gcov_rtio.c
components/bootloader/subproject/CMakeLists.txt
components/bootloader/subproject/Makefile
components/driver/CMakeLists.txt
components/esp32/cpu_start.c
components/esp32/gdbstub.c
components/esp32/panic.c
components/esp32/pm_esp32.c
components/esp_common/CMakeLists.txt
components/esp_common/include/esp_assert.h [moved from components/esp32/include/esp_assert.h with 100% similarity]
components/esp_common/include/esp_err.h [moved from components/esp32/include/esp_err.h with 100% similarity]
components/esp_common/include/esp_int_wdt.h [moved from components/esp32/include/esp_int_wdt.h with 100% similarity]
components/esp_common/include/esp_interface.h [moved from components/esp32/include/esp_interface.h with 100% similarity]
components/esp_common/include/esp_pm.h [moved from components/esp32/include/esp_pm.h with 100% similarity]
components/esp_common/include/esp_private/crosscore_int.h [moved from components/esp32/include/esp_crosscore_int.h with 100% similarity]
components/esp_common/include/esp_private/dbg_stubs.h [moved from components/esp32/include/esp_dbg_stubs.h with 100% similarity]
components/esp_common/include/esp_private/gdbstub.h [moved from components/esp32/include/esp_gdbstub.h with 100% similarity]
components/esp_common/include/esp_system.h [moved from components/esp32/include/esp_system.h with 100% similarity]
components/esp_common/include/esp_task.h [moved from components/esp32/include/esp_task.h with 100% similarity]
components/esp_common/include/esp_task_wdt.h [moved from components/esp32/include/esp_task_wdt.h with 100% similarity]
components/esp_common/include/esp_timer.h [moved from components/esp32/include/esp_timer.h with 100% similarity]
components/esp_common/include/esp_types.h [moved from components/esp32/include/esp_types.h with 100% similarity]
components/esp_common/src/dbg_stubs.c
components/fatfs/test_fatfs_host/Makefile.files
components/freertos/include/freertos/portmacro.h
components/freertos/port.c
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
docs/Doxyfile
tools/cmake/idf_functions.cmake

index 49598ddcc593d107412cfaff8f3584a240e42103..7798890c1c6ef171e0d4c129834d0df5b15e62c3 100644 (file)
@@ -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
 
index c7a605c6cdad3d9dfac60b2ace6e71375979e7f4..e116b28bb5a96ecbc3e4c518b8b87516e9af785a 100644 (file)
@@ -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)
index 727c8f05d862ac094e43dece1388dacd4445a2eb..ce959428440265d463de8806c8809b24e37e4a92 100644 (file)
@@ -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.
 #
index 13cfd703c4a6a6313493b1cf00326705251af7b3..e4e17b33e287d49226752714e599c7ca1a822050 100644 (file)
@@ -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()
index b9411abcb1b9327dad026d915546d5b681ae9e4f..83a4915b72cc080759c4d67640279c27f2d80c50 100644 (file)
@@ -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"
index e514222098acb0932f646663f64bbe6ec760088f..3bc5423fe1b4b62e591e9f9586bf602bd4bbecee 100644 (file)
@@ -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"
index 71996d1d8a97a39aa618fdf0062ca612ee542a98..5924a1f972a84cb48640df7e844ee36ac57bf4b4 100644 (file)
@@ -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"
index f84ca843f5a55ce39bccb188838ab84ea99e4178..9a6feaa5a5680c531fd85a5c6fa63082739d2486 100644 (file)
@@ -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"
 
index 1d49ff32e7441f91134348678ecd4f9623a63d46..88dfee3c31441bb27091a88013f4244ed7295a3b 100644 (file)
@@ -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()
index 51e9749b06bda112c63e4beacb1595dd106efe84..3def85c3f71ddbca11f3c0508d8e38df358949b2 100644 (file)
@@ -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
index 7356568d80f36293532e3d96c0a30aa53d7d96fd..a619c262287f3e3022def956b495a2d0e087975a 100644 (file)
@@ -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 \
index adeb3bb00973b1b909896025a18af1695d68b02f..cbd4cc50ab0a7ff0a83d28520315472c4e047189 100644 (file)
@@ -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 */
 
 
index 4b6b7c09367f38f1005ccc3c9b2d12300660658b..5cd46c7c71ca3a5b943980d76e176d77e6c51d5f 100644 (file)
 
 #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"
index 35326074556f2f51f6da3e2f7cac537fa88384c3..653b61d99b2896176e324ca3df6ec9c59888a135 100644 (file)
@@ -23,6 +23,7 @@ INCLUDE_DIRS := \
        ) \
        $(addprefix ../../../components/, \
        esp_rom/include \
+       esp_common/include \
        soc/esp32/include \
        esp32/include \
        bootloader_support/include \
index c3d004ae396c65426f56cd40f2ee0a935457d4f0..d987631bebf63515eefdc0572f5f20385092a517 100644 (file)
@@ -4,7 +4,7 @@ SOURCE_FILES := \
        newlib/lock.c \
        esp32/crc.cpp \
        esp32/esp_random.c \
-       bootloader_support/src/bootloader_common.c 
+       bootloader_support/src/bootloader_common.c
 
 INCLUDE_DIRS := \
        ../include \
@@ -18,6 +18,7 @@ INCLUDE_DIRS := \
        sdmmc/include \
        vfs/include \
        $(addprefix ../../../../components/, \
+       esp_common/include \
        soc/esp32/include \
        esp32/include \
        bootloader_support/include \
index ba612fca59d203751a7b0c47528cb24270edba6b..27d2b9dff69c3f09d943fe602cce5eca9e44a387 100644 (file)
@@ -25,6 +25,7 @@ INCLUDE_DIRS := \
        ) \
        $(addprefix ../../../components/, \
        esp_rom/include \
+       esp_common/include \
        soc/esp32/include \
        esp32/include \
        bootloader_support/include \
index 009e1be7a9e76929cedddf56d4ac22042fec0192..5b0cbc9d26e6e7dac43bfb69ae7912bd088e9f3c 100644 (file)
@@ -24,6 +24,7 @@ INCLUDE_DIRS := \
        ) \
        $(addprefix ../../../components/, \
        esp_rom/include \
+       esp_common/include \
        soc/esp32/include \
        esp32/include \
        bootloader_support/include \
index 21c19fa4cebcf62fbd7e42987f8462abc425d308..aa3096bad40fa230298a5e53a125490f1dc73f88 100644 (file)
@@ -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
 
index 01035a0b17f9c4cfce37095a26c8b9c70f6470ec..c2e694e43ab8edfc5da6ae60dedd0878d98893fd 100644 (file)
@@ -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}")