avrd icon indicating copy to clipboard operation
avrd copied to clipboard

build script always generates all mcus

Open FlyingGaz opened this issue 4 years ago • 0 comments

The check for the target arch in the build script doesn't work.

https://github.com/avr-rust/avrd/blob/6072399dfe037d2807abb4058d4da6f045cc3f6c/build.rs#L13 Checking the environment variable CARGO_CFG_TARGET_ARCH would probably be the correct way (like avr_mcu::is_compiling_for_avr()).

I would have submitted a pull request, but with rustc 1.47.0-nightly (6c8927b0c 2020-07-26) I get the following error when retrieving the current mcu.

thread 'main' panicked at 'cannot retrieve mcu name, use a version of the avr-rust compiler that exposes the 'target_cpu' configuration option', avr-mcu-0.2.6\src\current.rs:35:24

I'm guessing, this will have to wait until a solution for exposing target_cpu is found.

FlyingGaz avatar Jul 27 '20 10:07 FlyingGaz