main.rs: fix zc706 compiling error #249

Merged
sb10q merged 1 commits from morgan/artiq-zynq:bugfix_zc706 into master 2023-08-29 11:25:29 +08:00

Add cfg in both runtime and satman main.rs.

Tested with nix build .#zc706-acpki_nist_clock-jtag , nix build .#zc706-acpki_nist_clock_master-jtag -L , nix build .#zc706-acpki_nist_clock_satellite-jtag -L and all built successfully.

Fix zc706 compiling error due to PR #244

Add cfg in both runtime and satman main.rs. Tested with `nix build .#zc706-acpki_nist_clock-jtag` , `nix build .#zc706-acpki_nist_clock_master-jtag -L` , `nix build .#zc706-acpki_nist_clock_satellite-jtag -L` and all built successfully. Fix `zc706` compiling error due to PR #244
morgan added 1 commit 2023-08-28 17:31:26 +08:00
https://git.m-labs.hk/M-Labs/artiq-zynq/pulls/248#issuecomment-7141
sb10q closed this pull request 2023-08-28 20:09:23 +08:00
Poster
Owner

The zc706 has a different compilation error than the kasli_soc-demo. As the zc706 doesn't have io_expander, gating let (mut io_expander0, mut io_expander1) behind #[cfg(feature = "target_kasli_soc")] seem more reasonable.

...
   Compiling num-derive v0.3.3
   Compiling futures v0.3.25
warning: unused import: `core::cell::RefCell`
  --> runtime/src/main.rs:15:5
   |
15 | use core::cell::RefCell;
   |     ^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0282]: type annotations needed for `(_, _)`
   --> runtime/src/main.rs:148:10
    |
148 |     let (mut io_expander0, mut io_expander1);
    |         -^^^^^^^^^^^^^^^^-------------------
    |         ||
    |         |cannot infer type
    |         consider giving this pattern the explicit type `(_, _)`, with the type parameters specified

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0282`.
error: could not compile `runtime`

To learn more, run the command again with --verbose.
make: *** [Makefile:17: ../build/firmware/armv7-none-eabihf/release/runtime] Error 101

The zc706 has a different compilation error than the kasli_soc-demo. As the zc706 doesn't have io_expander, gating `let (mut io_expander0, mut io_expander1)` behind `#[cfg(feature = "target_kasli_soc")]` seem more reasonable. ``` ... Compiling num-derive v0.3.3 Compiling futures v0.3.25 warning: unused import: `core::cell::RefCell` --> runtime/src/main.rs:15:5 | 15 | use core::cell::RefCell; | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default error[E0282]: type annotations needed for `(_, _)` --> runtime/src/main.rs:148:10 | 148 | let (mut io_expander0, mut io_expander1); | -^^^^^^^^^^^^^^^^------------------- | || | |cannot infer type | consider giving this pattern the explicit type `(_, _)`, with the type parameters specified error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0282`. error: could not compile `runtime` To learn more, run the command again with --verbose. make: *** [Makefile:17: ../build/firmware/armv7-none-eabihf/release/runtime] Error 101 ```
morgan reopened this pull request 2023-08-29 11:19:33 +08:00
sb10q merged commit 1516327c26 into master 2023-08-29 11:25:29 +08:00
morgan deleted branch bugfix_zc706 2023-08-29 13:21:15 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#249
There is no content yet.