Skip to content

Workaround for Cortex-M33 Arm toochain linking #14401

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
Mar 11, 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
7 changes: 7 additions & 0 deletions tools/cmake/cores/Cortex-M33-NS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
"-mcpu=cortex-m33+nodsp"
"-mfpu=none"
)
list(APPEND link_options
# Necessary as the linker does not always detect
# the architecture from the objectfiles correctly.
# Also, the complete flag should be "--cpu=Cortex-M33.no_dsp.no_fp"
# but this currently conflicts with CMake's compiler test until fixed
"--cpu=Cortex-M33.no_fp"
Copy link
Contributor Author

@LDong-Arm LDong-Arm Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 This works, as long as no_dsp is not there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar change for Cortex-M4 made by ST:

#Necessary as the linker does not always detect
#the architecture from the objectfiles correctly.
list(APPEND link_options
"--cpu=Cortex-M4.no_fp"
)

)
endif()

function(mbed_set_cpu_core_definitions target)
Expand Down
7 changes: 7 additions & 0 deletions tools/cmake/cores/Cortex-M33.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
"-mcpu=cortex-m33+nodsp"
"-mfpu=none"
)
list(APPEND link_options
# Necessary as the linker does not always detect
# the architecture from the objectfiles correctly.
# Also, the complete flag should be "--cpu=Cortex-M33.no_dsp.no_fp"
# but this currently conflicts with CMake's compiler test until fixed
"--cpu=Cortex-M33.no_fp"
)
endif()

function(mbed_set_cpu_core_definitions target)
Expand Down