forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Merged n times arch_arm_Y libs into soc_arm and arch_arm
Fixes: zephyrproject-rtos#8441 This commit merges the multiple sub libraries under soc_arm and arch_arm, e.g. arch_arm_Y_Z into a single arch_arm libraries. It also moves arch related stray files from libzephyr.a and places them inside the arch_${ARCH} and soc_${ARCH} library, see zephyrproject-rtos#8826. Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
- Loading branch information
Showing
58 changed files
with
272 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
add_definitions(-D__ZEPHYR_SUPERVISOR__) | ||
|
||
add_library(arch_${ARCH} STATIC "") | ||
target_link_libraries(arch_${ARCH} PUBLIC zephyr_interface) | ||
target_link_libraries(zephyr_app_linking INTERFACE arch_${ARCH}) | ||
|
||
add_subdirectory(common) | ||
add_subdirectory(${ARCH}) | ||
|
||
if( ${ARCH} STREQUAL arm ) | ||
include_relative(${ARCH}/CMakeLists.txt) | ||
else() | ||
# Not updated archs | ||
add_subdirectory(${ARCH}) | ||
# To ensure a file is always present in arch not updated yet. | ||
target_sources(arch_${ARCH} PRIVATE $ENV{ZEPHYR_BASE}/misc/empty_file.c) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ zephyr_ld_options( | |
${ARCH_FLAG} | ||
) | ||
|
||
add_subdirectory(core) | ||
include_relative(core/CMakeLists.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
zephyr_library() | ||
|
||
zephyr_library_sources( | ||
exc_exit.S | ||
irq_init.c | ||
swap.c | ||
swap_helper.S | ||
fault.c | ||
irq_manage.c | ||
thread.c | ||
cpu_idle.S | ||
fault_s.S | ||
fatal.c | ||
sys_fatal_error_handler.c | ||
thread_abort.c | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
exc_exit.S | ||
irq_init.c | ||
swap.c | ||
swap_helper.S | ||
fault.c | ||
irq_manage.c | ||
thread.c | ||
cpu_idle.S | ||
fault_s.S | ||
fatal.c | ||
sys_fatal_error_handler.c | ||
thread_abort.c | ||
IFDEF:${CONFIG_GEN_SW_ISR_TABLE} isr_wrapper.S | ||
IFDEF:${CONFIG_CPLUSPLUS} __aeabi_atexit.c | ||
IFDEF:${CONFIG_IRQ_OFFLOAD} irq_offload.c | ||
IFDEF:${CONFIG_CPU_CORTEX_M0} irq_relay.S | ||
IFDEF:${CONFIG_USERSPACE} userspace.S | ||
) | ||
|
||
zephyr_library_sources_ifdef(CONFIG_GEN_SW_ISR_TABLE isr_wrapper.S) | ||
zephyr_library_sources_ifdef(CONFIG_CPLUSPLUS __aeabi_atexit.c) | ||
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c) | ||
zephyr_library_sources_ifdef(CONFIG_CPU_CORTEX_M0 irq_relay.S) | ||
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S) | ||
target_sources(arch_arm PRIVATE ${PRIVATE_SOURCES}) | ||
|
||
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M cortex_m) | ||
add_subdirectory_ifdef(CONFIG_ARM_MPU cortex_m/mpu) | ||
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M_HAS_CMSE cortex_m/cmse) | ||
add_subdirectory_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz) | ||
include_relative_ifdef(CONFIG_CPU_CORTEX_M cortex_m/CMakeLists.txt) | ||
include_relative_ifdef(CONFIG_ARM_MPU cortex_m/mpu/CMakeLists.txt) | ||
include_relative_ifdef(CONFIG_CPU_CORTEX_M_HAS_CMSE cortex_m/cmse/CMakeLists.txt) | ||
include_relative_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz/CMakeLists.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
zephyr_library() | ||
|
||
zephyr_library_sources( | ||
vector_table.S | ||
reset.S | ||
nmi_on_reset.S | ||
prep_c.c | ||
scb.c | ||
nmi.c | ||
exc_manage.c | ||
) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
vector_table.S | ||
reset.S | ||
nmi_on_reset.S | ||
prep_c.c | ||
scb.c | ||
nmi.c | ||
exc_manage.c | ||
) | ||
|
||
target_sources(arch_arm PRIVATE ${PRIVATE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
zephyr_sources(arm_core_cmse.c) | ||
target_sources(arch_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/arm_core_cmse.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
zephyr_library() | ||
|
||
zephyr_library_sources( arm_core_mpu.c) | ||
zephyr_library_sources_ifdef(CONFIG_CPU_HAS_ARM_MPU arm_mpu.c) | ||
zephyr_library_sources_ifdef(CONFIG_CPU_HAS_NXP_MPU nxp_mpu.c) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
arm_core_mpu.c | ||
IFDEF:${CONFIG_CPU_HAS_ARM_MPU} arm_mpu.c | ||
IFDEF:${CONFIG_CPU_HAS_NXP_MPU} nxp_mpu.c | ||
) | ||
|
||
zephyr_library_include_directories( | ||
. | ||
../../../include/cortex_m | ||
target_sources(arch_arm PRIVATE ${PRIVATE_SOURCES}) | ||
target_include_directories(arch_arm PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/arm/include/cortex_m | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target_sources(arch_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target_sources(arch_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc_gpio.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target_sources(arch_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
add_library(soc_${ARCH} STATIC "") | ||
target_link_libraries(soc_${ARCH} PUBLIC zephyr_interface) | ||
target_link_libraries(zephyr_app_linking INTERFACE soc_${ARCH}) | ||
zephyr_set_property(TARGET soc_${ARCH} MEMORY_SPACE kernel) | ||
|
||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/${ARCH}/CMakeLists.txt) | ||
include(${SOC_DIR}/${ARCH}/CMakeLists.txt) | ||
else() | ||
include(${SOC_DIR}/${ARCH}/${SOC_PATH}/CMakeLists.txt) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
add_subdirectory(${SOC_SERIES}) | ||
include_relative(${SOC_SERIES}/CMakeLists.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
zephyr_sources( | ||
soc.c | ||
power.c | ||
) | ||
zephyr_sources_ifdef(CONFIG_ARM_MPU arm_mpu_regions.c) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
soc.c | ||
power.c | ||
IFDEF:${CONFIG_ARM_MPU} arm_mpu_regions.c | ||
) | ||
|
||
target_sources(soc_arm PRIVATE ${PRIVATE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
zephyr_sources( | ||
soc.c | ||
arm_mpu_regions.c | ||
) | ||
target_sources(soc_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c | ||
${CMAKE_CURRENT_LIST_DIR}/arm_mpu_regions.c | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
zephyr_include_directories(.) | ||
zephyr_sources( | ||
soc_pmc.c | ||
soc_gpio.c | ||
) | ||
|
||
zephyr_sources_ifdef( | ||
CONFIG_ARM_MPU | ||
arm_mpu_regions.c | ||
) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
soc_pmc.c | ||
soc_gpio.c | ||
IFDEF:${CONFIG_ARM_MPU} arm_mpu_regions.c | ||
) | ||
|
||
target_sources(soc_arm PRIVATE ${PRIVATE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
zephyr_sources( | ||
soc.c | ||
) | ||
target_sources(soc_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
zephyr_sources( | ||
soc.c | ||
) | ||
target_sources(soc_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
zephyr_sources( | ||
soc.c | ||
soc_config.c | ||
) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
soc.c | ||
soc_config.c | ||
) | ||
|
||
target_sources(soc_arm PRIVATE ${PRIVATE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
zephyr_sources( | ||
power.c | ||
soc.c | ||
) | ||
target_sources(soc_arm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/soc.c | ||
${CMAKE_CURRENT_LIST_DIR}/power.c | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
zephyr_sources( | ||
power.c | ||
soc.c | ||
) | ||
zephyr_list(SOURCES | ||
OUTPUT PRIVATE_SOURCES | ||
power.c | ||
soc.c | ||
IFDEF:${CONFIG_ARM_MPU} mpu_regions.c | ||
) | ||
|
||
zephyr_sources_ifdef(CONFIG_ARM_MPU mpu_regions.c) | ||
target_sources(soc_arm PRIVATE ${PRIVATE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.