-
Notifications
You must be signed in to change notification settings - Fork 8
Set up a hermetic toolchain #13
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| def rules_pico_toolchains(): | ||
| native.register_toolchains("//toolchain:gcc-pico") | ||
| native.register_toolchains("//toolchain:gcc-pico_linux_x86_64") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bazel query "@rules_pico//toolchain:*"
@rules_pico//toolchain:BUILD
@rules_pico//toolchain:cc_toolchain_darwin_x86_64_gcc-pico
@rules_pico//toolchain:cc_toolchain_linux_aarch64_gcc-pico
@rules_pico//toolchain:cc_toolchain_linux_x86_64_gcc-pico
@rules_pico//toolchain:cc_toolchain_windows_x86_64_gcc-pico
@rules_pico//toolchain:config_darwin_x86_64_gcc-pico
@rules_pico//toolchain:config_linux_aarch64_gcc-pico
@rules_pico//toolchain:config_linux_x86_64_gcc-pico
@rules_pico//toolchain:config_windows_x86_64_gcc-pico
@rules_pico//toolchain:empty
@rules_pico//toolchain:gcc-pico_darwin_x86_64
@rules_pico//toolchain:gcc-pico_linux_aarch64
@rules_pico//toolchain:gcc-pico_linux_x86_64
@rules_pico//toolchain:gcc-pico_windows_x86_64
Lots of generated targets. I just picked the one I wanted; I imagine something fancier is needed here.
| "@platforms//cpu:armv6-m", | ||
| "@koro-platforms//cxx:14", | ||
| ], | ||
| target_platform = True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using latest Bazel 7.0.0 and this option wasn't recognized; seemed safe to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its been a while since I worked on this and it looks like things have changed in the meantime. I'm currently using bazel 5.4.1. I'll try to figure out if this is needed.
|
I love the idea but I don't see FreeBSD in the list of platforms. Since FreeBSD is the only platform I use for pico development, thats a blocker. If we could get FreeBSD added to https://github.com/hexdae/bazel-arm-none-eabi, then I would be happy to merge this. |
|
Do you know where FreeBSD distributions of the toolchain can be found? Setting it up doesn't look too bad, but I'm not sure where do find the package. |
|
I use the gcc-arm-embedded package and I typically install it on the host manually: |
|
I found https://www.freshports.org/devel/gcc-arm-embedded/ but am struggling to find a way to download it. Is there something I'm missing? |
Replace the toolchain setup with a hermetic toolchain from https://github.com/hexdae/bazel-arm-none-eabi. This addresses issue #10
NOTE: The output files differ; I paid minimal attention to what changed and simply tested by flashing the
hello_usb.cprogram with each toolchain onto my Pico.