Skip to content
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

Turn off uncommon mcu types by default #3

Open
dylanmckay opened this issue Aug 22, 2017 · 4 comments
Open

Turn off uncommon mcu types by default #3

dylanmckay opened this issue Aug 22, 2017 · 4 comments

Comments

@dylanmckay
Copy link
Member

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.

@shepmaster
Copy link
Member

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
Copy link
Member

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.

@dylanmckay
Copy link
Member Author

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants