瀏覽代碼

soc: move peripheral linker scripts out of target component

SalimTerryLi 4 年之前
父節點
當前提交
2347e68e6b

+ 1 - 2
components/bootloader/subproject/main/component.mk

@@ -10,8 +10,7 @@ LINKER_SCRIPTS := \
     $(COMPONENT_PATH)/ld/$(IDF_TARGET)/bootloader.rom.ld \
     $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.ld \
     $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.newlib-funcs.ld \
-    $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.api.ld \
-    $(IDF_PATH)/components/$(IDF_TARGET)/ld/$(IDF_TARGET).peripherals.ld
+    $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.api.ld
 
 # SPI driver patch for ROM is only needed in ESP32
 ifdef CONFIG_IDF_TARGET_ESP32

+ 0 - 2
components/esp32/CMakeLists.txt

@@ -12,5 +12,3 @@ endif()
 idf_component_register(INCLUDE_DIRS include
                        REQUIRES xtensa "${legacy_reqs}"
                        REQUIRED_IDF_TARGETS esp32)
-
-target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32.peripherals.ld")

+ 0 - 3
components/esp32/component.mk

@@ -1,6 +1,3 @@
 #
 # Component Makefile
 #
-
-COMPONENT_ADD_LINKER_DEPS := $(COMPONENT_PATH) ld/esp32.peripherals.ld
-COMPONENT_ADD_LDFLAGS := -T $(COMPONENT_PATH)/ld/esp32.peripherals.ld

+ 0 - 2
components/esp32c3/CMakeLists.txt

@@ -11,5 +11,3 @@ endif()
 
 idf_component_register(REQUIRES riscv "${legacy_reqs}"
                        REQUIRED_IDF_TARGETS esp32c3)
-
-target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32c3.peripherals.ld")

+ 0 - 2
components/esp32h2/CMakeLists.txt

@@ -11,5 +11,3 @@ endif()
 
 idf_component_register(REQUIRES riscv "${legacy_reqs}"
                        REQUIRED_IDF_TARGETS esp32h2)
-
-target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32h2.peripherals.ld")

+ 0 - 2
components/esp32s2/CMakeLists.txt

@@ -11,5 +11,3 @@ endif()
 
 idf_component_register(REQUIRES xtensa "${legacy_reqs}"
                        REQUIRED_IDF_TARGETS esp32s2)
-
-target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32s2.peripherals.ld")

+ 0 - 2
components/esp32s3/CMakeLists.txt

@@ -11,5 +11,3 @@ endif()
 
 idf_component_register(REQUIRES xtensa "${legacy_reqs}"
                        REQUIRED_IDF_TARGETS esp32s3)
-
-target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32s3.peripherals.ld")

+ 2 - 0
components/soc/CMakeLists.txt

@@ -6,3 +6,5 @@ idf_component_register(SRCS "lldesc.c"
 
 idf_build_get_property(target IDF_TARGET)
 add_subdirectory(${target})
+
+target_linker_script(${COMPONENT_LIB} INTERFACE "${target}/ld/${target}.peripherals.ld")

+ 3 - 0
components/soc/component.mk

@@ -1,4 +1,7 @@
 COMPONENT_SRCDIRS := . $(IDF_TARGET)
 COMPONENT_ADD_INCLUDEDIRS := include $(IDF_TARGET) $(IDF_TARGET)/include
 
+COMPONENT_ADD_LINKER_DEPS += $(COMPONENT_PATH) esp32/ld/esp32.peripherals.ld
+COMPONENT_ADD_LDFLAGS += -T $(COMPONENT_PATH)/esp32/ld/esp32.peripherals.ld
+
 COMPONENT_ADD_LDFRAGMENTS += linker.lf

+ 0 - 0
components/esp32/ld/esp32.peripherals.ld → components/soc/esp32/ld/esp32.peripherals.ld


+ 0 - 0
components/esp32c3/ld/esp32c3.peripherals.ld → components/soc/esp32c3/ld/esp32c3.peripherals.ld


+ 0 - 0
components/esp32h2/ld/esp32h2.peripherals.ld → components/soc/esp32h2/ld/esp32h2.peripherals.ld


+ 0 - 0
components/esp32s2/ld/esp32s2.peripherals.ld → components/soc/esp32s2/ld/esp32s2.peripherals.ld


+ 0 - 0
components/esp32s3/ld/esp32s3.peripherals.ld → components/soc/esp32s3/ld/esp32s3.peripherals.ld