Skip to content

app/lpc55xpresso/app-sprot.toml is busted on master #2056

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

Open
hawkw opened this issue May 2, 2025 · 2 comments
Open

app/lpc55xpresso/app-sprot.toml is busted on master #2056

hawkw opened this issue May 2, 2025 · 2 comments

Comments

@hawkw
Copy link
Member

hawkw commented May 2, 2025

Discovered while going through all the app.tomls and testing if they build with the zerocopy update as part of #2054, it looks like this TOML doesn't build (and isn't checked on CI). It seems the SWD driver is missing some notifications, I assume adding them will fix it:

error: could not compile `drv-lpc55-swd` (bin "drv-lpc55-swd") due to 27 previous errors
Error: failed to build swd

Caused by:
    Missing notifications; do you need to add them to your TOML file?
    - swd is missing ["jtag-detect-irq", "sp-reset-irq", "timer"]
Full build output (lengthy)
eliza@theseus ~/Code/oxide/hubris $ cargo xtask dist app/lpc55xpresso/app-sprot.toml
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.22s
     Running `target/debug/xtask dist app/lpc55xpresso/app-sprot.toml`
app.toml has changed; rebuilding all tasks
cleaning ["lpc55xpresso", "task-jefe", "task-hiffy", "task-idle", "lpc55-update-server", "drv-lpc55-syscon", "drv-lpc55-gpio", "drv-user-leds", "drv-lpc55-usart", "drv-lpc55-i2c", "drv-lpc55-rng", "task-pong", "drv-lpc55-swd", "task-dumper", "drv-lpc55-sprot-server", "task-attest"]
     Removed 223 files, 509.4MiB total
building crate task-jefe
   Compiling task-jefe v0.1.0 (/home/eliza/Code/oxide/hubris/task/jefe)
   Compiling hubris-num-tasks v0.1.0 (/home/eliza/Code/oxide/hubris/sys/num-tasks)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.97s
target/thumbv8m.main-none-eabihf/release/task-jefe -> target/lpc55xpresso-sprot/dist/jefe.elf
building crate task-hiffy
   Compiling drv-lpc55-gpio-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-gpio-api)
   Compiling hubris-num-tasks v0.1.0 (/home/eliza/Code/oxide/hubris/sys/num-tasks)
   Compiling task-hiffy v0.1.0 (/home/eliza/Code/oxide/hubris/task/hiffy)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.84s
target/thumbv8m.main-none-eabihf/release/task-hiffy -> target/lpc55xpresso-sprot/dist/hiffy.elf
building crate task-idle
   Compiling task-idle v0.1.0 (/home/eliza/Code/oxide/hubris/task/idle)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.27s
target/thumbv8m.main-none-eabihf/release/task-idle -> target/lpc55xpresso-sprot/dist/idle.elf
building crate lpc55-update-server
   Compiling lpc55-update-server v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-update-server)
   Compiling drv-lpc55-syscon-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-syscon-api)
    Finished `release` profile [optimized + debuginfo] target(s) in 1.56s
target/thumbv8m.main-none-eabihf/release/lpc55-update-server -> target/lpc55xpresso-sprot/dist/update_server.elf
building crate drv-lpc55-syscon
   Compiling drv-lpc55-syscon v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-syscon)
   Compiling drv-lpc55-syscon-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-syscon-api)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.67s
target/thumbv8m.main-none-eabihf/release/drv-lpc55-syscon -> target/lpc55xpresso-sprot/dist/syscon_driver.elf
building crate drv-lpc55-gpio
   Compiling drv-lpc55-gpio v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-gpio)
   Compiling drv-lpc55-gpio-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-gpio-api)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.78s
target/thumbv8m.main-none-eabihf/release/drv-lpc55-gpio -> target/lpc55xpresso-sprot/dist/gpio_driver.elf
building crate drv-user-leds
   Compiling enum-map v2.7.3
   Compiling drv-user-leds v0.1.0 (/home/eliza/Code/oxide/hubris/drv/user-leds)
   Compiling drv-user-leds-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/user-leds-api)
   Compiling drv-lpc55-gpio-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-gpio-api)
cargo:rerun-if-env-changed=HUBRIS_TASK_CONFIG
cargo:rerun-if-env-changed=HUBRIS_TASK_NAME
    Finished `release` profile [optimized + debuginfo] target(s) in 0.72s
target/thumbv8m.main-none-eabihf/release/drv-user-leds -> target/lpc55xpresso-sprot/dist/user_leds.elf
building crate drv-lpc55-usart
   Compiling build-lpc55pins v0.1.0 (/home/eliza/Code/oxide/hubris/build/lpc55pins)
   Compiling drv-lpc55-usart v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-usart)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.96s
target/thumbv8m.main-none-eabihf/release/drv-lpc55-usart -> target/lpc55xpresso-sprot/dist/usart_driver.elf
building crate drv-lpc55-i2c
   Compiling drv-lpc55-i2c v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-i2c)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.50s
target/thumbv8m.main-none-eabihf/release/drv-lpc55-i2c -> target/lpc55xpresso-sprot/dist/i2c_driver.elf
building crate drv-lpc55-rng
   Compiling num-traits v0.2.19
   Compiling num-integer v0.1.44
   Compiling num-iter v0.1.42
   Compiling num-rational v0.4.0
   Compiling rand_core v0.6.4
   Compiling ppv-lite86 v0.2.15
   Compiling drv-lpc55-rng v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-rng)
   Compiling drv-rng-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/rng-api)
   Compiling rand_chacha v0.3.1
   Compiling userlib v0.1.0 (/home/eliza/Code/oxide/hubris/sys/userlib)
   Compiling num-complex v0.4.0
   Compiling idol-runtime v0.1.0 (https://github.com/oxidecomputer/idolatry.git?branch=eliza/zerocopy-0.8#06a3c333)
   Compiling drv-lpc55-syscon-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-syscon-api)
   Compiling num v0.4.0
    Finished `release` profile [optimized + debuginfo] target(s) in 1.71s
target/thumbv8m.main-none-eabihf/release/drv-lpc55-rng -> target/lpc55xpresso-sprot/dist/rng_driver.elf
building crate task-pong
   Compiling task-pong v0.1.0 (/home/eliza/Code/oxide/hubris/task/pong)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.48s
target/thumbv8m.main-none-eabihf/release/task-pong -> target/lpc55xpresso-sprot/dist/pong.elf
building crate drv-lpc55-swd
   Compiling endoscope-abi v0.1.0 (/home/eliza/Code/oxide/hubris/lib/endoscope-abi)
   Compiling drv-lpc55-gpio-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-gpio-api)
   Compiling drv-lpc55-spi v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-spi)
   Compiling endoscope v0.1.0 (/home/eliza/Code/oxide/hubris/lib/endoscope)
   Compiling drv-lpc55-swd v0.1.0 (/home/eliza/Code/oxide/hubris/drv/lpc55-swd)
error[E0425]: cannot find value `TIMER_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:592:52
    |
592 |         set_timer_relative(time_ms, notifications::TIMER_MASK);
    |                                                    ^^^^^^^^^^ not found in `notifications`
    |
help: consider importing one of these constants
    |
93  + use crate::notifications::jefe::TIMER_MASK;
    |
93  + use crate::notifications::pong::TIMER_MASK;
    |
93  + use crate::notifications::user_leds::TIMER_MASK;
    |
help: if you import `TIMER_MASK`, refer to it directly
    |
592 -         set_timer_relative(time_ms, notifications::TIMER_MASK);
592 +         set_timer_relative(time_ms, TIMER_MASK);
    |

error[E0425]: cannot find value `TIMER_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:610:44
    |
610 |         sys_set_timer(None, notifications::TIMER_MASK);
    |                                            ^^^^^^^^^^ not found in `notifications`
    |
help: consider importing one of these constants
    |
93  + use crate::notifications::jefe::TIMER_MASK;
    |
93  + use crate::notifications::pong::TIMER_MASK;
    |
93  + use crate::notifications::user_leds::TIMER_MASK;
    |
help: if you import `TIMER_MASK`, refer to it directly
    |
610 -         sys_set_timer(None, notifications::TIMER_MASK);
610 +         sys_set_timer(None, TIMER_MASK);
    |

error[E0425]: cannot find value `TIMER_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:647:24
    |
647 |         notifications::TIMER_MASK
    |                        ^^^^^^^^^^ not found in `notifications`
    |
help: consider importing one of these constants
    |
93  + use crate::notifications::jefe::TIMER_MASK;
    |
93  + use crate::notifications::pong::TIMER_MASK;
    |
93  + use crate::notifications::user_leds::TIMER_MASK;
    |
help: if you import `TIMER_MASK`, refer to it directly
    |
647 -         notifications::TIMER_MASK
647 +         TIMER_MASK
    |

error[E0425]: cannot find value `SP_RESET_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:648:30
    |
648 |             + notifications::SP_RESET_IRQ_MASK
    |                              ^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `JTAG_DETECT_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:649:30
    |
649 |             + notifications::JTAG_DETECT_IRQ_MASK
    |                              ^^^^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `JTAG_DETECT_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:666:35
    |
666 |         if (bits & notifications::JTAG_DETECT_IRQ_MASK) != 0 {
    |                                   ^^^^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `SP_TO_ROT_JTAG_DETECT_L_PINT_SLOT` in this scope
   --> drv/lpc55-swd/src/main.rs:668:36
    |
668 |             const SLOT: PintSlot = SP_TO_ROT_JTAG_DETECT_L_PINT_SLOT;
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `JTAG_DETECT_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:684:44
    |
684 |             sys_irq_control(notifications::JTAG_DETECT_IRQ_MASK, true);
    |                                            ^^^^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `TIMER_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:687:35
    |
687 |         if (bits & notifications::TIMER_MASK) != 0 {
    |                                   ^^^^^^^^^^ not found in `notifications`
    |
help: consider importing one of these constants
    |
93  + use crate::notifications::jefe::TIMER_MASK;
    |
93  + use crate::notifications::pong::TIMER_MASK;
    |
93  + use crate::notifications::user_leds::TIMER_MASK;
    |
help: if you import `TIMER_MASK`, refer to it directly
    |
687 -         if (bits & notifications::TIMER_MASK) != 0 {
687 +         if (bits & TIMER_MASK) != 0 {
    |

error[E0425]: cannot find value `TIMER_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:693:56
    |
693 |                     sys_set_timer(None, notifications::TIMER_MASK);
    |                                                        ^^^^^^^^^^ not found in `notifications`
    |
help: consider importing one of these constants
    |
93  + use crate::notifications::jefe::TIMER_MASK;
    |
93  + use crate::notifications::pong::TIMER_MASK;
    |
93  + use crate::notifications::user_leds::TIMER_MASK;
    |
help: if you import `TIMER_MASK`, refer to it directly
    |
693 -                     sys_set_timer(None, notifications::TIMER_MASK);
693 +                     sys_set_timer(None, TIMER_MASK);
    |

error[E0425]: cannot find value `SP_RESET_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:733:35
    |
733 |         if (bits & notifications::SP_RESET_IRQ_MASK) != 0 {
    |                                   ^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN_PINT_SLOT` in this scope
   --> drv/lpc55-swd/src/main.rs:750:36
    |
750 |             const SLOT: PintSlot = ROT_TO_SP_RESET_L_IN_PINT_SLOT;
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN_PINT_SLOT` in this scope
   --> drv/lpc55-swd/src/main.rs:755:17
    |
755 |                 ROT_TO_SP_RESET_L_IN_PINT_SLOT,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN_PINT_SLOT` in this scope
   --> drv/lpc55-swd/src/main.rs:760:17
    |
760 |                 ROT_TO_SP_RESET_L_IN_PINT_SLOT,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `SP_RESET_IRQ_MASK` in module `notifications`
   --> drv/lpc55-swd/src/main.rs:767:32
    |
767 |                 notifications::SP_RESET_IRQ_MASK,
    |                                ^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `SP_TO_ROT_JTAG_DETECT_L` in this scope
    --> drv/lpc55-swd/src/main.rs:1021:23
     |
1021 |         gpio.read_val(SP_TO_ROT_JTAG_DETECT_L) == Value::Zero
     |                       ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_OUT` in this scope
    --> drv/lpc55-swd/src/main.rs:1368:22
     |
1368 |         gpio.set_val(ROT_TO_SP_RESET_L_OUT, Value::Zero);
     |                      ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN` in this scope
    --> drv/lpc55-swd/src/main.rs:1374:22
     |
1374 |         gpio.set_val(ROT_TO_SP_RESET_L_IN, Value::One); // should be a no-op
     |                      ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN` in this scope
    --> drv/lpc55-swd/src/main.rs:1468:48
     |
1468 |             let sp_reset_state = gpio.read_val(ROT_TO_SP_RESET_L_IN);
     |                                                ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN` in this scope
    --> drv/lpc55-swd/src/main.rs:1658:52
     |
1658 |                 let sp_reset_state = gpio.read_val(ROT_TO_SP_RESET_L_IN);
     |                                                    ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN_PINT_SLOT` in this scope
    --> drv/lpc55-swd/src/main.rs:1694:32
     |
1694 |         const SLOT: PintSlot = ROT_TO_SP_RESET_L_IN_PINT_SLOT;
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ROT_TO_SP_RESET_L_IN_PINT_SLOT` in this scope
    --> drv/lpc55-swd/src/main.rs:1960:9
     |
1960 |         ROT_TO_SP_RESET_L_IN_PINT_SLOT,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `SP_RESET_IRQ_MASK` in module `notifications`
    --> drv/lpc55-swd/src/main.rs:1964:36
     |
1964 |     sys_irq_control(notifications::SP_RESET_IRQ_MASK, true);
     |                                    ^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find value `SP_TO_ROT_JTAG_DETECT_L_PINT_SLOT` in this scope
    --> drv/lpc55-swd/src/main.rs:1970:9
     |
1970 |         SP_TO_ROT_JTAG_DETECT_L_PINT_SLOT,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `JTAG_DETECT_IRQ_MASK` in module `notifications`
    --> drv/lpc55-swd/src/main.rs:1974:36
     |
1974 |     sys_irq_control(notifications::JTAG_DETECT_IRQ_MASK, true);
     |                                    ^^^^^^^^^^^^^^^^^^^^ not found in `notifications`

error[E0425]: cannot find function `setup_rot_to_sp_reset_l_out` in this scope
    --> drv/lpc55-swd/src/main.rs:1366:9
     |
1366 |         setup_rot_to_sp_reset_l_out(self.gpio);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `setup_rot_to_sp_reset_l_in` in this scope
    --> drv/lpc55-swd/src/main.rs:1373:9
     |
1373 |         setup_rot_to_sp_reset_l_in(self.gpio);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `drv-lpc55-swd` (bin "drv-lpc55-swd") due to 27 previous errors
Error: failed to build swd

Caused by:
    Missing notifications; do you need to add them to your TOML file?
    - swd is missing ["jtag-detect-irq", "sp-reset-irq", "timer"]
@aapoalas
Copy link
Contributor

aapoalas commented May 3, 2025

#1920 PR of mine fixed it at least when I created it; probably it would fix it today as well.

@labbott
Copy link
Collaborator

labbott commented May 5, 2025

I'd vote for this app configuration to be deleted per the top

# This is a variation on the main LPC55xpresso `app.toml` that allows it to be
# used as an SP-RoT tester, attached to a Gimletlet.  Only the SPI target should
# work; using the LPC55Xpresso as a debugger for the Gimletlet would require
# additional changes to this file.

We have many many better options at this point

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

No branches or pull requests

3 participants