aboutsummaryrefslogtreecommitdiff
path: root/BuildMbedCrypto.cmake
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2020-01-10 17:16:26 +0800
committerDavid Hu <david.hu@arm.com>2020-01-13 09:47:54 +0800
commit7ffe5b49c5694dea47a545f62442fd6076d26c53 (patch)
treedd3ba7be1cd9fe2d2adfba40f36a4e62188deea8 /BuildMbedCrypto.cmake
parent47ecbf04561876f4ae94705c086519654be07422 (diff)
downloadtrusted-firmware-m-7ffe5b49c5694dea47a545f62442fd6076d26c53.tar.gz
Build: Fix arch type of Cortex-M0plus in GNUARM
The arch type of Cortex-M0plus should be "armv6s-m" instead of "armv6-m" in GNU Arm embedded toolchain. Otherwise, compiling will fail because "armv6-m" type doesn't support SVC. Fix the arch type values in GNUARM cmake files. Add an arch type string "ARMv6S-M" for Cortex-M0plus in GNUARM. Because Armclang doesn't have a dedicated flag as "armv6s-m", two strings "ARMv6-M" and "ARMv6S-M" exist and stand for Cortex-M0plus arch type in Armclang and GNUARM respectively. Change-Id: I59e9b9837012fb8dbbae59beacfd6cb293548747 Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'BuildMbedCrypto.cmake')
-rw-r--r--BuildMbedCrypto.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/BuildMbedCrypto.cmake b/BuildMbedCrypto.cmake
index 3f573c9dd7..fb51c98517 100644
--- a/BuildMbedCrypto.cmake
+++ b/BuildMbedCrypto.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2017-2019, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2020, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -61,7 +61,8 @@ string(APPEND MBEDCRYPTO_C_FLAGS ${CMAKE_C_FLAGS})
# Workaround Mbed TLS issue https://github.com/ARMmbed/mbedtls/issues/1077
if ((${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv8-M.BASE") OR
- (${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv6-M"))
+ (${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv6-M") OR
+ (${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv6S-M"))
string(APPEND MBEDCRYPTO_C_FLAGS " -DMULADDC_CANNOT_USE_R7")
endif()