Comments (2)
After digging in a bit more, it seems that the device struct defined in devices/device_config.bzl
might be the best way to specify architecture specific flags that would get passed to the toolchain feature functions in toolchains/features/{common,embedded}
.
I'm not quite sure if/how one might tie a toolchain with device config to a platform definition in platforms/BUILD
. The toolchains seem to be bound to the architecture by the cpu
constraint (via target_compatible_with
of native.toolchain
when the toolchains are registered). I'm curious if it makes sense to constrain on the platform as well? One could then link a device_config together with a platform definition and specify compiler/linker flags that you might want for your particular platform.
from bazel-embedded.
Sorry for the late reply. I've also been looking into this. I have been working on a complete rewrite of the toolchain suite using clang tools. Checkout bazel_rules_cc_toolchain which should support this better. The new approach allows you to swap out system libraries and sysroots fairly easily. I haven't added arm-none-eabi yet but that is eventually the goal.
The biggest challenge I am running into so far with risc-v is the lack of precompiled binaries for system libs e.g. libc, libc++ etc. ARM ships a distribution of GCC alongside pre-compiled and configured libc and libc++ implementations. This makes creating a toolchain suite a lot simpler.
If you have experience with risc-v toolchains more generally I'd be keen to collaborate on this.
from bazel-embedded.
Related Issues (13)
- Add support for mac-osx and windows HOT 17
- Windows build does not include system headers HOT 7
- README doesn't mention openocd WORKSPACE requirements HOT 1
- Dependency Dashboard
- SunCertPathBuilderException: unable to find valid certification path to requested target HOT 2
- Extensibility guidance - customizing build flags for various embedded platforms HOT 4
- Feature names are inverted
- Toolchain resolution seemingly failing and falling back to /usr/bin/gcc in some cases HOT 4
- Add support for generating .map files HOT 7
- GCC toolchain declaration shouldn't use global platforms HOT 4
- Understanding the "Getting started" example code: register_execution_platforms() registers target platforms? HOT 5
- Objcopy executable path not found? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-embedded.