Skip to content

Commit

Permalink
Update CMSIS to v6
Browse files Browse the repository at this point in the history
Signed-off-by: Gergely Korcsák <gergely.korcsak@arm.com>
Change-Id: Id1ac828e2fe034cb1b49325e31b42ef6c12421a2
  • Loading branch information
gergelykarm authored and Anton-TF committed Mar 5, 2024
1 parent 1249f0d commit 3d54aca
Show file tree
Hide file tree
Showing 57 changed files with 177 additions and 31,158 deletions.
6 changes: 3 additions & 3 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
# Copyright (c) 2022-2023 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
Expand Down Expand Up @@ -224,8 +224,8 @@ include(${CMAKE_SOURCE_DIR}/lib/ext/tf-m-tests/read_version.cmake)

install(CODE "MESSAGE(\"----- Installing platform NS -----\")")

install(DIRECTORY ${PLATFORM_DIR}/ext/cmsis
DESTINATION ${INSTALL_PLATFORM_NS_DIR}/ext)
install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ext/cmsis-src/CMSIS/Core/Include
DESTINATION ${INSTALL_PLATFORM_NS_DIR}/ext/cmsis)

if(PLATFORM_DEFAULT_UART_STDOUT)
install(FILES ${PLATFORM_DIR}/ext/common/uart_stdout.c
Expand Down
3 changes: 2 additions & 1 deletion lib/ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand All @@ -9,6 +9,7 @@ set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/lib/ext CACHE STRING "" FORCE)
add_subdirectory(qcbor)
add_subdirectory(t_cose)
add_subdirectory(mbedcrypto)
add_subdirectory(cmsis)
if(BL2)
add_subdirectory(mcuboot)
endif()
Expand Down
36 changes: 36 additions & 0 deletions lib/ext/cmsis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.15)

include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)

# Default configuration of CMSIS repository
set(CMSIS_PATH "DOWNLOAD" CACHE PATH "Path to cmsis (or DOWNLOAD to fetch automatically")
set(CMSIS_TAG "v6.0.0" CACHE STRING "The version of cmsis to use")

fetch_remote_library(
LIB_NAME cmsis
LIB_SOURCE_PATH_VAR CMSIS_PATH
LIB_PATCH_DIR ${CMAKE_CURRENT_LIST_DIR}
LIB_BASE_DIR "${CMAKE_BINARY_DIR}/lib/ext"
FETCH_CONTENT_ARGS
GIT_REPOSITORY https://github.com/ARM-software/CMSIS_6.git
GIT_TAG ${CMSIS_TAG}
GIT_PROGRESS TRUE
)

add_library(cmsis INTERFACE)

set_target_properties(cmsis PROPERTIES EXCLUDE_FROM_ALL TRUE)

target_include_directories(cmsis
INTERFACE
$<BUILD_INTERFACE:${CMSIS_PATH}/CMSIS/Core/Include>
$<BUILD_INTERFACE:${CMSIS_PATH}/CMSIS/Core/Include/m-profile>
)
9 changes: 5 additions & 4 deletions platform/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
Expand Down Expand Up @@ -52,7 +52,6 @@ target_compile_options(cmsis_stack_override
target_include_directories(platform_common_interface
INTERFACE
ext
ext/cmsis
ext/common
ext/driver
include
Expand Down Expand Up @@ -97,6 +96,7 @@ target_link_libraries(platform_s
platform_region_defs
tfm_fih_headers
cmsis_stack_override
cmsis
PRIVATE
psa_interface
tfm_config
Expand Down Expand Up @@ -197,6 +197,7 @@ if(BL2)
platform_common_interface
platform_region_defs
cmsis_stack_override
cmsis
PRIVATE
bl2_hal
mcuboot_config
Expand Down Expand Up @@ -232,7 +233,6 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
INTERFACE
.
include
ext/cmsis
ext/driver
)

Expand All @@ -241,6 +241,7 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
platform_region_defs
platform_common_interface
cmsis_stack_override
cmsis
)

target_compile_definitions(platform_bl1_1_interface
Expand Down Expand Up @@ -283,7 +284,6 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
PRIVATE
.
include
ext/cmsis
ext/driver
)

Expand All @@ -292,6 +292,7 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
platform_region_defs
platform_common_interface
cmsis_stack_override
cmsis
)

target_compile_definitions(platform_bl1_2
Expand Down
Loading

0 comments on commit 3d54aca

Please sign in to comment.