satman main.rs: fix compilation error when cfg has has_rtio_moninj on release-7 #253

Merged
sb10q merged 1 commits from morgan/artiq-zynq:bugfix_moninj into release-7 2023-08-31 11:07:21 +08:00
  • fix compilation error when running nix build .#kasli_soc-satellite-jtag -L with has_rtio_moninj cfg

  • tested on master Kasli (release-7) & satellite Kasli-soc (this PR with has_rtio_moninj cfg) that connected to a TTL-SMA

    • run artiq_session on master Kasli and override TTL output on dashboard
    • verified with an oscilloscope that all TTL0..7 output can be overridden using dashboard

Compilation error with has_rtio_moninj cfg before patch

...
firmware>    Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#605c8f73)
firmware>    Compiling io v0.0.0 (/build/src/libio)
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:214:54
firmware>     |
firmware> 214 |                 csr::rtio_moninj::mon_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `probe` in this scope
firmware>    --> satman/src/main.rs:215:55
firmware>     |
firmware> 215 |                 csr::rtio_moninj::mon_probe_sel_write(probe);
firmware>     |                                                       ^^^^^ help: a local variable with a similar name exists: `_probe`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:231:54
firmware>     |
firmware> 231 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:232:58
firmware>     |
firmware> 232 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error[E0425]: cannot find value `value` in this scope
firmware>    --> satman/src/main.rs:233:51
firmware>     |
firmware> 233 |                 csr::rtio_moninj::inj_value_write(value);
firmware>     |                                                   ^^^^^ help: a local variable with a similar name exists: `_value`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:243:54
firmware>     |
firmware> 243 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:244:58
firmware>     |
firmware> 244 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error: aborting due to 7 previous errors
firmware> For more information about this error, try `rustc --explain E0425`.
firmware> error: could not compile `satman`
firmware> To learn more, run the command again with --verbose.
firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
error: builder for '/nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv' failed with exit code 2;
       last 10 log lines:
       > 244 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
       >     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
       >
       > error: aborting due to 7 previous errors
       >
       > For more information about this error, try `rustc --explain E0425`.
       > error: could not compile `satman`
       >
       > To learn more, run the command again with --verbose.
       > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
       For full logs, run 'nix log /nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv'.
error: 1 dependencies of derivation '/nix/store/wazlcp3xxmmdbdk5kfnn0fpc9alz356g-kasli_soc-satellite-jtag.drv' failed to build
- fix compilation error when running `nix build .#kasli_soc-satellite-jtag -L` with `has_rtio_moninj` cfg - tested on `master Kasli` (release-7) & `satellite Kasli-soc` (this PR with `has_rtio_moninj` cfg) that connected to a `TTL-SMA` - run `artiq_session` on `master Kasli` and override TTL output on dashboard - verified with an oscilloscope that all TTL0..7 output can be overridden using dashboard ## Related PR - #251 ## Compilation error with `has_rtio_moninj` cfg before patch ```bash ... firmware> Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#605c8f73) firmware> Compiling io v0.0.0 (/build/src/libio) firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:214:54 firmware> | firmware> 214 | csr::rtio_moninj::mon_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `probe` in this scope firmware> --> satman/src/main.rs:215:55 firmware> | firmware> 215 | csr::rtio_moninj::mon_probe_sel_write(probe); firmware> | ^^^^^ help: a local variable with a similar name exists: `_probe` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:231:54 firmware> | firmware> 231 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:232:58 firmware> | firmware> 232 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error[E0425]: cannot find value `value` in this scope firmware> --> satman/src/main.rs:233:51 firmware> | firmware> 233 | csr::rtio_moninj::inj_value_write(value); firmware> | ^^^^^ help: a local variable with a similar name exists: `_value` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:243:54 firmware> | firmware> 243 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:244:58 firmware> | firmware> 244 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error: aborting due to 7 previous errors firmware> For more information about this error, try `rustc --explain E0425`. firmware> error: could not compile `satman` firmware> To learn more, run the command again with --verbose. firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 error: builder for '/nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv' failed with exit code 2; last 10 log lines: > 244 | csr::rtio_moninj::inj_override_sel_write(overrd); > | ^^^^^^ help: a local variable with a similar name exists: `_overrd` > > error: aborting due to 7 previous errors > > For more information about this error, try `rustc --explain E0425`. > error: could not compile `satman` > > To learn more, run the command again with --verbose. > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 For full logs, run 'nix log /nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv'. error: 1 dependencies of derivation '/nix/store/wazlcp3xxmmdbdk5kfnn0fpc9alz356g-kasli_soc-satellite-jtag.drv' failed to build ```
morgan added 1 commit 2023-08-31 10:44:24 +08:00
sb10q merged commit 3d43bc8b15 into release-7 2023-08-31 11:07:21 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 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#253
There is no content yet.