mirror of https://github.com/ARMmbed/mbed-os.git
CMake: Fix build failure due to CMSIS restructure
parent
458ce2adfb
commit
a0fbe2947a
|
@ -2,3 +2,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
mbed_add_cmake_directory_if_labels("TARGET")
|
||||
|
||||
add_subdirectory(RTOS2)
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
function(_mbed_get_rtx_assembly toolchain_dir)
|
||||
function(_mbed_get_cortex_m_exception_handlers toolchain_dir)
|
||||
foreach(key ${MBED_TARGET_LABELS})
|
||||
if(${key} STREQUAL CORTEX_A)
|
||||
set(STARTUP_RTX_FILE TARGET_CORTEX_A/irq_ca.S)
|
||||
|
@ -26,7 +26,7 @@ function(_mbed_get_rtx_assembly toolchain_dir)
|
|||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(_mbed_add_cortexa_handler_if)
|
||||
function(_mbed_get_cortex_a_exception_handlers)
|
||||
foreach(key ${MBED_TARGET_LABELS})
|
||||
if(${key} STREQUAL CORTEX_A)
|
||||
target_sources(mbed-os PRIVATE Config/TARGET_CORTEX_A/handlers.c)
|
||||
|
@ -34,21 +34,21 @@ function(_mbed_add_cortexa_handler_if)
|
|||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Add Cortex A handlers if needed
|
||||
_mbed_add_cortexa_handler_if()
|
||||
_mbed_get_cortex_a_exception_handlers()
|
||||
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
_mbed_get_rtx_assembly(TOOLCHAIN_GCC)
|
||||
_mbed_get_cortex_m_exception_handlers(TOOLCHAIN_GCC)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
_mbed_get_rtx_assembly(TOOLCHAIN_ARM)
|
||||
_mbed_get_cortex_m_exception_handlers(TOOLCHAIN_ARM)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
_mbed_get_rtx_assembly(TOOLCHAIN_IAR)
|
||||
_mbed_get_cortex_m_exception_handlers(TOOLCHAIN_IAR)
|
||||
endif()
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
Config
|
||||
Include
|
||||
Include1
|
||||
Source
|
||||
)
|
||||
|
||||
|
@ -56,6 +56,8 @@ target_sources(mbed-os
|
|||
PRIVATE
|
||||
Config/RTX_Config.c
|
||||
|
||||
Library/cmsis_os1.c
|
||||
|
||||
Source/rtx_delay.c
|
||||
Source/rtx_evflags.c
|
||||
Source/rtx_evr.c
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
mbed_tz_context.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
Include
|
||||
)
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
Source/irq_ctrl_gic.c
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
Include
|
||||
)
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
Source/mbed_tz_context.c
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
mbed_add_cmake_directory_if_labels("TARGET")
|
||||
add_subdirectory(CMSIS)
|
|
@ -1,13 +1,5 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
mbed_add_cmake_directory_if_labels("TARGET")
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
RTE_Components.h
|
||||
)
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_subdirectory(CMSIS_5)
|
||||
add_subdirectory(device)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
irq_ctrl_gic.c
|
||||
)
|
||||
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
TOOLCHAIN_IAR/cmain.S
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory(RTE)
|
||||
add_subdirectory(rtos)
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
.
|
||||
)
|
|
@ -1,4 +1,7 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
mbed_add_cmake_directory_if_labels("TARGET")
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
include
|
||||
)
|
|
@ -1,15 +1,6 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-os PRIVATE
|
||||
mbed_boot.c
|
||||
mbed_rtos_rtx.c
|
||||
mbed_rtx_handlers.c
|
||||
mbed_rtx_idle.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(rtx5)
|
||||
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
|
@ -29,6 +20,12 @@ endif()
|
|||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
rtx4
|
||||
include
|
||||
)
|
||||
|
||||
target_sources(mbed-os PRIVATE
|
||||
source/mbed_boot.c
|
||||
source/mbed_rtos_rtx.c
|
||||
source/mbed_rtx_handlers.c
|
||||
source/mbed_rtx_idle.cpp
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
function(_mbed_get_system_init)
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
target_sources(mbed-os PRIVATE TOOLCHAIN_IAR/cmain.S)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
_mbed_get_system_init()
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory(source/TARGET_CORTEX)
|
||||
|
||||
target_include_directories(mbed-os
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
|
Loading…
Reference in New Issue