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

Add development instructions to Readme #51

Merged
merged 1 commit into from
Apr 25, 2020
Merged

Add development instructions to Readme #51

merged 1 commit into from
Apr 25, 2020

Conversation

Walther
Copy link
Contributor

@Walther Walther commented Apr 25, 2020

Suggestion: add development instructions in the readme, to make contributing easier.
Let me know if there's more steps required!

Before running these steps, I wasn't able to run cargo check in the workspace:

cargo check
error: failed to read `/Users/walther/git/imxrt-rs/imxrt-ral/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

After these steps, I can run cargo check, but I get 8324 errors 😅

errors.txt

error: aborting due to 8324 previous errors

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `imxrt-hal`.

@mciantyre
Copy link
Member

Thanks!

If you hit other contribution hiccups and need more information, let us know.

@mciantyre mciantyre merged commit 279ccc9 into imxrt-rs:master Apr 25, 2020
@mciantyre mciantyre mentioned this pull request Apr 25, 2020
@mciantyre mciantyre added the documentation Improvements or additions to documentation label Apr 25, 2020
@Walther
Copy link
Contributor Author

Walther commented Apr 28, 2020

Any suggestions on how to fix the 8 thousand macro errors? I think there must be some other setup step I'm still missing 😅
imxrt-rs--errors.txt

@mciantyre
Copy link
Member

mciantyre commented Apr 28, 2020

Both the RAL and the HAL require that you to specify a feature flag. Are you specifying a feature-flag in your build?

The feature flag specifies the iMXRT variant we're using. The RAL supports all of the iMXRT chips; the HAL only supports the imxrt1062.

When developing the HAL crate for iMXRT1062 chips, I normally check the build with

cd imxrt-hal
cargo check --features imxrt1062

@Walther
Copy link
Contributor Author

Walther commented Apr 28, 2020

That was it, thank you! Maybe the feature flags should also be mentioned in the Readme 🤔

@Walther
Copy link
Contributor Author

Walther commented Apr 28, 2020

Addendum: how do I make rust-analyzer / editor integrations be aware of the feature flag you mentioned, or configure it on the workspace level? Editor seems to be unaware where to find most things

Screenshot 2020-04-29 at 1 23 11

Screenshot 2020-04-29 at 1 25 01

@mciantyre
Copy link
Member

Thanks for working through that! I've added #53 as my task to improve documentation and contribution guidance for the project.

Addendum: how do I make rust-analyzer / editor integrations be aware of the feature flag you mentioned, or configure it on the workspace level?

This is something I'm still struggling with 😛Here's the .vscode settings that I've been using:

$ cat imxrt-hal/.vscode/settings.json

{
    "rust-analyzer.cargo.allFeatures": false,
    "rust-analyzer.cargo.features": [
        "imxrt1062"
    ],
    "rust-analyzer.checkOnSave.allTargets": false,
    "rust-analyzer.cargo.noDefaultFeatures": true,
    "rust-analyzer.checkOnSave.extraArgs": [
        "--features imxrt1062"
    ]
}

My workspace is typically the imxrt-hal directory itself, not the entire imxrt-rs project.

I've only recently adopted rust-analyzer, and may be some killer rust-analyzer features that I'm missing out on.

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

Successfully merging this pull request may close these issues.

None yet

2 participants