Skip to content

build script always generates all mcus #20

@FlyingGaz

Description

@FlyingGaz

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

avrd/build.rs

Line 13 in 6072399

if cfg!(arch = "avr") {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions