Skip to content

Conversation

@cr1901
Copy link
Contributor

@cr1901 cr1901 commented Apr 15, 2021

The -g option emits a separate file called generic.rs to split the generic code from the peripherals.

Right now the -g option requires a user to manually add something like the following lines to lib.rs:

use generic::*;
pub mod generic;

Otherwise compilation will fail with errors like the following:

     error[E0433]: failed to resolve: maybe a missing crate `FieldReader`?
   --> src\port_1_2\p2ifg.rs:111:25
    |
111 |         P2IFG2_R(crate::FieldReader::new(bits))
    |                         ^^^^^^^^^^^ maybe a missing crate `FieldReader`?

This patch automates adding the above code.

@cr1901 cr1901 requested a review from a team as a code owner April 15, 2021 22:19
@rust-highfive
Copy link

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Apr 15, 2021
… `-g` option.

Co-authored-by: Adam Greig <adam@adamgreig.com>
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors merge

@bors bors bot merged commit 26baf2c into rust-embedded:master Apr 15, 2021
bors bot added a commit that referenced this pull request Apr 17, 2021
509: move interrupt generation after generic file r=adamgreig a=burrbull

related to #507 

r? @adamgreig 

Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants