-
Notifications
You must be signed in to change notification settings - Fork 0
🚀 Add ARM Cortex-M cross-compilation support and consolidate to LLVM 20 #19
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The answer I've been looking for is `--default-script` for lld. Without this, test_packages cannot build because a linker script isn't provided. We are in a hard place like we were with the ARM GNU Toolchain where we needed to supply a `.specs` for the libc to allow test_packages to link. We found that `--specs=nosys.specs` does the trick because it provides weak defaults which allow linking but can overridden by the addition of any other specification such as picolibc. I removed LLMV 19 because I got the following linker errors (repeated): ``` ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:278: symbol not found: __end ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:279: symbol not found: __stack ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:278: symbol not found: __end ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:279: symbol not found: __stack ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:278: symbol not found: __end ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:279: symbol not found: __stack ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:278: symbol not found: __end ld.lld: error: .conan2/p/b/llvm-08844596518f5/p/bin/../lib/clang-runtimes/arm-none-eabi/armv7m_soft_nofp_exn_rtti/lib/picolibcpp.ld:279: symbol not found: __stack ``` I see no reason to support LLVM 19 if we need to work around these sorts of issues. No issues came from compiling 20.1.0 so we will start our toolchain versions from there and go upwards.
Rather than doing this, we will let the demo application automatically execute on build if not cross compiling.
I don't know why I didn't do this before. Conan only supports whole number variants of LLVM. So there is no need to keep the exact version for anything within 20. If they release a newer version then we can upgrade it. Users wanting the older revision can use the older revision number. This greatly reduces the number of versions we need to maintain into the future and makes developing with llvm a very easy task. Rather than complex versioning, we just have llvm-20 or llvm-X where X is the major version number.
5ed12f3 to
d63ceff
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #22
This commit adds comprehensive support for ARM Cortex-M microcontrollers by
integrating the ARM LLVM Embedded Toolchain alongside the upstream LLVM
releases. The package now intelligently selects the appropriate toolchain
variant based on the target architecture.
Major changes:
m7f, m7d, m23, m33, m33f, m35p, m35pf, m55, m85)
targets and upstream LLVM for all other targets
arm-embedded)
Breaking changes:
Note: The upstream LLVM version (20.1.8) and ARM Embedded Toolchain version
(20.1.0) do not match exactly. Both are packaged under version "20" as they
are the most recent official releases from their respective sources at the
time of packaging.