Open dylanmckay opened 7 years ago
like features = ["automotive"] to enable them.
Is there a reason to ever compile anything but the current one? It kind of seems like every mcu should be a feature. When you go to use this library, you'd say
[dependencies]
avrd = { version = "0.1.0", features = ["my-awesome-one"] }
Having said that, the use of features could prove to be very annoying in such a case. The user wants to set this configuration and then much lower-level code would presumably make decisions based on it... I'm not sure how the features would flow through the dependencies in that case.
That's an interesting point.
I like the idea of easily being able to compile all boards.
I recently added a target_cpu
cfg attribute to the AVR rust fork, which can be used to detect the current board.
Maybe we could edit the build script to default to compiling the pack for the current board, but allow something like features = ["all"]
which includes everything.
Is there a reason to ever compile anything but the current one?
Yes, I want this crate to also be used in tooling. I'd like to write a Rust flashing tool, which needs to know some of the MCU internals exposed in the packfiles that we have here. In this case, the tool would need to know of all possible mcus.
Compilation time is quite long because we generate modules for each and every mcu, even ones for the automotive-specific microcontrollers.
Look into disabling them by default, so that you must then use something like
features = ["automotive"]
to enable them.