Skip to content

CMake: Fix Mbed TLS compilation on Cortex-M0/0+/1/M23 #14529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions connectivity/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,20 @@ target_compile_definitions(mbed-mbedtls
INTERFACE
MBED_CONF_MBEDTLS_PRESENT=1
)

# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
# which affects cores without __thumb2__ set by the compiler
# due to the lack of full Thumb-2 support
set(partial-thumb2-cores
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M23
Cortex-M23-NS
)
if(MBED_CPU_CORE IN_LIST partial-thumb2-cores)
target_compile_definitions(mbed-mbedtls
INTERFACE
MULADDC_CANNOT_USE_R7
)
endif()
1 change: 0 additions & 1 deletion tools/cmake/profiles/debug.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function(mbed_set_profile_options target mbed_toolchain)
target_compile_definitions(${target}
INTERFACE
__ASSERT_MSG
MULADDC_CANNOT_USE_R7
)
endif()

Expand Down