avrd icon indicating copy to clipboard operation
avrd copied to clipboard

Turn off uncommon mcu types by default

Open dylanmckay opened this issue 8 years ago • 4 comments

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.

dylanmckay avatar Aug 22 '17 12:08 dylanmckay

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"] }

shepmaster avatar Aug 25 '17 18:08 shepmaster

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.

shepmaster avatar Aug 25 '17 18:08 shepmaster

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.

dylanmckay avatar Aug 26 '17 00:08 dylanmckay

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.

dylanmckay avatar Aug 26 '17 00:08 dylanmckay