Skip to content

Commit 3d54aca

Browse files
gergelykarmAnton-TF
authored andcommitted
Update CMSIS to v6
Signed-off-by: Gergely Korcsák <gergely.korcsak@arm.com> Change-Id: Id1ac828e2fe034cb1b49325e31b42ef6c12421a2
1 parent 1249f0d commit 3d54aca

File tree

57 files changed

+177
-31158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+177
-31158
lines changed

cmake/install.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
2+
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
33
# Copyright (c) 2022-2023 Cypress Semiconductor Corporation (an Infineon company)
44
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
55
#
@@ -224,8 +224,8 @@ include(${CMAKE_SOURCE_DIR}/lib/ext/tf-m-tests/read_version.cmake)
224224

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

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

230230
if(PLATFORM_DEFAULT_UART_STDOUT)
231231
install(FILES ${PLATFORM_DIR}/ext/common/uart_stdout.c

lib/ext/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
2+
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55
#
@@ -9,6 +9,7 @@ set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/lib/ext CACHE STRING "" FORCE)
99
add_subdirectory(qcbor)
1010
add_subdirectory(t_cose)
1111
add_subdirectory(mbedcrypto)
12+
add_subdirectory(cmsis)
1213
if(BL2)
1314
add_subdirectory(mcuboot)
1415
endif()

lib/ext/cmsis/CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (c) 2024, Arm Limited. All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
#-------------------------------------------------------------------------------
7+
8+
cmake_minimum_required(VERSION 3.15)
9+
10+
include(FetchContent)
11+
set(FETCHCONTENT_QUIET FALSE)
12+
13+
# Default configuration of CMSIS repository
14+
set(CMSIS_PATH "DOWNLOAD" CACHE PATH "Path to cmsis (or DOWNLOAD to fetch automatically")
15+
set(CMSIS_TAG "v6.0.0" CACHE STRING "The version of cmsis to use")
16+
17+
fetch_remote_library(
18+
LIB_NAME cmsis
19+
LIB_SOURCE_PATH_VAR CMSIS_PATH
20+
LIB_PATCH_DIR ${CMAKE_CURRENT_LIST_DIR}
21+
LIB_BASE_DIR "${CMAKE_BINARY_DIR}/lib/ext"
22+
FETCH_CONTENT_ARGS
23+
GIT_REPOSITORY https://github.com/ARM-software/CMSIS_6.git
24+
GIT_TAG ${CMSIS_TAG}
25+
GIT_PROGRESS TRUE
26+
)
27+
28+
add_library(cmsis INTERFACE)
29+
30+
set_target_properties(cmsis PROPERTIES EXCLUDE_FROM_ALL TRUE)
31+
32+
target_include_directories(cmsis
33+
INTERFACE
34+
$<BUILD_INTERFACE:${CMSIS_PATH}/CMSIS/Core/Include>
35+
$<BUILD_INTERFACE:${CMSIS_PATH}/CMSIS/Core/Include/m-profile>
36+
)

platform/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
2+
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
33
# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
44
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
55
#
@@ -52,7 +52,6 @@ target_compile_options(cmsis_stack_override
5252
target_include_directories(platform_common_interface
5353
INTERFACE
5454
ext
55-
ext/cmsis
5655
ext/common
5756
ext/driver
5857
include
@@ -97,6 +96,7 @@ target_link_libraries(platform_s
9796
platform_region_defs
9897
tfm_fih_headers
9998
cmsis_stack_override
99+
cmsis
100100
PRIVATE
101101
psa_interface
102102
tfm_config
@@ -197,6 +197,7 @@ if(BL2)
197197
platform_common_interface
198198
platform_region_defs
199199
cmsis_stack_override
200+
cmsis
200201
PRIVATE
201202
bl2_hal
202203
mcuboot_config
@@ -232,7 +233,6 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
232233
INTERFACE
233234
.
234235
include
235-
ext/cmsis
236236
ext/driver
237237
)
238238

@@ -241,6 +241,7 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
241241
platform_region_defs
242242
platform_common_interface
243243
cmsis_stack_override
244+
cmsis
244245
)
245246

246247
target_compile_definitions(platform_bl1_1_interface
@@ -283,7 +284,6 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
283284
PRIVATE
284285
.
285286
include
286-
ext/cmsis
287287
ext/driver
288288
)
289289

@@ -292,6 +292,7 @@ if(BL1 AND PLATFORM_DEFAULT_BL1)
292292
platform_region_defs
293293
platform_common_interface
294294
cmsis_stack_override
295+
cmsis
295296
)
296297

297298
target_compile_definitions(platform_bl1_2

0 commit comments

Comments
 (0)