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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
mbed_add_cmake_directory_if_labels("TARGET")
|
mbed_add_cmake_directory_if_labels("TARGET")
|
||||||
|
|
||||||
|
add_subdirectory(RTOS2)
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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})
|
foreach(key ${MBED_TARGET_LABELS})
|
||||||
if(${key} STREQUAL CORTEX_A)
|
if(${key} STREQUAL CORTEX_A)
|
||||||
set(STARTUP_RTX_FILE TARGET_CORTEX_A/irq_ca.S)
|
set(STARTUP_RTX_FILE TARGET_CORTEX_A/irq_ca.S)
|
||||||
|
@ -26,7 +26,7 @@ function(_mbed_get_rtx_assembly toolchain_dir)
|
||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(_mbed_add_cortexa_handler_if)
|
function(_mbed_get_cortex_a_exception_handlers)
|
||||||
foreach(key ${MBED_TARGET_LABELS})
|
foreach(key ${MBED_TARGET_LABELS})
|
||||||
if(${key} STREQUAL CORTEX_A)
|
if(${key} STREQUAL CORTEX_A)
|
||||||
target_sources(mbed-os PRIVATE Config/TARGET_CORTEX_A/handlers.c)
|
target_sources(mbed-os PRIVATE Config/TARGET_CORTEX_A/handlers.c)
|
||||||
|
@ -34,21 +34,21 @@ function(_mbed_add_cortexa_handler_if)
|
||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Add Cortex A handlers if needed
|
_mbed_get_cortex_a_exception_handlers()
|
||||||
_mbed_add_cortexa_handler_if()
|
|
||||||
|
|
||||||
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
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")
|
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||||
_mbed_get_rtx_assembly(TOOLCHAIN_ARM)
|
_mbed_get_cortex_m_exception_handlers(TOOLCHAIN_ARM)
|
||||||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||||
_mbed_get_rtx_assembly(TOOLCHAIN_IAR)
|
_mbed_get_cortex_m_exception_handlers(TOOLCHAIN_IAR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(mbed-os
|
target_include_directories(mbed-os
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Config
|
Config
|
||||||
Include
|
Include
|
||||||
|
Include1
|
||||||
Source
|
Source
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ target_sources(mbed-os
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Config/RTX_Config.c
|
Config/RTX_Config.c
|
||||||
|
|
||||||
|
Library/cmsis_os1.c
|
||||||
|
|
||||||
Source/rtx_delay.c
|
Source/rtx_delay.c
|
||||||
Source/rtx_evflags.c
|
Source/rtx_evflags.c
|
||||||
Source/rtx_evr.c
|
Source/rtx_evr.c
|
|
@ -1,12 +1,12 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
target_sources(mbed-os
|
|
||||||
PRIVATE
|
|
||||||
mbed_tz_context.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(mbed-os
|
target_include_directories(mbed-os
|
||||||
PUBLIC
|
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.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
mbed_add_cmake_directory_if_labels("TARGET")
|
add_subdirectory(CMSIS_5)
|
||||||
|
add_subdirectory(device)
|
||||||
target_sources(mbed-os
|
|
||||||
PRIVATE
|
|
||||||
RTE_Components.h
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(mbed-os
|
|
||||||
PUBLIC
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
|
@ -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.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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")
|
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
target_sources(mbed-os
|
target_sources(mbed-os
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
@ -29,6 +20,12 @@ endif()
|
||||||
|
|
||||||
target_include_directories(mbed-os
|
target_include_directories(mbed-os
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
include
|
||||||
rtx4
|
)
|
||||||
|
|
||||||
|
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.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
add_subdirectory(source/TARGET_CORTEX)
|
|
||||||
|
|
||||||
target_include_directories(mbed-os
|
target_include_directories(mbed-os
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
|
Loading…
Reference in New Issue