Skip to content

Commit c23113f

Browse files
committed
CMake: Fix Mbed TLS compilation on Cortex-M0/0+/1
Due to a known issue in Mbed TLS's architecture determination (Mbed-TLS/mbedtls#1077), we get the error error: inline assembly requires more registers than available when compiling `bignum.c` for Cortex-M0/0+/1, The workaround is to define the macro `MULADDC_CANNOT_USE_R7` which is already defined by Mbed CLI 1 but missing in our CMake support. Fixes ARMmbed/mbed-os-example-lorawan#220
1 parent 35b8e55 commit c23113f

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

tools/cmake/profiles/debug.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ function(mbed_set_profile_options target mbed_toolchain)
7878
target_compile_definitions(${target}
7979
INTERFACE
8080
__ASSERT_MSG
81-
MULADDC_CANNOT_USE_R7
8281
)
8382
endif()
8483

tools/cmake/toolchains/ARM.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ list(APPEND common_options
1818
"-mthumb"
1919
"-Wno-armcc-pragma-push-pop"
2020
"-Wno-armcc-pragma-anon-unions"
21+
"-DMULADDC_CANNOT_USE_R7"
2122
"-Wno-reserved-user-defined-literal"
2223
"-Wno-deprecated-register"
2324
"-fdata-sections"

0 commit comments

Comments
 (0)