├── .cargo └── config.toml ├── .github ├── buildomat │ ├── build-one.sh │ ├── config.toml │ ├── force-git-over-https.sh │ ├── jobs │ │ ├── gimlet-c-lab.sh │ │ ├── gimlet-c.sh │ │ ├── gimlet-d-lab.sh │ │ ├── gimlet-d.sh │ │ ├── gimlet-e-lab.sh │ │ ├── gimlet-e.sh │ │ ├── gimlet-f-lab.sh │ │ ├── gimlet-f.sh │ │ ├── psc-b.sh │ │ ├── psc-c.sh │ │ ├── rot.sh │ │ ├── sidecar-b-lab.sh │ │ ├── sidecar-b.sh │ │ ├── sidecar-c-lab.sh │ │ ├── sidecar-c.sh │ │ ├── sidecar-d-lab.sh │ │ ├── sidecar-d.sh │ │ ├── sign-sp1.sh │ │ └── sign-sp2.sh │ ├── notes.md │ └── permslip-setup.sh └── workflows │ ├── build-boards.yml │ ├── build-one.yml │ ├── dist.yml │ ├── documentation.yml │ ├── formatting.yml │ ├── license-check.yml │ ├── release-builds.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .licenserc.yaml ├── .rustfmt.toml ├── CODEOWNERS ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── FAQ.mkdn ├── LICENSE.txt ├── README.mkdn ├── app ├── cosmo │ ├── Cargo.toml │ ├── README.md │ ├── base.toml │ ├── build.rs │ ├── dev.toml │ ├── lab.toml │ ├── rev-a-dev.toml │ ├── rev-a-lab.toml │ ├── rev-a.toml │ └── src │ │ ├── main.rs │ │ └── tracing.rs ├── demo-stm32f4-discovery │ ├── Cargo.toml │ ├── README.md │ ├── app-f3.toml │ ├── app.toml │ └── src │ │ └── main.rs ├── demo-stm32g0-nucleo │ ├── Cargo.toml │ ├── README.md │ ├── app-g031.toml │ ├── app-g070-mini.toml │ ├── app-g070.toml │ ├── app-g0b1.toml.noworky │ ├── build.rs │ └── src │ │ └── main.rs ├── demo-stm32h7-nucleo │ ├── Cargo.toml │ ├── README.md │ ├── app-h743.toml │ ├── app-h753.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── donglet │ ├── Cargo.toml │ ├── README.md │ ├── app-g031-i2c.toml │ ├── app-g031.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── gemini-bu │ ├── Cargo.toml │ ├── README.md │ ├── app.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── gimlet │ ├── Cargo.toml │ ├── README.md │ ├── base.toml │ ├── build.rs │ ├── dev.toml │ ├── lab.toml │ ├── rev-b-dev.toml │ ├── rev-b-lab.toml │ ├── rev-b.toml │ ├── rev-c-dev.toml │ ├── rev-c-lab.toml │ ├── rev-c.toml │ ├── rev-d-dev.toml │ ├── rev-d-lab.toml │ ├── rev-d.toml │ ├── rev-e-dev.toml │ ├── rev-e-lab.toml │ ├── rev-e.toml │ ├── rev-f-dev.toml │ ├── rev-f-lab.toml │ ├── rev-f.toml │ └── src │ │ ├── main.rs │ │ └── tracing.rs ├── gimletlet │ ├── Cargo.toml │ ├── README.md │ ├── app-meanwell.toml │ ├── app-mgmt.toml │ ├── app-sidecar-emulator.toml │ ├── app.toml │ ├── base-gimletlet2.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── grapefruit │ ├── Cargo.toml │ ├── README.md │ ├── app-dev.toml │ ├── app-ruby.toml │ ├── base.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── lpc55xpresso │ ├── Cargo.toml │ ├── README.md │ ├── app.toml │ ├── bootleby-lpc55xpresso.zip │ ├── jlink.gdb │ ├── src │ │ └── main.rs │ └── wipecmpa.gdb ├── medusa │ ├── Cargo.toml │ ├── README.md │ ├── base.toml │ ├── build.rs │ ├── model-a.toml │ └── src │ │ └── main.rs ├── minibar │ ├── Cargo.toml │ ├── app-net.toml │ ├── app.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── oxcon2023g0 │ ├── Cargo.toml │ ├── README.md │ ├── app.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── oxide-rot-1 │ ├── Cargo.toml │ ├── README.md │ ├── app-dev.toml │ ├── app.toml │ ├── bootleby-oxide-rot-1.zip │ └── src │ │ └── main.rs ├── psc │ ├── Cargo.toml │ ├── README.md │ ├── base.toml │ ├── build.rs │ ├── dev.toml │ ├── rev-b-dev.toml │ ├── rev-b.toml │ ├── rev-c-dev.toml │ ├── rev-c.toml │ └── src │ │ └── main.rs ├── rot-carrier │ ├── Cargo.toml │ ├── README.md │ ├── app.toml │ ├── bootleby-rot-carrier.zip │ └── src │ │ └── main.rs └── sidecar │ ├── Cargo.toml │ ├── README.md │ ├── base.toml │ ├── build.rs │ ├── dev.toml │ ├── lab.toml │ ├── rev-b-dev.toml │ ├── rev-b-lab.toml │ ├── rev-b.toml │ ├── rev-c-dev.toml │ ├── rev-c-lab.toml │ ├── rev-c.toml │ ├── rev-d-dev.toml │ ├── rev-d-lab.toml │ ├── rev-d.toml │ └── src │ └── main.rs ├── boards ├── README.mkdn ├── cosmo-a.toml ├── donglet-g030.toml ├── donglet-g031.toml ├── gemini-bu-1.toml ├── gimlet-b.toml ├── gimlet-c.toml ├── gimlet-d.toml ├── gimlet-e.toml ├── gimlet-f.toml ├── gimletlet-1.toml ├── gimletlet-2.toml ├── grapefruit.toml ├── lpcxpresso55s69.toml ├── medusa-a.toml ├── minibar.toml ├── nucleo-h743zi2.toml ├── nucleo-h753zi.toml ├── oxcon2023g0.toml ├── oxide-rot-1-selfsigned.toml ├── oxide-rot-1.toml ├── psc-b.toml ├── psc-c.toml ├── rot-carrier-1.toml ├── rot-carrier-2.toml ├── sidecar-b.toml ├── sidecar-c.toml ├── sidecar-d.toml ├── stm32f3-discovery.toml ├── stm32f4-discovery.toml ├── stm32g031-nucleo.toml ├── stm32g070-nucleo.toml └── stm32g0b1-nucleo.toml ├── build ├── call_rustfmt │ ├── Cargo.toml │ └── src │ │ ├── bin │ │ └── exercise.rs │ │ └── lib.rs ├── fpga-regmap │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── i2c │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── kconfig │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── lib.rs ├── kernel-link.x ├── lpc55pins │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── net │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── phash-gen │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── spi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32xx-sys │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── task-link.x ├── task-rlink.x ├── task-tlink.x ├── toml-patch │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── util │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── lib.rs └── xtask │ ├── Cargo.toml │ └── src │ ├── auxflash.rs │ ├── caboose_pos.rs │ ├── clippy.rs │ ├── config.rs │ ├── dist.rs │ ├── elf.rs │ ├── flash.rs │ ├── graph.rs │ ├── humility.rs │ ├── lsp.rs │ ├── main.rs │ ├── print.rs │ ├── sizes.rs │ └── task_slot.rs ├── chips ├── lpc55 │ ├── chip.toml │ ├── memory.toml │ └── openocd.gdb ├── stm32f3 │ ├── chip.toml │ ├── memory.toml │ ├── openocd.cfg │ └── openocd.gdb ├── stm32f4 │ ├── chip.toml │ ├── memory.toml │ ├── openocd.cfg │ └── openocd.gdb ├── stm32g0 │ ├── chip.toml │ ├── memory-g030x6.toml │ ├── memory-g031x8.toml │ ├── memory-g070.toml │ ├── openocd.cfg │ └── openocd.gdb └── stm32h7 │ ├── chip.toml │ ├── memory-large.toml │ ├── memory.toml │ ├── openocd.cfg │ └── openocd.gdb ├── doc ├── biblio.adoc ├── guide │ ├── caboose.adoc │ ├── drivers.adoc │ ├── index.adoc │ ├── servers.adoc │ └── supervision.adoc ├── index.adoc ├── interrupts.adoc ├── intro.adoc ├── ipc.adoc ├── kipc.adoc ├── startup.adoc ├── syscalls.adoc ├── tasks.adoc ├── timers.adoc └── tr1.adoc ├── drv ├── auxflash-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── auxflash-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── caboose-pos │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── caboose │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── cosmo-hf │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── hf.rs │ │ └── main.rs ├── cosmo-seq-server │ ├── Cargo.toml │ ├── build.rs │ ├── cosmo-hp │ │ ├── README.md │ │ ├── cosmo_hp.bz2 │ │ └── info_regs.json │ └── src │ │ └── main.rs ├── cpu-power-state │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── cpu-seq-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── eeprom │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── fpga-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── fpga-devices │ ├── Cargo.toml │ └── src │ │ ├── ecp5.rs │ │ ├── ecp5_spi.rs │ │ ├── ecp5_spi_mux_pca9538.rs │ │ └── lib.rs ├── fpga-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── fpga-user-api │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── power_rail.rs ├── gimlet-hf-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ └── gimlet_bcdef.rs │ │ └── main.rs ├── gimlet-seq-server │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── fpga-b.bin │ ├── gimlet-regs-b.html │ ├── gimlet-regs-b.json │ └── src │ │ ├── main.rs │ │ ├── payload_b.rs │ │ ├── payload_cdef.rs │ │ ├── seq_spi.rs │ │ └── vcore.rs ├── grapefruit-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── hash-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── hf-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── i2c-api │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── i2c-devices │ ├── Cargo.toml │ └── src │ │ ├── adm1272.rs │ │ ├── adt7420.rs │ │ ├── at24csw080.rs │ │ ├── bmr491.rs │ │ ├── ds2482.rs │ │ ├── emc2305.rs │ │ ├── isl68224.rs │ │ ├── lib.rs │ │ ├── lm5066.rs │ │ ├── lm5066i.rs │ │ ├── ltc4282.rs │ │ ├── m24c02.rs │ │ ├── m2_hp_only.rs │ │ ├── max31790.rs │ │ ├── max5970.rs │ │ ├── max6634.rs │ │ ├── mcp9808.rs │ │ ├── mwocp68.rs │ │ ├── nvme_bmc.rs │ │ ├── pca9538.rs │ │ ├── pca9956b.rs │ │ ├── pct2075.rs │ │ ├── raa229618.rs │ │ ├── raa229620a.rs │ │ ├── sbrmi.rs │ │ ├── sbtsi.rs │ │ ├── tmp117.rs │ │ ├── tmp451.rs │ │ ├── tps546b24a.rs │ │ └── tse2004av.rs ├── i2c-types │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── ice40-spi-program │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── ignition-api │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── ignition_controller.adoc │ ├── ignition_controller.html │ ├── ignition_controller.json │ └── src │ │ └── lib.rs ├── ignition-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── ksz8463 │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── registers.rs ├── local-vpd │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── lpc55-flash │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-gpio-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── lpc55-gpio │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── lpc55-i2c │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── lpc55-iocon-gen │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── lpc55-rng │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── lpc55-sha256 │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-spi-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── lpc55-spi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-sprot-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── handler.rs │ │ └── main.rs ├── lpc55-swd │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── armv7debug.rs │ │ └── main.rs ├── lpc55-syscon-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── lpc55-syscon │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── lpc55-update-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── lpc55-update-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── images.rs │ │ └── main.rs ├── lpc55-usart │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── mb85rsxx-fram │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── meanwell-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── meanwell │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── medusa-seq-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── medusa-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── front_io.rs │ │ ├── main.rs │ │ └── power_control.rs ├── minibar-ignition-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── ignition.rs │ │ └── main.rs ├── minibar-seq-api │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── minibar_controller_hcv_a.bit │ ├── minibar_regs.json │ └── src │ │ └── lib.rs ├── minibar-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── mock-gimlet-hf-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── mock-gimlet-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── monorail-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── onewire-devices │ ├── Cargo.toml │ └── src │ │ ├── ds18b20.rs │ │ └── lib.rs ├── onewire │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── oxide-vpd │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── packrat-vpd-loader │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── psc-psu-update │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── main.rs │ │ ├── mwocp68-0701.bin │ │ └── mwocp68-0762.bin ├── psc-seq-api │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── psc-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── qspi-api │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── rng-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── sbrmi-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── sbrmi │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── sidecar-front-io │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── sidecar_qsfp_x32_controller_regs.adoc │ ├── sidecar_qsfp_x32_controller_regs.html │ ├── sidecar_qsfp_x32_controller_regs.json │ ├── sidecar_qsfp_x32_controller_rev_b_c.bit │ └── src │ │ ├── controller.rs │ │ ├── leds.rs │ │ ├── lib.rs │ │ ├── phy_smi.rs │ │ └── transceivers.rs ├── sidecar-mainboard-controller │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── sidecar_mainboard_controller.adoc │ ├── sidecar_mainboard_controller.html │ ├── sidecar_mainboard_controller.json │ ├── sidecar_mainboard_controller_rev_b.bit │ ├── sidecar_mainboard_controller_rev_c_d.bit │ ├── sidecar_mainboard_emulator_ecp5_evn.bit │ └── src │ │ ├── fan_modules.rs │ │ ├── front_io.rs │ │ ├── ignition.rs │ │ ├── lib.rs │ │ └── tofino2.rs ├── sidecar-mainboard-i2c-emulator │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── sidecar-seq-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── sidecar-seq-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── clock_generator.rs │ │ ├── clock_generator_payload_bcd.rs │ │ ├── clock_generator_payload_bcd_pcie_common_ref.rs │ │ ├── front_io.rs │ │ ├── main.rs │ │ └── tofino.rs ├── sp-ctrl-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── spartan7-loader-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── spartan7-loader │ ├── Cargo.toml │ ├── build.rs │ ├── cosmo-seq │ │ ├── README.md │ │ ├── cosmo_seq.bz2 │ │ ├── cosmo_seq_top.json │ │ ├── debug_regs.json │ │ ├── dimm_regs.json │ │ ├── espi_regs.json │ │ ├── info_regs.json │ │ ├── sequencer_regs.json │ │ ├── sp_i2c_regs.json │ │ ├── spd_proxy_regs.json │ │ ├── spi_nor_reg_map.json │ │ └── spi_nor_regs.json │ ├── grapefruit │ │ ├── README.md │ │ ├── gfruit_regs.json │ │ ├── gfruit_sgpio_regs.json │ │ ├── gfruit_top.json │ │ ├── grapefruit.bz2 │ │ └── spi_nor_regs.json │ └── src │ │ └── main.rs ├── spartan7-spi-program │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── spi-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── sprot-api │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ └── src │ │ ├── error.rs │ │ └── lib.rs ├── stm32fx-rcc │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── stm32fx-usart │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32g0-usart │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-dbgmcu │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32h7-eth │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── ring.rs ├── stm32h7-fmc-demo-server │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-hash-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-hash │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32h7-qspi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32h7-rng │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-spi-server-core │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── stm32h7-spi-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-spi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32h7-sprot-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-startup │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32h7-update-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── stm32h7-update-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32h7-usart │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stm32xx-gpio-common │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── server.rs ├── stm32xx-i2c-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32xx-i2c │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ ├── ltc4306.rs │ │ ├── max7358.rs │ │ ├── pca9545.rs │ │ └── pca9548.rs ├── stm32xx-sys-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── g0.rs │ │ ├── h7.rs │ │ └── lib.rs ├── stm32xx-sys │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── stm32xx-uid │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── transceivers-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── transceivers-server │ ├── Cargo.toml │ ├── README.mkdn │ ├── build.rs │ └── src │ │ ├── main.rs │ │ └── udp.rs ├── update-api │ ├── Cargo.toml │ ├── README.mkdn │ ├── hiffy-rot-flash.sh │ └── src │ │ └── lib.rs ├── user-leds-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── user-leds │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── vsc-err │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vsc7448 │ ├── Cargo.toml │ └── src │ │ ├── config.rs │ │ ├── dev.rs │ │ ├── lib.rs │ │ ├── mac.rs │ │ ├── miim_phy.rs │ │ ├── port.rs │ │ ├── serdes10g.rs │ │ ├── serdes1g.rs │ │ ├── serdes6g.rs │ │ └── spi.rs └── vsc85xx │ ├── Cargo.toml │ └── src │ ├── atom.rs │ ├── led.rs │ ├── lib.rs │ ├── tesla.rs │ ├── util.rs │ ├── viper.rs │ ├── vsc8504.rs │ ├── vsc8522.rs │ ├── vsc8552.rs │ ├── vsc8562.rs │ └── vsc85x2.rs ├── idl ├── attest.idol ├── auxflash.idol ├── caboose.idol ├── control-plane-agent.idol ├── cpu-seq.idol ├── dump-agent.idol ├── dumper.idol ├── eeprom.idol ├── fmc-demo.idol ├── fpga.idol ├── hash.idol ├── hf.idol ├── host-sp-comms.idol ├── ignition.idol ├── jefe.idol ├── lpc55-pins.idol ├── lpc55-update.idol ├── meanwell.idol ├── medusa-seq.idol ├── minibar-seq.idol ├── monorail.idol ├── net.idol ├── packrat.idol ├── power.idol ├── rng.idol ├── sbrmi.idol ├── sensor.idol ├── sidecar-seq.idol ├── sp-ctrl.idol ├── spartan7-loader.idol ├── spi.idol ├── sprot.idol ├── stm32h7-rcc.idol ├── stm32h7-update.idol ├── stm32xx-sys.idol ├── syscon.idol ├── thermal.idol ├── transceivers.idol ├── user-leds.idol ├── validate.idol └── vpd.idol ├── lib ├── armv6m-atomic-hack │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── armv8-m-mpu │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── counters │ ├── Cargo.toml │ ├── derive │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── examples │ │ ├── count.rs │ │ └── count_generic.rs │ └── src │ │ └── lib.rs ├── derive-idol-err │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── dice │ ├── Cargo.toml │ └── src │ │ ├── alias_cert_tmpl.rs │ │ ├── cert.rs │ │ ├── csr.rs │ │ ├── deviceid_cert_tmpl.rs │ │ ├── handoff.rs │ │ ├── lib.rs │ │ ├── mfg.rs │ │ ├── persistid_cert_tmpl.rs │ │ ├── persistid_csr_tmpl.rs │ │ ├── spmeasure_cert_tmpl.rs │ │ └── trust_quorum_dhe_cert_tmpl.rs ├── endoscope-abi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── endoscope │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── scripts │ │ ├── endoscope.x │ │ └── stm32h753.x │ └── src │ │ ├── main.rs │ │ └── shared.rs ├── fixedmap │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── gnarle │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── lib.rs ├── host-sp-messages │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-puf │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-rom-data │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-romapi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lpc55-rot-startup │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── dice.rs │ │ ├── dice_mfg_usart.rs │ │ ├── handoff.rs │ │ ├── images.rs │ │ └── lib.rs ├── lpc55-usart │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── lib.rs ├── multitimer │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── mutable-statics │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── oxide-barcode │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── phash │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── ringbuf │ ├── Cargo.toml │ ├── examples │ │ ├── count_children.rs │ │ └── counts.rs │ └── src │ │ └── lib.rs ├── snitch-core │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── stage0-handoff │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── lib.rs │ │ └── rot_update_details.rs ├── static-cell │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── task-config │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── toml-task │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── unwrap-lite │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── update-buffer │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── volatile-const │ ├── Cargo.toml │ └── src │ └── lib.rs ├── rust-toolchain.toml ├── support ├── fake_certs │ ├── fake_certificate.der.crt │ ├── fake_private_key.pem │ └── p256-private-key.der ├── lpc4322_bl_crc.bin ├── lpc4322_lpc55s69xpresso_if_rla_swo_hacks.bin └── support_tokens │ ├── README.md │ └── authorized_keys ├── sys ├── abi │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── kern │ ├── .rustfmt.toml │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── arch.rs │ │ ├── arch │ │ └── arm_m.rs │ │ ├── atomic.rs │ │ ├── descs.rs │ │ ├── err.rs │ │ ├── fail.rs │ │ ├── header.rs │ │ ├── kipc.rs │ │ ├── lib.rs │ │ ├── profiling.rs │ │ ├── startup.rs │ │ ├── syscalls.rs │ │ ├── task.rs │ │ ├── time.rs │ │ ├── umem.rs │ │ └── util.rs ├── kerncore │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── lib.rs ├── num-tasks │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── task-names │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs └── userlib │ ├── Cargo.toml │ ├── README.mkdn │ ├── build.rs │ └── src │ ├── critical_section.rs │ ├── hl.rs │ ├── kipc.rs │ ├── lib.rs │ ├── macros.rs │ ├── task_slot.rs │ └── units.rs ├── task ├── attest-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── attest │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── config.rs │ │ └── main.rs ├── caboose-reader │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── control-plane-agent-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── control-plane-agent │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── dump.rs │ │ ├── inventory.rs │ │ ├── main.rs │ │ ├── mgs_common.rs │ │ ├── mgs_compute_sled.rs │ │ ├── mgs_compute_sled │ │ └── host_phase2.rs │ │ ├── mgs_psc.rs │ │ ├── mgs_sidecar.rs │ │ ├── mgs_sidecar │ │ ├── ignition.rs │ │ └── monorail_port_status.rs │ │ └── update │ │ ├── common.rs │ │ ├── host_flash.rs │ │ ├── mod.rs │ │ ├── rot.rs │ │ ├── sp.rs │ │ └── sp │ │ ├── auxflash.rs │ │ └── stub_auxflash.rs ├── dump-agent-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── dump-agent │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── main.rs │ │ └── udp.rs ├── dumper-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── dumper │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── framulator │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── gimlet-inspector │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── hiffy │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── common.rs │ │ ├── generic.rs │ │ ├── lpc55.rs │ │ ├── main.rs │ │ ├── stm32g0.rs │ │ ├── stm32h7.rs │ │ └── tests.rs ├── host-sp-comms-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── host-sp-comms │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ ├── cosmo_a.rs │ │ ├── gimlet_bcde.rs │ │ ├── gimletlet.rs │ │ └── grapefruit.rs │ │ ├── inventory.rs │ │ ├── main.rs │ │ └── tx_buf.rs ├── idle │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── jefe-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── jefe │ ├── Cargo.toml │ ├── README.mkdn │ ├── build.rs │ └── src │ │ ├── dump.rs │ │ ├── external.rs │ │ └── main.rs ├── monorail-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ ├── medusa_a.rs │ │ ├── minibar.rs │ │ └── sidecar_bcd.rs │ │ ├── main.rs │ │ └── server.rs ├── net-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── net │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ ├── cosmo_a.rs │ │ ├── gimlet_bcdef.rs │ │ ├── gimletlet_mgmt.rs │ │ ├── gimletlet_nic.rs │ │ ├── grapefruit.rs │ │ ├── medusa_a.rs │ │ ├── minibar.rs │ │ ├── nucleo_h7.rs │ │ ├── psc_bc.rs │ │ └── sidecar_bcd.rs │ │ ├── bsp_support.rs │ │ ├── buf.rs │ │ ├── main.rs │ │ ├── mgmt.rs │ │ ├── miim_bridge.rs │ │ ├── pins.rs │ │ ├── server.rs │ │ ├── server_basic.rs │ │ └── server_vlan.rs ├── nucleo-user-button │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── packrat-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── packrat │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── cosmo.rs │ │ ├── gimlet.rs │ │ ├── grapefruit.rs │ │ └── main.rs ├── ping │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── pong │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── power-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── power │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ ├── cosmo_a.rs │ │ ├── gimlet_bcdef.rs │ │ ├── gimletlet_2.rs │ │ ├── minibar.rs │ │ ├── psc_bc.rs │ │ └── sidecar_bcd.rs │ │ └── main.rs ├── sensor-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── sensor-polling │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── sensor │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── sp_measure │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── spd │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── ltc4306.rs │ │ └── main.rs ├── template │ ├── Cargo.toml │ ├── README.mkdn │ └── src │ │ └── main.rs ├── thermal-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── thermal │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── bsp.rs │ │ ├── bsp │ │ ├── cosmo_a.rs │ │ ├── gimlet_bcdef.rs │ │ ├── grapefruit.rs │ │ ├── medusa_a.rs │ │ ├── minibar.rs │ │ └── sidecar_bcd.rs │ │ ├── control.rs │ │ └── main.rs ├── uartecho │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── README.mkdn │ │ └── main.rs ├── udpbroadcast │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── udpecho │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── udprpc │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── validate-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── validate │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── vpd-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs └── vpd │ ├── Cargo.toml │ ├── build.rs │ └── src │ └── main.rs ├── test ├── test-api │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── test-assist │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── test-idol-api │ ├── Cargo.toml │ ├── api.idol │ ├── build.rs │ └── src │ │ └── lib.rs ├── test-idol-server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── test-runner │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── test-suite │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── tests-gemini-bu │ ├── Cargo.toml │ └── app.toml ├── tests-gimletlet │ ├── Cargo.toml │ └── app.toml ├── tests-lpc55xpresso │ ├── Cargo.toml │ ├── app.toml │ └── src │ │ └── main.rs ├── tests-psc │ ├── Cargo.toml │ └── app.toml ├── tests-rot-carrier │ ├── Cargo.toml │ └── app.toml ├── tests-stm32fx │ ├── Cargo.toml │ ├── app-f3.toml │ └── app.toml ├── tests-stm32g0 │ ├── Cargo.toml │ ├── app-g070.toml │ └── build.rs └── tests-stm32h7 │ ├── Cargo.toml │ ├── app-h743.toml │ ├── app-h753.toml │ ├── build.rs │ └── src │ └── main.rs └── website ├── bugs └── index.html ├── index.html └── style.css /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [alias] 2 | xtask = "run --package xtask --" 3 | 4 | [build] 5 | # The purpose of this flag is to block crates using version_detect from "detecting" 6 | # features that are no longer supported by the toolchain, because despite its name, 7 | # version_detect is basically "if nightly { return true; }". This setting gets 8 | # overridden within xtask for Hubris programs, so this only affects host tools like 9 | # xtask. 10 | rustflags = ["-Zallow-features=proc_macro_diagnostic,asm_const,naked_functions,used_with_arg"] 11 | 12 | [unstable] 13 | bindeps = true 14 | -------------------------------------------------------------------------------- /.github/buildomat/build-one.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o xtrace 6 | set -o nounset 7 | 8 | name=$1 9 | toml=$2 10 | image=$3 11 | 12 | rustup toolchain install 13 | cargo xtask dist $toml 14 | cp target/$name/dist/$image/build-$name-image-$image.zip /work/ 15 | touch /work/this_is_not_signed.txt 16 | -------------------------------------------------------------------------------- /.github/buildomat/config.toml: -------------------------------------------------------------------------------- 1 | # 2 | # This file, with this flag, must be present in the default branch in order for 3 | # the buildomat integration to create check suites. 4 | # 5 | enable = true 6 | 7 | # 8 | # Require approval for pull requests made by users outside our organisation. 9 | # 10 | org_only = true 11 | 12 | # 13 | # We accept pull requests from several automated services that are outside the 14 | # organisation. Allow jobs from those sources to proceed without manual 15 | # approval: 16 | # 17 | allow_users = [] 18 | 19 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-c-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-c-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-c-lab app/gimlet/rev-c-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-c.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-c" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-c app/gimlet/rev-c.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-d-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-d-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-d-lab app/gimlet/rev-d-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-d.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-d" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-d app/gimlet/rev-d.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-e-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-e-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-e-lab app/gimlet/rev-e-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-e.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-e" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-e app/gimlet/rev-e.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-f-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-f-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-f-lab app/gimlet/rev-f-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/gimlet-f.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build gimlet-f" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh gimlet-f app/gimlet/rev-f.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/psc-b.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build psc-b" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh psc-b app/psc/rev-b.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/psc-c.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build psc-c" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh psc-c app/psc/rev-c.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-b-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-b-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-b-lab app/sidecar/rev-b-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-b.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-b" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-b app/sidecar/rev-b.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-c-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-c-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-c-lab app/sidecar/rev-c-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-c.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-c" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-c app/sidecar/rev-c.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-d-lab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-d-lab" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-d-lab app/sidecar/rev-d-lab.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/jobs/sidecar-d.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #: 3 | #: name = "build sidecar-d" 4 | #: variety = "basic" 5 | #: target = "ubuntu-22.04" 6 | #: rust_toolchain = true 7 | #: output_rules = [ 8 | #: "=/work/*.zip", 9 | #: "=/work/this_is_not_signed.txt", 10 | #: ] 11 | 12 | set -o errexit 13 | set -o pipefail 14 | set -o xtrace 15 | 16 | exec .github/buildomat/build-one.sh sidecar-d app/sidecar/rev-d.toml default 17 | -------------------------------------------------------------------------------- /.github/buildomat/notes.md: -------------------------------------------------------------------------------- 1 | # Why are there so many jobs? 2 | 3 | We need to build many images. Doing it in one job requires building each in 4 | sequence. Separate buildomat jobs for each image builds in parallel and 5 | mimimizes waiting time 6 | 7 | # Could you add the parallelization within a buildomat job? 8 | 9 | We could! That does not match what we do currently for our workflow. Part 10 | of the point of CI/testing is to use the flows that already exist as 11 | much as possible. Someone interested in this would need to profile our 12 | buildomat jobs. 13 | -------------------------------------------------------------------------------- /.github/workflows/dist.yml: -------------------------------------------------------------------------------- 1 | name: dist 2 | on: 3 | pull_request: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | build: 9 | name: dist 10 | strategy: 11 | matrix: 12 | os: [ubuntu-latest, windows-latest] 13 | uses: ./.github/workflows/build-boards.yml 14 | with: 15 | board-set: all 16 | os: ${{ matrix.os }} 17 | -------------------------------------------------------------------------------- /.github/workflows/formatting.yml: -------------------------------------------------------------------------------- 1 | name: formatting 2 | on: 3 | pull_request: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | format: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: dtolnay/rust-toolchain@nightly 13 | with: 14 | components: rustfmt 15 | - name: cargo fmt 16 | run: cargo fmt --all -- --check 17 | -------------------------------------------------------------------------------- /.github/workflows/license-check.yml: -------------------------------------------------------------------------------- 1 | name: license-check 2 | on: pull_request 3 | jobs: 4 | license: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@master 8 | - name: Check License Header 9 | uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff 10 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | name: tests 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Run tests 19 | run: cargo test --verbose --workspace 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | itm.txt 3 | *.swp 4 | 5 | **/*.rs.bk 6 | .#* 7 | .gdb_history 8 | 9 | # editor files 10 | .vscode/* 11 | !.vscode/*.md 12 | !.vscode/*.svd 13 | !.vscode/launch.json 14 | !.vscode/tasks.json 15 | !.vscode/extensions.json 16 | -------------------------------------------------------------------------------- /.licenserc.yaml: -------------------------------------------------------------------------------- 1 | header: 2 | license: 3 | spdx-id: MPL-2.0 4 | 5 | content: | 6 | This Source Code Form is subject to the terms of the Mozilla Public 7 | License, v. 2.0. If a copy of the MPL was not distributed with this 8 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 9 | paths: 10 | - '**/*.rs' 11 | 12 | comment: on-failure 13 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 80 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Everything in the Oxide RoT v1 startup code path before Platform Identity 2 | # private key is secured needs to be reviewed by folks authorized to 3 | # production-release sign these images. 4 | /app/oxide-rot-1/ @cbiffle @flihp @labbott 5 | /build/util/ @cbiffle @flihp @labbott 6 | /lib/armv8-m-mpu/ @cbiffle @flihp @labbott 7 | /lib/dice/ @cbiffle @flihp @labbott 8 | /lib/lpc55-puf/ @cbiffle @flihp @labbott 9 | /lib/lpc55-romapi/ @cbiffle @flihp @labbott 10 | /lib/lpc55-rot-startup/ @cbiffle @flihp @labbott 11 | /lib/lpc55-usart/ @cbiffle @flihp @labbott 12 | /lib/stage0-handoff/ @cbiffle @flihp @labbott 13 | /lib/unwrap-lite/ @cbiffle @flihp @labbott 14 | -------------------------------------------------------------------------------- /app/cosmo/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "cosmo" 5 | version = "0.1.0" 6 | 7 | [features] 8 | traptrace = ["ringbuf"] 9 | dump = ["kern/dump"] 10 | 11 | [dependencies] 12 | cortex-m = { workspace = true } 13 | cortex-m-rt ={ workspace = true } 14 | cfg-if = { workspace = true } 15 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 16 | ringbuf = { path = "../../lib/ringbuf", optional = true } 17 | 18 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 19 | kern = { path = "../../sys/kern" } 20 | 21 | [build-dependencies] 22 | build-util = {path = "../../build/util"} 23 | 24 | # this lets you use `cargo fix`! 25 | [[bin]] 26 | name = "cosmo" 27 | test = false 28 | bench = false 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /app/cosmo/README.md: -------------------------------------------------------------------------------- 1 | # Cosmo Service Processor (SP) firmware 2 | 3 | The Cosmo is the SP5-based compute sled in the Oxide rack. 4 | 5 | This folder contains the firmware that runs on its service processor (SP). 6 | 7 | The Root of Trust firmware is common across multiple boards and can be found 8 | in the [`oxide-rot-1` subfolder](../oxide-rot-1). 9 | -------------------------------------------------------------------------------- /app/cosmo/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | build_util::expose_m_profile().unwrap(); 8 | } 9 | -------------------------------------------------------------------------------- /app/cosmo/lab.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -lab images 2 | tasks.cosmo_seq.features = ["stay-in-a2"] 3 | tasks.packrat.features = ["boot-kmdb"] 4 | -------------------------------------------------------------------------------- /app/cosmo/rev-a-dev.toml: -------------------------------------------------------------------------------- 1 | name = "cosmo-a-dev" 2 | inherit = ["rev-a.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/cosmo/rev-a-lab.toml: -------------------------------------------------------------------------------- 1 | name = "cosmo-a-lab" 2 | inherit = ["rev-a-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/cosmo/rev-a.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "cosmo-a" 3 | board = "cosmo-a" 4 | inherit = "base.toml" 5 | -------------------------------------------------------------------------------- /app/demo-stm32f4-discovery/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "demo-stm32f4-discovery" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | cortex-m-rt = { workspace = true } 13 | stm32f3 = { workspace = true, optional = true, features = ["stm32f303", "rt"] } 14 | stm32f4 = { workspace = true, optional = true, features = ["stm32f407", "rt"] } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | # this lets you use `cargo fix`! 19 | [[bin]] 20 | name = "demo-stm32f4-discovery" 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /app/demo-stm32f4-discovery/README.md: -------------------------------------------------------------------------------- 1 | # STM32F3/4 demo application 2 | -------------------------------------------------------------------------------- /app/demo-stm32g0-nucleo/README.md: -------------------------------------------------------------------------------- 1 | # STM32G0 demo application 2 | -------------------------------------------------------------------------------- /app/demo-stm32g0-nucleo/app-g070-mini.toml: -------------------------------------------------------------------------------- 1 | # Tiny G0 image, useful for making small Humility archives 2 | name = "demo-stm32g070-nucleo" 3 | target = "thumbv6m-none-eabi" 4 | chip = "../../chips/stm32g0" 5 | memory = "memory-g070.toml" 6 | board = "stm32g070-nucleo" 7 | stacksize = 944 8 | 9 | [kernel] 10 | name = "demo-stm32g0-nucleo" 11 | requires = {flash = 18048, ram = 1632} 12 | features = ["g070"] 13 | stacksize = 640 14 | 15 | [caboose] 16 | region = "flash" 17 | size = 256 18 | 19 | [tasks.jefe] 20 | name = "task-jefe" 21 | priority = 0 22 | max-sizes = {flash = 4096, ram = 512} 23 | start = true 24 | stacksize = 352 25 | notifications = ["fault", "timer"] 26 | 27 | [tasks.idle] 28 | name = "task-idle" 29 | priority = 5 30 | max-sizes = {flash = 128, ram = 64} 31 | stacksize = 64 32 | start = true 33 | -------------------------------------------------------------------------------- /app/demo-stm32g0-nucleo/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/demo-stm32g0-nucleo/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | // We have to do this if we don't otherwise use it to ensure its vector table 9 | // gets linked in. 10 | extern crate stm32g0; 11 | 12 | use cortex_m_rt::entry; 13 | 14 | #[entry] 15 | fn main() -> ! { 16 | const CYCLES_PER_MS: u32 = 16_000; 17 | 18 | unsafe { kern::startup::start_kernel(CYCLES_PER_MS) } 19 | } 20 | -------------------------------------------------------------------------------- /app/demo-stm32h7-nucleo/README.md: -------------------------------------------------------------------------------- 1 | # STM32H7 demo application 2 | -------------------------------------------------------------------------------- /app/demo-stm32h7-nucleo/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/donglet/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "app-donglet" 5 | version = "0.1.0" 6 | 7 | [features] 8 | g030 = ["stm32g0/stm32g030"] 9 | g031 = ["stm32g0/stm32g031"] 10 | dump = ["kern/dump"] 11 | 12 | [dependencies] 13 | cortex-m = { workspace = true } 14 | cortex-m-rt = { workspace = true } 15 | cfg-if = { workspace = true } 16 | stm32g0 = { workspace = true, features = ["rt"] } 17 | 18 | kern = { path = "../../sys/kern", default-features = false } 19 | 20 | [build-dependencies] 21 | build-util = {path = "../../build/util"} 22 | 23 | # this lets you use `cargo fix`! 24 | [[bin]] 25 | name = "app-donglet" 26 | test = false 27 | doctest = false 28 | bench = false 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /app/donglet/README.md: -------------------------------------------------------------------------------- 1 | # App for the miniaturized dongle board 2 | -------------------------------------------------------------------------------- /app/donglet/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/donglet/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | // We have to do this if we don't otherwise use it to ensure its vector table 9 | // gets linked in. 10 | extern crate stm32g0; 11 | 12 | use cortex_m_rt::entry; 13 | 14 | #[entry] 15 | fn main() -> ! { 16 | const CYCLES_PER_MS: u32 = 16_000; 17 | 18 | unsafe { kern::startup::start_kernel(CYCLES_PER_MS) } 19 | } 20 | -------------------------------------------------------------------------------- /app/gemini-bu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "gemini-bu" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "gemini-bu" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/gemini-bu/README.md: -------------------------------------------------------------------------------- 1 | # Gemini Bringup Board STM32H7 Firmware 2 | 3 | This directory is currently a stub. 4 | -------------------------------------------------------------------------------- /app/gemini-bu/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/gimlet/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "gimlet" 5 | version = "0.1.0" 6 | 7 | [features] 8 | traptrace = ["ringbuf"] 9 | dump = ["kern/dump"] 10 | 11 | [dependencies] 12 | cortex-m = { workspace = true } 13 | cortex-m-rt ={ workspace = true } 14 | cfg-if = { workspace = true } 15 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 16 | ringbuf = { path = "../../lib/ringbuf", optional = true } 17 | 18 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 19 | kern = { path = "../../sys/kern" } 20 | 21 | [build-dependencies] 22 | build-util = {path = "../../build/util"} 23 | 24 | # this lets you use `cargo fix`! 25 | [[bin]] 26 | name = "gimlet" 27 | test = false 28 | bench = false 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /app/gimlet/README.md: -------------------------------------------------------------------------------- 1 | # Gimlet Service Processor (SP) firmware 2 | 3 | The Gimlet is the compute sled in the Oxide rack. 4 | 5 | This folder contains the firmware that runs on its service processor (SP). 6 | 7 | The Root of Trust firmware is common across multiple boards and can be found 8 | in the [`oxide-rot-1` subfolder](../oxide-rot-1). 9 | -------------------------------------------------------------------------------- /app/gimlet/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | build_util::expose_m_profile().unwrap(); 8 | } 9 | -------------------------------------------------------------------------------- /app/gimlet/dev.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -dev images 2 | 3 | [tasks.jefe.config.allowed-callers] 4 | request_reset = ["udprpc"] 5 | 6 | [tasks.udprpc] 7 | name = "task-udprpc" 8 | priority = 6 9 | max-sizes = {flash = 32768, ram = 8192} 10 | stacksize = 4096 11 | start = true 12 | task-slots = ["net"] 13 | features = ["vlan"] 14 | notifications = ["socket"] 15 | 16 | [config.net.sockets.rpc] 17 | kind = "udp" 18 | owner = {name = "udprpc", notification = "socket"} 19 | port = 998 20 | tx = { packets = 3, bytes = 1024 } 21 | rx = { packets = 3, bytes = 1024 } 22 | -------------------------------------------------------------------------------- /app/gimlet/lab.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -lab images 2 | tasks.gimlet_seq.features = ["stay-in-a2"] 3 | tasks.packrat.features = ["boot-kmdb"] 4 | -------------------------------------------------------------------------------- /app/gimlet/rev-b-dev.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-b-dev" 2 | inherit = ["rev-b.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-b-lab.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-b-lab" 2 | inherit = ["rev-b-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-c-dev.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-c-dev" 2 | inherit = ["rev-c.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-c-lab.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-c-lab" 2 | inherit = ["rev-c-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-c.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "gimlet-c" 3 | board = "gimlet-c" 4 | 5 | # Rev C is mostly identical to Rev B, but with a new name and board 6 | inherit = "rev-b.toml" 7 | -------------------------------------------------------------------------------- /app/gimlet/rev-d-dev.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-d-dev" 2 | inherit = ["rev-d.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-d-lab.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-d-lab" 2 | inherit = ["rev-d-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-e-dev.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-e-dev" 2 | inherit = ["rev-e.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-e-lab.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-e-lab" 2 | inherit = ["rev-e-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-e.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "gimlet-e" 3 | board = "gimlet-e" 4 | 5 | # Rev E is mostly identical to Rev D, but with a new name and board 6 | inherit = "rev-d.toml" 7 | -------------------------------------------------------------------------------- /app/gimlet/rev-f-dev.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-f-dev" 2 | inherit = ["rev-f.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-f-lab.toml: -------------------------------------------------------------------------------- 1 | name = "gimlet-f-lab" 2 | inherit = ["rev-f-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/gimlet/rev-f.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "gimlet-f" 3 | board = "gimlet-f" 4 | 5 | # Rev F is identical to rev E from a software perspective. Ideally they would 6 | # be combined into the same image, but the resulting change in board name is not 7 | # supported by current update methods. 8 | inherit = "rev-e.toml" 9 | -------------------------------------------------------------------------------- /app/gimletlet/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "gimletlet" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | cortex-m-rt = { workspace = true } 13 | cfg-if = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "gimletlet" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/gimletlet/README.md: -------------------------------------------------------------------------------- 1 | # Glorified Gimlet-let Firmware 2 | 3 | This is the basic firmware for the Gimletlet Rev 2, aka Glorified Gimletlet. It 4 | is sufficiently different from the Gemini Bringup Board, electrically, that we 5 | can't reuse the firmware. 6 | -------------------------------------------------------------------------------- /app/gimletlet/app-meanwell.toml: -------------------------------------------------------------------------------- 1 | name = "gimletlet-meanwell" 2 | inherit = "base-gimletlet2.toml" 3 | 4 | [tasks.hiffy] 5 | features = ["h753", "stm32h7", "gpio"] 6 | task-slots = ["sys", "user_leds"] 7 | 8 | [tasks.jefe.config.allowed-callers] 9 | request_reset = ["hiffy"] 10 | 11 | [tasks.meanwell] 12 | name = "drv-meanwell" 13 | features = ["stm32h7"] 14 | priority = 6 15 | max-sizes = {flash = 2048, ram = 1024} 16 | start = true 17 | task-slots = ["sys", "user_leds"] 18 | notifications = ["timer"] 19 | 20 | [caboose] 21 | tasks = ["caboose_reader"] 22 | -------------------------------------------------------------------------------- /app/gimletlet/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/grapefruit/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grapefruit" 3 | edition = "2021" 4 | readme = "README.md" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | cortex-m-rt = { workspace = true } 13 | cfg-if = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "grapefruit" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/grapefruit/README.md: -------------------------------------------------------------------------------- 1 | # Grapefruit Hubris image 2 | 3 | ## References 4 | 5 | - [RFD 461](https://rfd.shared.oxide.computer/rfd/0461) 6 | - [oxidecomputer/hardware-grapefruit](https://github.com/oxidecomputer/hardware-grapefruit) 7 | -------------------------------------------------------------------------------- /app/grapefruit/app-dev.toml: -------------------------------------------------------------------------------- 1 | name = "grapefruit-standalone" 2 | inherit = "base.toml" 3 | 4 | # Host SP comms goes over a UART to J10, using USART8 5 | [tasks.host_sp_comms] 6 | features = ["uart8"] 7 | uses = ["uart8"] 8 | interrupts = {"uart8.irq" = "usart-irq"} 9 | -------------------------------------------------------------------------------- /app/grapefruit/app-ruby.toml: -------------------------------------------------------------------------------- 1 | name = "grapefruit-ruby" 2 | inherit = "base.toml" 3 | 4 | # Host SP comms goes over a UART to the FPGA, which translates to eSPI messages 5 | # to the Ruby dev board. 6 | [tasks.host_sp_comms] 7 | features = ["usart6", "hardware_flow_control"] 8 | uses = ["usart6"] 9 | interrupts = {"usart6.irq" = "usart-irq"} 10 | -------------------------------------------------------------------------------- /app/grapefruit/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/lpc55xpresso/bootleby-lpc55xpresso.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/app/lpc55xpresso/bootleby-lpc55xpresso.zip -------------------------------------------------------------------------------- /app/lpc55xpresso/jlink.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :2331 2 | 3 | # Display the pc instruction on break 4 | display /i $pc 5 | 6 | set print asm-demangle on 7 | 8 | set backtrace limit 32 9 | 10 | # detect hard faults 11 | # break HardFault 12 | 13 | # break SecureFault 14 | 15 | load 16 | monitor reset 17 | monitor semihosting enable 18 | # Send the monitor output to gdb 19 | monitor semihosting IOClient 3 20 | 21 | stepi 22 | -------------------------------------------------------------------------------- /app/lpc55xpresso/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | use cortex_m_rt::entry; 9 | use lpc55_rot_startup::{get_clock_speed, startup}; 10 | use unwrap_lite::UnwrapLite; 11 | 12 | #[entry] 13 | fn main() -> ! { 14 | let core_peripherals = cortex_m::Peripherals::take().unwrap_lite(); 15 | let peripherals = lpc55_pac::Peripherals::take().unwrap_lite(); 16 | 17 | let (cycles_per_ms, _div) = get_clock_speed(&peripherals); 18 | 19 | startup(&core_peripherals, &peripherals); 20 | 21 | unsafe { kern::startup::start_kernel(cycles_per_ms * 1_000) } 22 | } 23 | -------------------------------------------------------------------------------- /app/medusa/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "medusa" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | cortex-m-rt = { workspace = true } 13 | cfg-if = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "medusa" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/medusa/README.md: -------------------------------------------------------------------------------- 1 | # Medusa Service Processor (SP) firmware 2 | 3 | The Medusa is a test fixture for the QSFP Front IO board. 4 | 5 | This folder contains the firmware that runs on its service processor (SP). 6 | -------------------------------------------------------------------------------- /app/medusa/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/medusa/model-a.toml: -------------------------------------------------------------------------------- 1 | name = "medusa-a" 2 | board = "medusa-a" 3 | inherit = "base.toml" 4 | -------------------------------------------------------------------------------- /app/minibar/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/oxcon2023g0/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "oxcon2023g0" 5 | version = "0.1.0" 6 | 7 | [features] 8 | 9 | [dependencies] 10 | cortex-m = { workspace = true } 11 | cortex-m-rt = { workspace = true } 12 | cfg-if = { workspace = true } 13 | stm32g0 = { workspace = true, features = ["rt", "stm32g030"] } 14 | 15 | kern = { path = "../../sys/kern", features = ["nano"] } 16 | 17 | [build-dependencies] 18 | build-util = {path = "../../build/util"} 19 | 20 | # this lets you use `cargo fix`! 21 | [[bin]] 22 | name = "oxcon2023g0" 23 | test = false 24 | bench = false 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /app/oxcon2023g0/README.md: -------------------------------------------------------------------------------- 1 | # STM32G030 0xCon board 2 | 3 | This is about the smallest useful Hubris system. 4 | -------------------------------------------------------------------------------- /app/oxcon2023g0/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/oxide-rot-1/bootleby-oxide-rot-1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/app/oxide-rot-1/bootleby-oxide-rot-1.zip -------------------------------------------------------------------------------- /app/oxide-rot-1/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | use cortex_m_rt::entry; 9 | use lpc55_rot_startup::{get_clock_speed, startup}; 10 | use unwrap_lite::UnwrapLite; 11 | 12 | #[entry] 13 | fn main() -> ! { 14 | let core_peripherals = cortex_m::Peripherals::take().unwrap_lite(); 15 | let peripherals = lpc55_pac::Peripherals::take().unwrap_lite(); 16 | 17 | let (cycles_per_ms, _div) = get_clock_speed(&peripherals); 18 | 19 | startup(&core_peripherals, &peripherals); 20 | 21 | unsafe { kern::startup::start_kernel(cycles_per_ms * 1_000) } 22 | } 23 | -------------------------------------------------------------------------------- /app/psc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "psc" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "psc" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/psc/README.md: -------------------------------------------------------------------------------- 1 | # Power Shelf Controller (PSC) Service Processor (SP) firmware 2 | 3 | The PSC interfaces with the power shelf in the Oxide rack. 4 | 5 | This folder contains the firmware that runs on its service processor (SP). 6 | 7 | The Root of Trust firmware is common across multiple boards and can be found 8 | in the [`oxide-rot-1` subfolder](../oxide-rot-1). 9 | -------------------------------------------------------------------------------- /app/psc/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/psc/dev.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -dev images 2 | 3 | [tasks.jefe.config.allowed-callers] 4 | request_reset = ["udprpc"] 5 | 6 | [tasks.udprpc] 7 | name = "task-udprpc" 8 | priority = 5 9 | max-sizes = {flash = 32768, ram = 8192} 10 | stacksize = 4096 11 | start = true 12 | task-slots = ["net"] 13 | features = ["vlan"] 14 | notifications = ["socket"] 15 | 16 | [config.net.sockets.rpc] 17 | kind = "udp" 18 | owner = {name = "udprpc", notification = "socket"} 19 | port = 998 20 | tx = { packets = 3, bytes = 1024 } 21 | rx = { packets = 3, bytes = 1024 } 22 | -------------------------------------------------------------------------------- /app/psc/rev-b-dev.toml: -------------------------------------------------------------------------------- 1 | name = "psc-b-dev" 2 | inherit = ["rev-b.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/psc/rev-b.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "psc-b" 3 | board = "psc-b" 4 | 5 | inherit = "base.toml" 6 | -------------------------------------------------------------------------------- /app/psc/rev-c-dev.toml: -------------------------------------------------------------------------------- 1 | name = "psc-c-dev" 2 | inherit = ["rev-c.toml", "dev.toml"] 3 | 4 | [tasks.framulator] 5 | name = "task-framulator" 6 | priority = 5 7 | start = true 8 | task-slots = [{spi_driver = "spi2_driver"}] 9 | stacksize = 2048 10 | notifications = ["hey-you"] 11 | -------------------------------------------------------------------------------- /app/psc/rev-c.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "psc-c" 3 | board = "psc-c" 4 | 5 | inherit = "base.toml" 6 | 7 | # N.B. that the FRAM device is only present on rev-C PSC boards and later, so 8 | # this mux config isn't needed on earlier revisions. 9 | [config.spi.spi2.mux_options.port_b] 10 | outputs = [ 11 | {port = "B", pins = [13, 15], af = 5}, 12 | ] 13 | input = {port = "B", pin = 14, af = 5} 14 | 15 | [config.spi.spi2.devices.mb86rs64t] 16 | mux = "port_b" 17 | cs = [{port = "B", pin = 12}] 18 | -------------------------------------------------------------------------------- /app/rot-carrier/README.md: -------------------------------------------------------------------------------- 1 | # Root of Trust Carrier LPC55 Firmware 2 | -------------------------------------------------------------------------------- /app/rot-carrier/bootleby-rot-carrier.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/app/rot-carrier/bootleby-rot-carrier.zip -------------------------------------------------------------------------------- /app/rot-carrier/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | use cortex_m_rt::entry; 9 | use lpc55_rot_startup::{get_clock_speed, startup}; 10 | use unwrap_lite::UnwrapLite; 11 | 12 | #[entry] 13 | fn main() -> ! { 14 | let core_peripherals = cortex_m::Peripherals::take().unwrap_lite(); 15 | let peripherals = lpc55_pac::Peripherals::take().unwrap_lite(); 16 | 17 | let (cycles_per_ms, _div) = get_clock_speed(&peripherals); 18 | 19 | startup(&core_peripherals, &peripherals); 20 | 21 | unsafe { kern::startup::start_kernel(cycles_per_ms * 1_000) } 22 | } 23 | -------------------------------------------------------------------------------- /app/sidecar/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "sidecar" 5 | version = "0.1.0" 6 | 7 | [features] 8 | dump = ["kern/dump"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | cortex-m-rt = { workspace = true } 13 | cfg-if = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt", "stm32h753"] } 15 | 16 | drv-stm32h7-startup = { path = "../../drv/stm32h7-startup", features = ["h753"] } 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = {path = "../../build/util"} 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "sidecar" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /app/sidecar/README.md: -------------------------------------------------------------------------------- 1 | # Sidecar Service Processor (SP) firmware 2 | 3 | The Sidecar is the network switch in the Oxide rack. 4 | 5 | This folder contains the firmware that runs on its service processor (SP). 6 | 7 | The Root of Trust firmware is common across multiple boards and can be found 8 | in the [`oxide-rot-1` subfolder](../oxide-rot-1). 9 | -------------------------------------------------------------------------------- /app/sidecar/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /app/sidecar/dev.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -dev images 2 | [tasks.jefe.config.allowed-callers] 3 | request_reset = ["udprpc"] 4 | 5 | [tasks.udprpc] 6 | name = "task-udprpc" 7 | priority = 6 8 | max-sizes = {flash = 32768, ram = 8192} 9 | stacksize = 4096 10 | start = true 11 | task-slots = ["net"] 12 | features = ["vlan"] 13 | notifications = ["socket"] 14 | 15 | [config.net.sockets.rpc] 16 | kind = "udp" 17 | owner = {name = "udprpc", notification = "socket"} 18 | port = 998 19 | tx = { packets = 3, bytes = 1024 } 20 | rx = { packets = 3, bytes = 1024 } 21 | -------------------------------------------------------------------------------- /app/sidecar/lab.toml: -------------------------------------------------------------------------------- 1 | # Configuration fragment for -lab images 2 | tasks.sequencer.features = ["stay-in-a2"] 3 | tasks.ignition.features = ["always-transmit"] 4 | -------------------------------------------------------------------------------- /app/sidecar/rev-b-dev.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-b-dev" 2 | inherit = ["rev-b.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-b-lab.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-b-lab" 2 | inherit = ["rev-b-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-b.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "sidecar-b" 3 | board = "sidecar-b" 4 | inherit = "base.toml" 5 | 6 | [[auxflash.blobs]] 7 | file = "drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_b.bit" 8 | compress = true 9 | tag = "FPGA" 10 | -------------------------------------------------------------------------------- /app/sidecar/rev-c-dev.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-c-dev" 2 | inherit = ["rev-c.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-c-lab.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-c-lab" 2 | inherit = ["rev-c-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-c.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "sidecar-c" 3 | board = "sidecar-c" 4 | inherit = "base.toml" 5 | 6 | [[auxflash.blobs]] 7 | file = "drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_c_d.bit" 8 | compress = true 9 | tag = "FPGA" 10 | -------------------------------------------------------------------------------- /app/sidecar/rev-d-dev.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-d-dev" 2 | inherit = ["rev-d.toml", "dev.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-d-lab.toml: -------------------------------------------------------------------------------- 1 | name = "sidecar-d-lab" 2 | inherit = ["rev-d-dev.toml", "lab.toml"] 3 | -------------------------------------------------------------------------------- /app/sidecar/rev-d.toml: -------------------------------------------------------------------------------- 1 | # This is the production image. We expect `name` to match `board` 2 | name = "sidecar-d" 3 | board = "sidecar-d" 4 | 5 | # Rev D is identical to rev C from a software perspective. Ideally they would 6 | # be combined into the same image, but the resulting change in board name is not 7 | # supported by current update methods. 8 | inherit = "rev-c.toml" 9 | -------------------------------------------------------------------------------- /boards/README.mkdn: -------------------------------------------------------------------------------- 1 | # Board definitions 2 | 3 | This directory contains a file specifying each supported board (for the `board` 4 | key in the `app.toml` and the `target_board` `cfg` in Rust). 5 | 6 | Currently the contents of the files are ... minimal. The mere existence of a 7 | file creates a board with the corresponding name, as far as the build system is 8 | concerned. 9 | -------------------------------------------------------------------------------- /boards/cosmo-a.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/donglet-g030.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32G030F6Px" 3 | -------------------------------------------------------------------------------- /boards/donglet-g031.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32G031F8Px" 3 | 4 | -------------------------------------------------------------------------------- /boards/gemini-bu-1.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimlet-b.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimlet-c.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimlet-d.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimlet-e.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimlet-f.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimletlet-1.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/gimletlet-2.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/grapefruit.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/lpcxpresso55s69.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "LPC55S69JBD100" 3 | -------------------------------------------------------------------------------- /boards/medusa-a.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/minibar.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/nucleo-h743zi2.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H743ZITx" 3 | -------------------------------------------------------------------------------- /boards/nucleo-h753zi.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/oxcon2023g0.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32G030J6Mx" 3 | -------------------------------------------------------------------------------- /boards/oxide-rot-1-selfsigned.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "LPC55S69JBD100" 3 | -------------------------------------------------------------------------------- /boards/oxide-rot-1.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "LPC55S69JBD100" 3 | -------------------------------------------------------------------------------- /boards/psc-b.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/psc-c.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/rot-carrier-1.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "LPC55S28JBD100" 3 | -------------------------------------------------------------------------------- /boards/rot-carrier-2.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "LPC55S69JBD100" 3 | -------------------------------------------------------------------------------- /boards/sidecar-b.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/sidecar-c.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/sidecar-d.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32H753ZITx" 3 | -------------------------------------------------------------------------------- /boards/stm32f3-discovery.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32F303VCTx" 3 | -------------------------------------------------------------------------------- /boards/stm32f4-discovery.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32F407VGTx" 3 | -------------------------------------------------------------------------------- /boards/stm32g031-nucleo.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32G031Y8Yx" 3 | -------------------------------------------------------------------------------- /boards/stm32g070-nucleo.toml: -------------------------------------------------------------------------------- 1 | [probe-rs] 2 | chip-name = "STM32G070KBTx" 3 | -------------------------------------------------------------------------------- /boards/stm32g0b1-nucleo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/boards/stm32g0b1-nucleo.toml -------------------------------------------------------------------------------- /build/call_rustfmt/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "call_rustfmt" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = { workspace = true } 8 | 9 | [lints] 10 | workspace = true 11 | -------------------------------------------------------------------------------- /build/call_rustfmt/src/bin/exercise.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | use call_rustfmt::rustfmt; 6 | 7 | fn main() -> Result<(), Box> { 8 | rustfmt("/tmp/wrong.rs")?; 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /build/fpga-regmap/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-fpga-regmap" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow.workspace = true 8 | convert_case.workspace = true 9 | heck.workspace = true 10 | prettyplease.workspace = true 11 | quote.workspace = true 12 | serde.workspace = true 13 | serde_json.workspace = true 14 | serde_with.workspace = true 15 | syn.workspace = true 16 | 17 | build-util.path = "../util" 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /build/i2c/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-i2c" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | build-util = {path = "../util"} 8 | anyhow = { workspace = true } 9 | cargo_metadata = { workspace = true } 10 | cfg-if = { workspace = true } 11 | convert_case = { workspace = true } 12 | indexmap = { workspace = true } 13 | multimap = { workspace = true } 14 | serde = { workspace = true } 15 | rangemap.workspace = true 16 | 17 | [features] 18 | h743 = [] 19 | h753 = [] 20 | g031 = [] 21 | g030 = [] 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /build/kconfig/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-kconfig" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | bitflags = { workspace = true } 8 | serde = { workspace = true } 9 | 10 | [lints] 11 | workspace = true 12 | -------------------------------------------------------------------------------- /build/kconfig/README.mkdn: -------------------------------------------------------------------------------- 1 | # Kernel configuration data structures 2 | 3 | This module provides types used within the build system to transfer the 4 | kernel/image configuration from the image builder into the kernel's own build 5 | script, from which kernel tables and data structures can be generated. 6 | 7 | This exists to decouple the kernel's internal representation of these data 8 | structures from the build system. 9 | -------------------------------------------------------------------------------- /build/lpc55pins/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-lpc55pins" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = { workspace = true } 8 | cfg-if = { workspace = true } 9 | convert_case = { workspace = true } 10 | indexmap = { workspace = true } 11 | multimap = { workspace = true } 12 | proc-macro2 = { workspace = true } 13 | quote = { workspace = true } 14 | serde = { workspace = true } 15 | syn = { workspace = true } 16 | 17 | build-util = { path = "../util" } 18 | call_rustfmt = { path = "../call_rustfmt"} 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /build/net/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-net" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | vlan = [] 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | convert_case.workspace = true 12 | indexmap.workspace = true 13 | proc-macro2.workspace = true 14 | quote.workspace = true 15 | serde.workspace = true 16 | 17 | build-util.path = "../util" 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /build/phash-gen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "phash-gen" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = { workspace = true } 8 | rand = { workspace = true } 9 | rand_chacha = { workspace = true } 10 | phash = { path = "../../lib/phash" } 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /build/spi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-spi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | indexmap.workspace = true 8 | proc-macro2.workspace = true 9 | quote.workspace = true 10 | serde.workspace = true 11 | syn.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /build/stm32xx-sys/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-stm32xx-sys" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | anyhow = { workspace = true } 10 | cfg-if = { workspace = true } 11 | convert_case = { workspace = true } 12 | proc-macro2 = { workspace = true } 13 | quote = { workspace = true } 14 | serde = { workspace = true } 15 | syn = { workspace = true } 16 | 17 | build-util = { path = "../util" } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /build/toml-patch/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "toml-patch" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow.workspace = true 8 | toml_edit.workspace = true 9 | 10 | [dev-dependencies] 11 | indoc.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /build/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "build-util" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow.workspace = true 8 | indexmap.workspace = true 9 | ordered-toml.workspace = true 10 | serde.workspace = true 11 | serde_json.workspace = true 12 | toml.workspace = true 13 | 14 | toml-task.path = "../../lib/toml-task" 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /build/util/README.mkdn: -------------------------------------------------------------------------------- 1 | This collects common code for Hubris build scripts. 2 | -------------------------------------------------------------------------------- /chips/lpc55/openocd.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :3333 2 | 3 | # print demangled symbols 4 | set print asm-demangle on 5 | 6 | # set backtrace limit to not have infinite backtrace loops 7 | set backtrace limit 32 8 | 9 | # detect hard faults 10 | break HardFault 11 | 12 | monitor arm semihosting enable 13 | -------------------------------------------------------------------------------- /chips/stm32f3/chip.toml: -------------------------------------------------------------------------------- 1 | [usart2] 2 | address = 0x40004400 3 | size = 1024 4 | interrupts = { irq = 38 } 5 | 6 | [rcc] 7 | address = 0x40021000 8 | size = 1024 9 | 10 | [gpioa] 11 | address = 0x48000000 12 | size = 1024 13 | 14 | [gpioe] 15 | address = 0x48001000 16 | size = 1024 17 | -------------------------------------------------------------------------------- /chips/stm32f3/memory.toml: -------------------------------------------------------------------------------- 1 | [[flash]] 2 | address = 0x08000000 3 | size = 262144 4 | read = true 5 | execute = true 6 | 7 | [[ram]] 8 | address = 0x20000000 9 | size = 40960 10 | read = true 11 | write = true 12 | execute = true 13 | -------------------------------------------------------------------------------- /chips/stm32f3/openocd.cfg: -------------------------------------------------------------------------------- 1 | gdb_port 3340 2 | telnet_port 4450 3 | 4 | # OpenOCD configuration for the STM32F3 5 | source [find interface/stlink-v2.cfg] 6 | source [find target/stm32f3x.cfg] 7 | -------------------------------------------------------------------------------- /chips/stm32f3/openocd.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :3340 2 | 3 | # print demangled symbols 4 | set print asm-demangle on 5 | 6 | # set backtrace limit to not have infinite backtrace loops 7 | set backtrace limit 32 8 | 9 | # detect hard faults 10 | break HardFault 11 | 12 | monitor arm semihosting enable 13 | -------------------------------------------------------------------------------- /chips/stm32f4/chip.toml: -------------------------------------------------------------------------------- 1 | [usart2] 2 | address = 0x40004400 3 | size = 1024 4 | interrupts = { irq = 38 } 5 | 6 | [rcc] 7 | address = 0x40023800 8 | size = 1024 9 | 10 | [gpioa] 11 | address = 0x40020000 12 | size = 1024 13 | 14 | [gpiod] 15 | address = 0x40020c00 16 | size = 1024 17 | -------------------------------------------------------------------------------- /chips/stm32f4/memory.toml: -------------------------------------------------------------------------------- 1 | [[flash]] 2 | address = 0x08000000 3 | size = 262144 4 | read = true 5 | execute = true 6 | 7 | [[ram]] 8 | address = 0x20000000 9 | size = 114688 10 | read = true 11 | write = true 12 | execute = true 13 | 14 | -------------------------------------------------------------------------------- /chips/stm32f4/openocd.cfg: -------------------------------------------------------------------------------- 1 | gdb_port 3341 2 | telnet_port 4451 3 | 4 | # OpenOCD configuration for the STM32F4 5 | source [find interface/stlink-v2.cfg] 6 | source [find target/stm32f4x.cfg] 7 | -------------------------------------------------------------------------------- /chips/stm32f4/openocd.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :3341 2 | 3 | # print demangled symbols 4 | set print asm-demangle on 5 | 6 | # set backtrace limit to not have infinite backtrace loops 7 | set backtrace limit 32 8 | 9 | # detect hard faults 10 | break HardFault 11 | 12 | monitor arm semihosting enable 13 | -------------------------------------------------------------------------------- /chips/stm32g0/memory-g030x6.toml: -------------------------------------------------------------------------------- 1 | [[flash]] 2 | address = 0x08000000 3 | size = 32768 4 | read = true 5 | execute = true 6 | 7 | [[ram]] 8 | address = 0x20000000 9 | size = 8192 10 | read = true 11 | write = true 12 | execute = false # let's assume XN until proven otherwise 13 | 14 | -------------------------------------------------------------------------------- /chips/stm32g0/memory-g031x8.toml: -------------------------------------------------------------------------------- 1 | [[flash]] 2 | address = 0x08000000 3 | size = 65536 4 | read = true 5 | execute = true 6 | 7 | [[ram]] 8 | address = 0x20000000 9 | size = 8192 10 | read = true 11 | write = true 12 | execute = false # let's assume XN until proven otherwise 13 | 14 | -------------------------------------------------------------------------------- /chips/stm32g0/memory-g070.toml: -------------------------------------------------------------------------------- 1 | [[flash]] 2 | address = 0x08000000 3 | size = 131072 4 | read = true 5 | execute = true 6 | 7 | [[ram]] 8 | address = 0x20000000 9 | size = 36864 10 | read = true 11 | write = true 12 | execute = false # let's assume XN until proven otherwise 13 | 14 | -------------------------------------------------------------------------------- /chips/stm32g0/openocd.cfg: -------------------------------------------------------------------------------- 1 | gdb_port 3342 2 | telnet_port 4452 3 | 4 | source [find interface/stlink.cfg] 5 | transport select hla_swd 6 | source [find target/stm32g0x.cfg] 7 | #reset_config srst_only 8 | -------------------------------------------------------------------------------- /chips/stm32g0/openocd.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :3342 2 | 3 | # print demangled symbols 4 | set print asm-demangle on 5 | 6 | # set backtrace limit to not have infinite backtrace loops 7 | set backtrace limit 32 8 | 9 | # detect hard faults 10 | break HardFault 11 | 12 | monitor arm semihosting enable 13 | -------------------------------------------------------------------------------- /chips/stm32h7/openocd.gdb: -------------------------------------------------------------------------------- 1 | target extended-remote :3343 2 | 3 | # print demangled symbols 4 | set print asm-demangle on 5 | 6 | # set backtrace limit to not have infinite backtrace loops 7 | set backtrace limit 32 8 | 9 | # detect hard faults 10 | break HardFault 11 | 12 | monitor arm semihosting enable 13 | -------------------------------------------------------------------------------- /doc/biblio.adoc: -------------------------------------------------------------------------------- 1 | [bibliography] 2 | = References 3 | 4 | - [[[shap03vuln]]] Jonathan Shapiro. 5 | http://srl.cs.jhu.edu/courses/600.439/shap03vulnerabilities.pdf[Vulnerabilities 6 | in Synchronous IPC Designs]. 2003. _Short-ish and straightforward, Shap pokes 7 | a bunch of holes in conventional IPC designs._ 8 | - [[[herder08ipc]]] Jorrit N. Herder et al. 9 | https://www.cs.vu.nl/~herbertb/papers/minix3ipc_prdc08.pdf[Countering IPC 10 | Threats In Multiserver Operating Systems: A Fundamental Requirement for 11 | Dependability]. 2008. _This paper marked MINIX 3's transition from a teaching 12 | tool to a high-reliability research platform._ 13 | -------------------------------------------------------------------------------- /doc/guide/index.adoc: -------------------------------------------------------------------------------- 1 | = Application Notes 2 | 3 | include::servers.adoc[leveloffset=+1] 4 | include::supervision.adoc[leveloffset=+1] 5 | include::drivers.adoc[leveloffset=+1] 6 | include::caboose.adoc[leveloffset=+1] 7 | -------------------------------------------------------------------------------- /doc/index.adoc: -------------------------------------------------------------------------------- 1 | :toc: left 2 | :toclevels: 3 3 | :sectnums: 4 | :source-highlighter: rouge 5 | :icons: font 6 | 7 | 8 | = Hubris Reference 9 | 10 | include::intro.adoc[leveloffset=+1] 11 | include::tasks.adoc[leveloffset=+1] 12 | include::ipc.adoc[leveloffset=+1] 13 | include::interrupts.adoc[leveloffset=+1] 14 | include::timers.adoc[leveloffset=+1] 15 | include::startup.adoc[leveloffset=+1] 16 | include::syscalls.adoc[leveloffset=+1] 17 | include::kipc.adoc[leveloffset=+1] 18 | include::guide/index.adoc[leveloffset=+1] 19 | include::biblio.adoc[leveloffset=+1] 20 | -------------------------------------------------------------------------------- /drv/auxflash-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-auxflash-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | idol-runtime.workspace = true 8 | num-traits.workspace = true 9 | sha3.workspace = true 10 | tlvc.workspace = true 11 | zerocopy.workspace = true 12 | zerocopy-derive.workspace = true 13 | 14 | counters = { path = "../../lib/counters" } 15 | derive-idol-err = { path = "../../lib/derive-idol-err" } 16 | drv-qspi-api = { path = "../qspi-api" } 17 | gnarle = { path = "../../lib/gnarle" } 18 | userlib = { path = "../../sys/userlib" } 19 | 20 | [build-dependencies] 21 | build-util = {path = "../../build/util"} 22 | idol.workspace = true 23 | serde.workspace = true 24 | 25 | [lib] 26 | test = false 27 | doctest = false 28 | bench = false 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /drv/caboose-pos/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-caboose-pos" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | unwrap-lite.path = "../../lib/unwrap-lite" 8 | volatile-const.path = "../../lib/volatile-const" 9 | 10 | [lib] 11 | test = false 12 | doctest = false 13 | bench = false 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /drv/caboose/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-caboose" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hubpack.workspace = true 8 | num-traits.workspace = true 9 | tlvc.workspace = true 10 | 11 | counters = { path = "../../lib/counters" } 12 | derive-idol-err.path = "../../lib/derive-idol-err" 13 | userlib.path = "../../sys/userlib" 14 | 15 | [lib] 16 | test = false 17 | doctest = false 18 | bench = false 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /drv/cosmo-seq-server/cosmo-hp/README.md: -------------------------------------------------------------------------------- 1 | FPGA images and collateral are generated from: 2 | [this sha](https://github.com/oxidecomputer/quartz/commit/ed11e90df260e8f34156dd295f994788a3e05cb2) 3 | [release](https://api.github.com/repos/oxidecomputer/quartz/releases/214360677) -------------------------------------------------------------------------------- /drv/cosmo-seq-server/cosmo-hp/cosmo_hp.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/cosmo-seq-server/cosmo-hp/cosmo_hp.bz2 -------------------------------------------------------------------------------- /drv/cpu-power-state/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-cpu-power-state" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | userlib = { path = "../../sys/userlib" } 8 | zerocopy = { workspace = true } 9 | zerocopy-derive = { workspace = true } 10 | num-traits = { workspace = true } 11 | counters = { path = "../../lib/counters", features = ["derive"] } 12 | 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /drv/cpu-seq-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-cpu-seq-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | idol-runtime = { workspace = true } 8 | num-traits.workspace = true 9 | zerocopy.workspace = true 10 | zerocopy-derive.workspace = true 11 | 12 | counters = { path = "../../lib/counters", features = ["derive"] } 13 | derive-idol-err = { path = "../../lib/derive-idol-err" } 14 | drv-cpu-power-state = { path = "../cpu-power-state" } 15 | userlib = { path = "../../sys/userlib" } 16 | 17 | [build-dependencies] 18 | idol.workspace = true 19 | 20 | [lib] 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /drv/cpu-seq-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters(idol::CounterSettings::default()) 8 | .build_client_stub("../../idl/cpu-seq.idol", "client_stub.rs")?; 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /drv/eeprom/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-eeprom" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | idol-runtime = { workspace = true } 8 | num-traits = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | derive-idol-err = {path = "../../lib/derive-idol-err" } 13 | drv-i2c-api = {path = "../i2c-api"} 14 | drv-i2c-devices = { path = "../i2c-devices" } 15 | userlib = {path = "../../sys/userlib"} 16 | 17 | [build-dependencies] 18 | build-i2c = {path = "../../build/i2c"} 19 | idol = { workspace = true } 20 | 21 | [features] 22 | no-ipc-counters = ["idol/no-counters"] 23 | 24 | [[bin]] 25 | name = "drv-eeprom" 26 | test = false 27 | doctest = false 28 | bench = false 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /drv/eeprom/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 7 | 8 | idol::Generator::new() 9 | .with_counters( 10 | idol::CounterSettings::default().with_server_counters(false), 11 | ) 12 | .build_server_support( 13 | "../../idl/eeprom.idol", 14 | "server_stub.rs", 15 | idol::server::ServerStyle::InOrder, 16 | )?; 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /drv/fpga-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/fpga.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/fpga-user-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-fpga-user-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | drv-fpga-api = { path = "../../drv/fpga-api" } 8 | num-traits = { workspace = true } 9 | userlib = { path = "../../sys/userlib" } 10 | zerocopy = { workspace = true } 11 | zerocopy-derive = { workspace = true } 12 | 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /drv/fpga-user-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! API crate for shared pieces of logic used in FPGA applications. 6 | 7 | #![no_std] 8 | 9 | pub mod power_rail; 10 | -------------------------------------------------------------------------------- /drv/gimlet-hf-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/hf.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/gimlet-hf-server/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /drv/gimlet-seq-server/README.md: -------------------------------------------------------------------------------- 1 | FPGA images and collateral (bin, json, html) are generated by 2 | [this build](https://github.com/oxidecomputer/quartz/actions/runs/14455499093/job/40537695566). 3 | -------------------------------------------------------------------------------- /drv/gimlet-seq-server/fpga-b.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/gimlet-seq-server/fpga-b.bin -------------------------------------------------------------------------------- /drv/hash-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-hash-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | 8 | 9 | [dependencies] 10 | idol-runtime.workspace = true 11 | num-traits.workspace = true 12 | zerocopy.workspace = true 13 | zerocopy-derive.workspace = true 14 | 15 | counters = { path = "../../lib/counters" } 16 | derive-idol-err = { path = "../../lib/derive-idol-err" } 17 | userlib = { path = "../../sys/userlib" } 18 | 19 | [build-dependencies] 20 | idol.workspace = true 21 | 22 | [lib] 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /drv/hash-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/hash.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/hf-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-hf-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | crc.workspace = true 8 | hubpack.workspace = true 9 | idol-runtime.workspace = true 10 | num-traits.workspace = true 11 | serde.workspace = true 12 | zerocopy.workspace = true 13 | zerocopy-derive.workspace = true 14 | 15 | counters = { path = "../../lib/counters" } 16 | derive-idol-err = { path = "../../lib/derive-idol-err" } 17 | drv-hash-api = { path = "../hash-api" } 18 | drv-qspi-api = { path = "../qspi-api" } 19 | userlib = { path = "../../sys/userlib" } 20 | 21 | [build-dependencies] 22 | idol.workspace = true 23 | 24 | [lib] 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /drv/hf-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/hf.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/i2c-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-i2c-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | zerocopy.workspace = true 8 | zerocopy-derive.workspace = true 9 | 10 | counters = { path = "../../lib/counters" } 11 | drv-i2c-types.path = "../i2c-types" 12 | userlib.path = "../../sys/userlib" 13 | 14 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 15 | # since test builds don't work for cross compilation. 16 | [lib] 17 | test = false 18 | doctest = false 19 | bench = false 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /drv/i2c-types/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-i2c-types" 3 | description = "data types for the client I2C API" 4 | version = "0.1.0" 5 | edition = "2021" 6 | 7 | [dependencies] 8 | num-derive.workspace = true 9 | num-traits.workspace = true 10 | hubpack.workspace = true 11 | serde.workspace = true 12 | enum-kinds.workspace = true 13 | 14 | derive-idol-err.path = "../../lib/derive-idol-err" 15 | counters = { path = "../../lib/counters" } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /drv/ice40-spi-program/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-ice40-spi-program" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | counters = { path = "../../lib/counters" } 8 | drv-spi-api = { path = "../spi-api" } 9 | drv-stm32xx-sys-api = { path = "../stm32xx-sys-api" } 10 | userlib = { path = "../../sys/userlib" } 11 | 12 | [lib] 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /drv/ignition-api/README.md: -------------------------------------------------------------------------------- 1 | `ignition_controller.{json, html, adoc}` are generated by 2 | [this build](https://github.com/oxidecomputer/quartz/runs/9406911408) 3 | ([Buildomat link](https://buildomat.eng.oxide.computer/wg/0/details/01GHG9SXXWYAK3VVA3XJNG9BVS/zs8TtxH9F98c4tjmGcQlp7xzZ6WJiDyxjSmrG7wwQAvmVqGn/01GHG9T67VKGMNZ84RPQAGNF1N)) 4 | 5 | If you updated these artifacts you probably want to update `drv-sidecar-mainboard-controller` as well. 6 | -------------------------------------------------------------------------------- /drv/ignition-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | idol::Generator::new() 9 | .with_counters( 10 | idol::CounterSettings::default().with_server_counters(false), 11 | ) 12 | .build_server_support( 13 | "../../idl/ignition.idol", 14 | "server_stub.rs", 15 | idol::server::ServerStyle::InOrder, 16 | )?; 17 | 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /drv/ksz8463/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ksz8463" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits = { workspace = true } 8 | 9 | counters = {path = "../../lib/counters"} 10 | drv-spi-api = {path = "../../drv/spi-api"} 11 | ringbuf = {path = "../../lib/ringbuf" } 12 | userlib = {path = "../../sys/userlib" } 13 | idol-runtime = { workspace = true } 14 | 15 | 16 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 17 | # since test builds don't work for cross compilation. 18 | [lib] 19 | test = false 20 | doctest = false 21 | bench = false 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /drv/local-vpd/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-local-vpd" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | zerocopy = { workspace = true } 8 | zerocopy-derive = { workspace = true } 9 | 10 | drv-oxide-vpd = { path = "../oxide-vpd" } 11 | drv-i2c-devices = { path = "../../drv/i2c-devices" } 12 | drv-i2c-api = { path = "../../drv/i2c-api" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | [build-dependencies] 16 | build-i2c = {path = "../../build/i2c" } 17 | idol = { workspace = true } 18 | 19 | [features] 20 | no-ipc-counters = ["idol/no-counters"] 21 | 22 | [lib] 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /drv/local-vpd/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/lpc55-flash/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-lpc55-flash" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | lpc55-pac = { workspace = true } 8 | 9 | [lib] 10 | test = false 11 | doctest = false 12 | bench = false 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /drv/lpc55-gpio-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-lpc55-gpio-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | 7 | [dependencies] 8 | cfg-if.workspace = true 9 | idol-runtime.workspace = true 10 | num-traits.workspace = true 11 | zerocopy.workspace = true 12 | zerocopy-derive.workspace = true 13 | serde.workspace = true 14 | hubpack.workspace = true 15 | 16 | counters = { path = "../../lib/counters" } 17 | derive-idol-err = { path = "../../lib/derive-idol-err" } 18 | userlib = { path = "../../sys/userlib" } 19 | 20 | [build-dependencies] 21 | build-util = { path = "../../build/util" } 22 | idol.workspace = true 23 | 24 | [lib] 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /drv/lpc55-gpio-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | idol::client::build_client_stub( 8 | "../../idl/lpc55-pins.idol", 9 | "client_stub.rs", 10 | )?; 11 | Ok(()) 12 | } 13 | -------------------------------------------------------------------------------- /drv/lpc55-gpio/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/lpc55-pins.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /drv/lpc55-iocon-gen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lpc55-iocon-gen" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | cfg-if = { workspace = true } 8 | proc-macro2 = { workspace = true } 9 | quote = { workspace = true } 10 | zerocopy = { workspace = true } 11 | zerocopy-derive = { workspace = true } 12 | 13 | [build-dependencies] 14 | build-util = { path = "../../build/util" } 15 | 16 | [lib] 17 | proc-macro = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /drv/lpc55-iocon-gen/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /drv/lpc55-rng/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/rng.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /drv/lpc55-sha256/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-lpc55-sha256" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | userlib.path = "../../sys/userlib" 8 | lpc55-pac.workspace = true 9 | 10 | [lib] 11 | test = false 12 | doctest = false 13 | bench = false 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /drv/lpc55-spi-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | use build_lpc55pins::PinConfig; 5 | use serde::Deserialize; 6 | 7 | #[derive(Deserialize)] 8 | #[serde(deny_unknown_fields, rename_all = "kebab-case")] 9 | struct TaskConfig { 10 | pins: Vec, 11 | } 12 | 13 | fn main() -> Result<(), Box> { 14 | build_util::build_notifications()?; 15 | let task_config = build_util::task_config::()?; 16 | 17 | build_lpc55pins::codegen(task_config.pins)?; 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /drv/lpc55-spi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-lpc55-spi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | lpc55-pac = { workspace = true } 8 | num-traits = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | drv-lpc55-syscon-api = { path = "../lpc55-syscon-api" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | [build-dependencies] 16 | idol = { workspace = true } 17 | 18 | [features] 19 | no-ipc-counters = ["idol/no-counters"] 20 | 21 | [lib] 22 | test = false 23 | doctest = false 24 | bench = false 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /drv/lpc55-sprot-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | use build_lpc55pins::PinConfig; 5 | use serde::Deserialize; 6 | 7 | #[derive(Deserialize)] 8 | #[serde(deny_unknown_fields, rename_all = "kebab-case")] 9 | struct TaskConfig { 10 | pins: Vec, 11 | } 12 | 13 | fn main() -> Result<(), Box> { 14 | build_util::build_notifications()?; 15 | let task_config = build_util::task_config::()?; 16 | 17 | build_lpc55pins::codegen(task_config.pins)?; 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /drv/lpc55-syscon-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-lpc55-syscon-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | counters = { path = "../../lib/counters" } 8 | userlib = { path = "../../sys/userlib" } 9 | 10 | num-traits = { workspace = true } 11 | zerocopy = { workspace = true } 12 | zerocopy-derive = { workspace = true } 13 | 14 | [build-dependencies] 15 | build-util = { path = "../../build/util" } 16 | idol = { workspace = true } 17 | 18 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 19 | # since test builds don't work for cross compilation. 20 | [lib] 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /drv/lpc55-syscon-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | idol::client::build_client_stub("../../idl/syscon.idol", "client_stub.rs")?; 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /drv/lpc55-syscon/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/syscon.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /drv/lpc55-update-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/lpc55-update.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/lpc55-usart/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | use build_lpc55pins::PinConfig; 5 | use serde::Deserialize; 6 | 7 | #[derive(Deserialize)] 8 | #[serde(deny_unknown_fields, rename_all = "kebab-case")] 9 | struct TaskConfig { 10 | pins: Vec, 11 | } 12 | 13 | fn main() -> Result<(), Box> { 14 | build_util::build_notifications()?; 15 | let task_config = build_util::task_config::()?; 16 | 17 | build_lpc55pins::codegen(task_config.pins)?; 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /drv/mb85rsxx-fram/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-mb85rsxx-fram" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | bitflags = { workspace = true } 8 | 9 | drv-spi-api = { path = "../spi-api" } 10 | counters = { path = "../../lib/counters" } 11 | 12 | [lints] 13 | workspace = true 14 | 15 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 16 | # since test builds don't work for cross compilation. 17 | [lib] 18 | test = false 19 | doctest = false 20 | bench = false 21 | -------------------------------------------------------------------------------- /drv/meanwell-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-meanwell-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | 8 | 9 | [dependencies] 10 | counters = { path = "../../lib/counters" } 11 | derive-idol-err = { path = "../../lib/derive-idol-err" } 12 | userlib = { path = "../../sys/userlib" } 13 | 14 | num-traits = { workspace = true } 15 | zerocopy = { workspace = true } 16 | zerocopy-derive = { workspace = true } 17 | 18 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 19 | # since test builds don't work for cross compilation. 20 | [lib] 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [build-dependencies] 26 | idol = { workspace = true } 27 | 28 | [lints] 29 | workspace = true 30 | -------------------------------------------------------------------------------- /drv/meanwell-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/meanwell.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/meanwell-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Client API for the MeanWell driver. 6 | 7 | #![no_std] 8 | 9 | use derive_idol_err::IdolError; 10 | use userlib::*; 11 | 12 | #[derive(Copy, Clone, Debug, FromPrimitive, IdolError, counters::Count)] 13 | pub enum MeanwellError { 14 | NotPresent = 1, 15 | GpioError = 2, 16 | } 17 | 18 | include!(concat!(env!("OUT_DIR"), "/client_stub.rs")); 19 | -------------------------------------------------------------------------------- /drv/meanwell/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/meanwell.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/medusa-seq-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-medusa-seq-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hubpack.workspace = true 8 | idol-runtime.workspace = true 9 | num-traits.workspace = true 10 | serde.workspace = true 11 | zerocopy.workspace = true 12 | zerocopy-derive.workspace = true 13 | 14 | counters = { path = "../../lib/counters" } 15 | derive-idol-err = { path = "../../lib/derive-idol-err" } 16 | drv-fpga-api = { path = "../fpga-api" } 17 | userlib = { path = "../../sys/userlib" } 18 | 19 | [build-dependencies] 20 | idol.workspace = true 21 | 22 | [lib] 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /drv/medusa-seq-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/medusa-seq.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/minibar-ignition-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | idol::Generator::new() 9 | .with_counters( 10 | idol::CounterSettings::default().with_server_counters(false), 11 | ) 12 | .build_server_support( 13 | "../../idl/ignition.idol", 14 | "server_stub.rs", 15 | idol::server::ServerStyle::InOrder, 16 | )?; 17 | 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /drv/minibar-seq-api/README.md: -------------------------------------------------------------------------------- 1 | `minibar_controller_hvc_a.bit` and `minibar_regs.{adoc, json}` are generated at 2 | [this commit](https://github.com/oxidecomputer/quartz/commit/c649d37c5f9a96c8a7d615c2165bf1344d1c8364) -------------------------------------------------------------------------------- /drv/minibar-seq-api/minibar_controller_hcv_a.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/minibar-seq-api/minibar_controller_hcv_a.bit -------------------------------------------------------------------------------- /drv/mock-gimlet-hf-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/hf.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /drv/mock-gimlet-seq-server/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-mock-gimlet-seq-server" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | idol-runtime = { workspace = true } 8 | num-traits = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | drv-cpu-seq-api = { path = "../cpu-seq-api" } 13 | drv-cpu-power-state = { path = "../cpu-power-state" } 14 | task-jefe-api = { path = "../../task/jefe-api" } 15 | userlib = { path = "../../sys/userlib" } 16 | 17 | [build-dependencies] 18 | idol.workspace = true 19 | 20 | [[bin]] 21 | name = "drv-mock-gimlet-seq-server" 22 | test = false 23 | doctest = false 24 | bench = false 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /drv/mock-gimlet-seq-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/cpu-seq.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /drv/monorail-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/monorail.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/onewire-devices/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-onewire-devices" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | drv-onewire = { path = "../onewire" } 8 | userlib = { path = "../../sys/userlib" } 9 | 10 | num-traits = { workspace = true } 11 | zerocopy = { workspace = true } 12 | zerocopy-derive = { workspace = true } 13 | 14 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 15 | # since test builds don't work for cross compilation. 16 | [lib] 17 | test = false 18 | doctest = false 19 | bench = false 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /drv/onewire-devices/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! 1-wire device drivers 6 | //! 7 | //! This crate contains all 1-wire device drivers -- which is currently a 8 | //! short list! 9 | 10 | #![no_std] 11 | 12 | pub mod ds18b20; 13 | -------------------------------------------------------------------------------- /drv/onewire/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-onewire" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits = { workspace = true } 8 | zerocopy = { workspace = true } 9 | zerocopy-derive = { workspace = true } 10 | 11 | userlib = { path = "../../sys/userlib" } 12 | 13 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 14 | # since test builds don't work for cross compilation. 15 | [lib] 16 | test = false 17 | doctest = false 18 | bench = false 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /drv/oxide-vpd/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-oxide-vpd" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | tlvc = { workspace = true } 8 | zerocopy = { workspace = true } 9 | zerocopy-derive = { workspace = true } 10 | 11 | drv-i2c-api = { path = "../../drv/i2c-api" } 12 | drv-i2c-devices = { path = "../../drv/i2c-devices" } 13 | ringbuf = { path = "../../lib/ringbuf" } 14 | 15 | [build-dependencies] 16 | idol.workspace = true 17 | 18 | [lib] 19 | test = false 20 | doctest = false 21 | bench = false 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /drv/packrat-vpd-loader/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-packrat-vpd-loader" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | drv-local-vpd.path = "../local-vpd" 8 | oxide-barcode.path = "../../lib/oxide-barcode" 9 | ringbuf.path = "../../lib/ringbuf" 10 | task-packrat-api.path = "../../task/packrat-api" 11 | userlib.path = "../../sys/userlib" 12 | 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /drv/psc-psu-update/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /drv/psc-psu-update/src/mwocp68-0701.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/psc-psu-update/src/mwocp68-0701.bin -------------------------------------------------------------------------------- /drv/psc-psu-update/src/mwocp68-0762.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/psc-psu-update/src/mwocp68-0762.bin -------------------------------------------------------------------------------- /drv/psc-seq-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-psc-seq-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits.workspace = true 8 | 9 | userlib.path = "../../sys/userlib" 10 | 11 | [lib] 12 | test = false 13 | doctest = false 14 | bench = false 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /drv/psc-seq-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! API crate for the PSC Sequencer server. 6 | 7 | #![no_std] 8 | 9 | use userlib::FromPrimitive; 10 | 11 | #[derive(Copy, Clone, Debug, Eq, PartialEq, FromPrimitive)] 12 | #[repr(u8)] 13 | pub enum PowerState { 14 | Init = 0, 15 | A2 = 1, 16 | } 17 | -------------------------------------------------------------------------------- /drv/psc-seq-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/qspi-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-qspi-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 9 | # since test builds don't work for cross compilation. 10 | [lib] 11 | test = false 12 | doctest = false 13 | bench = false 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /drv/rng-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/rng.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/sbrmi-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/sbrmi.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/sbrmi/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/sbrmi.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/sidecar-front-io/README.md: -------------------------------------------------------------------------------- 1 | `sidecar_qsfp_x32_controller.{bit, json, html, adoc}` are generated at 2 | [this commit](https://github.com/oxidecomputer/quartz/commit/9209c858a8c91d7ab4d81e146803dcc4f4b8c280) -------------------------------------------------------------------------------- /drv/sidecar-front-io/sidecar_qsfp_x32_controller_rev_b_c.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/sidecar-front-io/sidecar_qsfp_x32_controller_rev_b_c.bit -------------------------------------------------------------------------------- /drv/sidecar-front-io/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | 7 | include!(concat!( 8 | env!("OUT_DIR"), 9 | "/sidecar_qsfp_x32_controller_regs.rs" 10 | )); 11 | 12 | #[cfg(feature = "controller")] 13 | pub mod controller; 14 | #[cfg(feature = "leds")] 15 | pub mod leds; 16 | #[cfg(feature = "phy_smi")] 17 | pub mod phy_smi; 18 | #[cfg(feature = "transceivers")] 19 | pub mod transceivers; 20 | -------------------------------------------------------------------------------- /drv/sidecar-mainboard-controller/README.md: -------------------------------------------------------------------------------- 1 | `sidecar_mainboard_controller.{bit, json, html, adoc}` are generated at 2 | [this commit](https://github.com/oxidecomputer/quartz/commit/d4c2c020ceff20e77dcae2c82af276f426cf0201) 3 | 4 | If you updated these artifacts you probably want to update `drv-ignition-api` as well. 5 | -------------------------------------------------------------------------------- /drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_b.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_b.bit -------------------------------------------------------------------------------- /drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_c_d.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/sidecar-mainboard-controller/sidecar_mainboard_controller_rev_c_d.bit -------------------------------------------------------------------------------- /drv/sidecar-mainboard-controller/sidecar_mainboard_emulator_ecp5_evn.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/sidecar-mainboard-controller/sidecar_mainboard_emulator_ecp5_evn.bit -------------------------------------------------------------------------------- /drv/sidecar-mainboard-i2c-emulator/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-sidecar-mainboard-i2c-emulator" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | drv-i2c-api = { path = "../i2c-api" } 8 | ringbuf = { path = "../../lib/ringbuf" } 9 | userlib = { path = "../../sys/userlib" } 10 | 11 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 12 | # since test builds don't work for cross compilation. 13 | [[bin]] 14 | name = "drv-sidecar-mainboard-i2c-emulator" 15 | test = false 16 | doctest = false 17 | bench = false 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /drv/sidecar-seq-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/sidecar-seq.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/sp-ctrl-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-sp-ctrl-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | 8 | 9 | [dependencies] 10 | idol-runtime.workspace = true 11 | num-traits.workspace = true 12 | zerocopy.workspace = true 13 | zerocopy-derive.workspace = true 14 | 15 | counters = { path = "../../lib/counters" } 16 | derive-idol-err = { path = "../../lib/derive-idol-err" } 17 | userlib = { path = "../../sys/userlib" } 18 | 19 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 20 | # since test builds don't work for cross compilation. 21 | [lib] 22 | test = false 23 | doctest = false 24 | bench = false 25 | 26 | [build-dependencies] 27 | idol.workspace = true 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /drv/sp-ctrl-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/sp-ctrl.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/spartan7-loader-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-spartan7-loader-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | idol-runtime = { workspace = true } 8 | num-traits.workspace = true 9 | zerocopy.workspace = true 10 | zerocopy-derive.workspace = true 11 | 12 | counters = { path = "../../lib/counters", features = ["derive"] } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | [build-dependencies] 16 | idol.workspace = true 17 | 18 | [lib] 19 | test = false 20 | doctest = false 21 | bench = false 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /drv/spartan7-loader-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters(idol::CounterSettings::default()) 8 | .build_client_stub( 9 | "../../idl/spartan7-loader.idol", 10 | "client_stub.rs", 11 | )?; 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /drv/spartan7-loader-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! API crate for the Spartan7 loader. 6 | 7 | #![no_std] 8 | 9 | use userlib::sys_send; 10 | 11 | /// Token that indicates that the Spartan-7 is running 12 | /// 13 | /// This token can be passed to peripheral constructors. 14 | pub struct Spartan7Token(()); 15 | 16 | impl Spartan7Loader { 17 | /// Gets a token proving that the Spartan-7 is running 18 | pub fn get_token(&self) -> Spartan7Token { 19 | self.ping(); 20 | Spartan7Token(()) 21 | } 22 | } 23 | 24 | include!(concat!(env!("OUT_DIR"), "/client_stub.rs")); 25 | -------------------------------------------------------------------------------- /drv/spartan7-loader/cosmo-seq/README.md: -------------------------------------------------------------------------------- 1 | FPGA images and collateral are generated from: 2 | [this sha](https://github.com/oxidecomputer/quartz/commit/0cf5b6cffba5bbf70db9b50b7301831e7697e8fb) 3 | [release](https://api.github.com/repos/oxidecomputer/quartz/releases/220433638) -------------------------------------------------------------------------------- /drv/spartan7-loader/cosmo-seq/cosmo_seq.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/spartan7-loader/cosmo-seq/cosmo_seq.bz2 -------------------------------------------------------------------------------- /drv/spartan7-loader/grapefruit/README.md: -------------------------------------------------------------------------------- 1 | FPGA images and collateral are generated from: 2 | [this sha](https://github.com/oxidecomputer/quartz/commit/6cf9b3ff8a74e631723586d4f380835fbba457e6) 3 | [release](https://api.github.com/repos/oxidecomputer/quartz/releases/204448780) -------------------------------------------------------------------------------- /drv/spartan7-loader/grapefruit/grapefruit.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/drv/spartan7-loader/grapefruit/grapefruit.bz2 -------------------------------------------------------------------------------- /drv/spartan7-spi-program/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-spartan7-spi-program" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | drv-spi-api = { path = "../spi-api" } 8 | drv-stm32xx-sys-api = { path = "../stm32xx-sys-api" } 9 | counters = { path = "../../lib/counters" } 10 | userlib = { path = "../../sys/userlib" } 11 | 12 | [lib] 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /drv/sprot-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/sprot.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/stm32fx-rcc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32fx-rcc" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits = { workspace = true } 8 | stm32f3 = { workspace = true, optional = true } 9 | stm32f4 = { workspace = true, optional = true } 10 | zerocopy = { workspace = true } 11 | zerocopy-derive = { workspace = true } 12 | 13 | userlib = { path = "../../sys/userlib", features = ["panic-messages"] } 14 | 15 | [features] 16 | f3 = ["stm32f3/stm32f303"] 17 | f4 = ["stm32f4/stm32f407"] 18 | 19 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 20 | # since test builds don't work for cross compilation. 21 | [[bin]] 22 | name = "drv-stm32fx-rcc" 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /drv/stm32fx-usart/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/stm32g0-usart/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/stm32h7-dbgmcu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-dbgmcu" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | stm32h7 = { workspace = true } 8 | 9 | [features] 10 | h743 = ["stm32h7/stm32h743"] 11 | h753 = ["stm32h7/stm32h753"] 12 | 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /drv/stm32h7-dbgmcu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Minimal driver to read the IDC register in the DBGMCU 6 | 7 | #![no_std] 8 | 9 | #[cfg(feature = "h743")] 10 | pub use stm32h7::stm32h743 as device; 11 | 12 | #[cfg(feature = "h753")] 13 | pub use stm32h7::stm32h753 as device; 14 | 15 | pub fn read_idc() -> u32 { 16 | // SAFETY: this is either allowed by the MPU configuration or will crash 17 | // (which is safe) 18 | let dbg = unsafe { &*device::DBGMCU::ptr() }; 19 | dbg.idc.read().bits() 20 | } 21 | -------------------------------------------------------------------------------- /drv/stm32h7-eth/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-eth" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | default = [] 8 | h743 = ["stm32h7/stm32h743"] 9 | h753 = ["stm32h7/stm32h753"] 10 | ipv4 = [] 11 | ipv6 = [] 12 | vlan = [] 13 | 14 | [dependencies] 15 | cfg-if = { workspace = true } 16 | cortex-m = { workspace = true } 17 | stm32h7 = { workspace = true } 18 | 19 | userlib = { path = "../../sys/userlib" } 20 | 21 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 22 | # since test builds don't work for cross compilation. 23 | [lib] 24 | test = false 25 | doctest = false 26 | bench = false 27 | 28 | [lints] 29 | workspace = true 30 | -------------------------------------------------------------------------------- /drv/stm32h7-fmc-demo-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new().build_server_support( 10 | "../../idl/fmc-demo.idol", 11 | "server_stub.rs", 12 | idol::server::ServerStyle::InOrder, 13 | )?; 14 | 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /drv/stm32h7-hash-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/hash.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/stm32h7-hash/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-hash" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | stm32h7 = { workspace = true } 8 | vcell = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | drv-hash-api = { path = "../hash-api" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | [features] 16 | h753 = ["stm32h7/stm32h753"] 17 | 18 | [lib] 19 | test = false 20 | doctest = false 21 | bench = false 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /drv/stm32h7-qspi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-qspi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | stm32h7 = { workspace = true } 8 | vcell = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | drv-qspi-api = { path = "../qspi-api" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | [features] 16 | h743 = ["stm32h7/stm32h743"] 17 | h753 = ["stm32h7/stm32h753"] 18 | 19 | [lib] 20 | test = false 21 | doctest = false 22 | bench = false 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /drv/stm32h7-rng/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/rng.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /drv/stm32h7-spi-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | idol::Generator::new() 8 | .with_counters( 9 | idol::CounterSettings::default().with_server_counters(false), 10 | ) 11 | .build_server_support( 12 | "../../idl/spi.idol", 13 | "server_stub.rs", 14 | idol::server::ServerStyle::InOrder, 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /drv/stm32h7-spi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-spi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits = { workspace = true } 8 | stm32h7 = { workspace = true } 9 | vcell = { workspace = true } 10 | zerocopy = { workspace = true } 11 | zerocopy-derive = { workspace = true } 12 | 13 | ringbuf = { path = "../../lib/ringbuf" } 14 | 15 | [features] 16 | h743 = ["stm32h7/stm32h743"] 17 | h753 = ["stm32h7/stm32h753"] 18 | 19 | [lib] 20 | test = false 21 | doctest = false 22 | bench = false 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /drv/stm32h7-sprot-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | build_stm32xx_sys::build_gpio_irq_pins()?; 9 | 10 | idol::Generator::new() 11 | .with_counters( 12 | idol::CounterSettings::default().with_server_counters(false), 13 | ) 14 | .build_server_support( 15 | "../../idl/sprot.idol", 16 | "server_stub.rs", 17 | idol::server::ServerStyle::InOrder, 18 | )?; 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/stm32h7-startup/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-startup" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | cortex-m = { workspace = true } 8 | cortex-m-rt = { workspace = true } 9 | stm32h7 = { workspace = true } 10 | 11 | [features] 12 | h743 = ["stm32h7/stm32h743"] 13 | h753 = ["stm32h7/stm32h753"] 14 | 15 | [lib] 16 | test = false 17 | doctest = false 18 | bench = false 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /drv/stm32h7-update-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/stm32h7-update.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/stm32h7-usart/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32h7-usart" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | stm32h7 = { workspace = true } 8 | 9 | drv-stm32xx-sys-api = { path = "../../drv/stm32xx-sys-api" } 10 | userlib = { path = "../../sys/userlib" } 11 | 12 | [features] 13 | h743 = ["stm32h7/stm32h743", "drv-stm32xx-sys-api/h743"] 14 | h753 = ["stm32h7/stm32h753", "drv-stm32xx-sys-api/h753"] 15 | 16 | [lib] 17 | test = false 18 | doctest = false 19 | bench = false 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /drv/stm32xx-i2c-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | let disposition = build_i2c::Disposition::Initiator; 10 | 11 | if let Err(e) = build_i2c::codegen(disposition) { 12 | println!("code generation failed: {}", e); 13 | std::process::exit(1); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /drv/stm32xx-i2c/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /drv/stm32xx-sys-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/stm32xx-sys.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/stm32xx-uid/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-stm32xx-uid" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | cfg-if = { workspace = true } 8 | 9 | [features] 10 | family-stm32g0 = [] 11 | family-stm32h7 = [] 12 | 13 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 14 | # since test builds don't work for cross compilation. 15 | [lib] 16 | test = false 17 | doctest = false 18 | bench = false 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /drv/transceivers-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/transceivers.idol", 8 | "client_stub.rs", 9 | )?; 10 | 11 | let disposition = build_i2c::Disposition::Sensors; 12 | if let Err(e) = build_i2c::codegen(disposition) { 13 | println!("code generation failed: {}", e); 14 | std::process::exit(1); 15 | } 16 | 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /drv/transceivers-server/README.mkdn: -------------------------------------------------------------------------------- 1 | # Transceivers 2 | 3 | This task provides basic control and communication of QSFP modules on 4 | Sidecar's Front IO board. Things this task can provide are: 5 | 6 | - turning on the System LED 7 | - hot swap controller (HSC) enable control 8 | - QSFP module reset/lpmode control 9 | - status of HSC power good and power good timeout 10 | - status of QSFP module presence and interrupts, including turning on LEDs to show 11 | module presence 12 | - ability to read/write up to 128 bytes on modules' I2C interface 13 | 14 | 15 | Failure to communicate with the LED drivers (which indicate module presence and 16 | control the System LED) will not crash this task. 17 | -------------------------------------------------------------------------------- /drv/user-leds-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "drv-user-leds-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | num-traits = { workspace = true } 8 | zerocopy = { workspace = true } 9 | zerocopy-derive = { workspace = true } 10 | 11 | counters = { path = "../../lib/counters" } 12 | derive-idol-err = { path = "../../lib/derive-idol-err" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 16 | # since test builds don't work for cross compilation. 17 | [lib] 18 | test = false 19 | doctest = false 20 | bench = false 21 | 22 | [build-dependencies] 23 | idol = { workspace = true } 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /drv/user-leds-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/user-leds.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /drv/user-leds-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Client API for the User LEDs driver. 6 | 7 | #![no_std] 8 | 9 | use derive_idol_err::IdolError; 10 | use userlib::*; 11 | 12 | #[derive(Copy, Clone, Debug, FromPrimitive, IdolError, counters::Count)] 13 | pub enum LedError { 14 | NotPresent = 1, 15 | } 16 | 17 | include!(concat!(env!("OUT_DIR"), "/client_stub.rs")); 18 | -------------------------------------------------------------------------------- /drv/user-leds/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/user-leds.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /drv/vsc-err/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vsc-err" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | counters = { path = "../../lib/counters" } 8 | drv-spi-api = { path = "../spi-api" } 9 | idol-runtime = { workspace = true } 10 | 11 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 12 | # since test builds don't work for cross compilation. 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /drv/vsc85xx/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vsc85xx" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | vsc7448-pac = { workspace = true } 8 | zerocopy = { workspace = true } 9 | zerocopy-derive = { workspace = true } 10 | 11 | ringbuf = { path = "../../lib/ringbuf" } 12 | userlib = { path = "../../sys/userlib" } 13 | vsc-err = { path = "../vsc-err" } 14 | 15 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 16 | # since test builds don't work for cross compilation. 17 | [lib] 18 | test = false 19 | doctest = false 20 | bench = false 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /idl/dumper.idol: -------------------------------------------------------------------------------- 1 | // Dumper API 2 | 3 | Interface( 4 | name: "Dumper", 5 | ops: { 6 | "dump": ( 7 | args: { 8 | "address": "u32", 9 | }, 10 | reply: Result( 11 | ok: "()", 12 | err: CLike("DumperError"), 13 | ), 14 | ) 15 | } 16 | ) 17 | -------------------------------------------------------------------------------- /idl/eeprom.idol: -------------------------------------------------------------------------------- 1 | // EEPROM IPC interface 2 | 3 | Interface( 4 | name: "Eeprom", 5 | ops: { 6 | "read_byte": ( 7 | doc: "Reads a single byte from the EEPROM", 8 | args: { 9 | "addr": "u16", 10 | }, 11 | reply: Result( 12 | ok: "u8", 13 | err: CLike("EepromError"), 14 | ), 15 | ), 16 | "write_byte": ( 17 | doc: "Writes a single byte to the EEPROM", 18 | args: { 19 | "addr": "u16", 20 | "value": "u8", 21 | }, 22 | reply: Result( 23 | ok: "()", 24 | err: CLike("EepromError"), 25 | ), 26 | ), 27 | }, 28 | ) 29 | 30 | -------------------------------------------------------------------------------- /idl/minibar-seq.idol: -------------------------------------------------------------------------------- 1 | // Minibar Sequencer API 2 | 3 | Interface( 4 | name: "Sequencer", 5 | ops: { 6 | "controller_ready": ( 7 | args: {}, 8 | reply: Result( 9 | ok: "bool", 10 | err: CLike("MinibarSeqError"), 11 | ), 12 | ), 13 | }, 14 | ) -------------------------------------------------------------------------------- /idl/rng.idol: -------------------------------------------------------------------------------- 1 | // Interface to RNG. 2 | 3 | Interface( 4 | name: "Rng", 5 | ops: { 6 | "fill": ( 7 | doc: "Fill buffer with entropy from platform RNG.", 8 | args: {}, 9 | leases: { 10 | "source": (type: "[u8]", write: true), 11 | }, 12 | reply: Result( 13 | ok: "usize", 14 | err: CLike("RngError"), 15 | ), 16 | ), 17 | } 18 | ) 19 | -------------------------------------------------------------------------------- /idl/spartan7-loader.idol: -------------------------------------------------------------------------------- 1 | // Interface to Spartan-7 FPGA loader. 2 | 3 | Interface( 4 | name: "Spartan7Loader", 5 | ops: { 6 | "ping": ( 7 | doc: "returns once the loader is complete", 8 | args: {}, 9 | reply: Simple("()"), 10 | idempotent: true, 11 | ), 12 | } 13 | ) 14 | -------------------------------------------------------------------------------- /idl/validate.idol: -------------------------------------------------------------------------------- 1 | // Validation API 2 | 3 | Interface( 4 | name: "Validate", 5 | ops: { 6 | "validate_i2c": ( 7 | args: { 8 | "index": "u32", 9 | }, 10 | reply: Result( 11 | ok: (type: "ValidateOk", recv: FromPrimitive("u8")), 12 | err: CLike("ValidateError"), 13 | ), 14 | idempotent: true, 15 | ), 16 | }, 17 | ) 18 | -------------------------------------------------------------------------------- /lib/armv6m-atomic-hack/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "armv6m-atomic-hack" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [build-dependencies] 7 | build-util = { path = "../../build/util" } 8 | 9 | [lib] 10 | test = false 11 | doctest = false 12 | bench = false 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /lib/armv6m-atomic-hack/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | match build_util::expose_m_profile() { 7 | Ok(_) => (), 8 | Err(e) => println!("cargo:warn={e}"), 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/armv8-m-mpu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "armv8-m-mpu" 3 | version = "0.1.0" 4 | edition = "2021" 5 | description = "ARMv8-m MPU config helpers" 6 | 7 | [dependencies] 8 | cortex-m = { workspace = true } 9 | 10 | [lib] 11 | test = false 12 | doctest = false 13 | bench = false 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /lib/counters/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "counters" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | derive = ["dep:counters-derive"] 8 | default = ["derive"] 9 | 10 | [dependencies] 11 | counters-derive = { path = "derive", optional = true } 12 | armv6m-atomic-hack = { path = "../armv6m-atomic-hack" } 13 | 14 | [lib] 15 | test = false 16 | doctest = false 17 | bench = false 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /lib/counters/derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "counters-derive" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | proc-macro = true 8 | 9 | [dependencies] 10 | proc-macro2 = "1.0.78" 11 | quote = "1.0.35" 12 | syn = { version = "2.0.52", features = ["extra-traits"] } 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /lib/derive-idol-err/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "derive-idol-err" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | syn = { workspace = true, features = ["parsing", "printing"] } 8 | quote = { workspace = true } 9 | proc-macro2 = {workspace = true} 10 | 11 | abi = { path = "../../sys/abi" } 12 | 13 | [lib] 14 | proc-macro = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /lib/endoscope-abi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "endoscope-abi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | test = false 8 | doctest = false 9 | bench = false 10 | 11 | [dependencies] 12 | zerocopy = { workspace = true, features = ["derive"] } 13 | sha3 = { workspace = true } 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /lib/fixedmap/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fixedmap" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lints] 7 | workspace = true 8 | -------------------------------------------------------------------------------- /lib/gnarle/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gnarle" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | std = [] 8 | 9 | [lints] 10 | workspace = true 11 | -------------------------------------------------------------------------------- /lib/gnarle/README.mkdn: -------------------------------------------------------------------------------- 1 | # gnaRLE 2 | 3 | This is a dead-simple RLE compressor/decompressor intended for embedding images 4 | with runs of constant data into other images. FPGA bitstreams into firmware 5 | images is the original motivating example. 6 | -------------------------------------------------------------------------------- /lib/host-sp-messages/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "host-sp-messages" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | bitflags.workspace = true 8 | fletcher.workspace = true 9 | gateway-messages.workspace = true 10 | hubpack.workspace = true 11 | num-derive.workspace = true 12 | num-traits.workspace = true 13 | serde-big-array.workspace = true 14 | serde.workspace = true 15 | serde_repr.workspace = true 16 | static_assertions.workspace = true 17 | zerocopy.workspace = true 18 | zerocopy-derive.workspace = true 19 | 20 | oxide-barcode.path = "../oxide-barcode" 21 | unwrap-lite.path = "../unwrap-lite" 22 | drv-i2c-types.path = "../../drv/i2c-types" # to implement From 23 | counters.path = "../../lib/counters" 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /lib/lpc55-puf/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lpc55-puf" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | lpc55-pac = { workspace = true } 8 | num-derive = { workspace = true } 9 | num-traits = { workspace = true } 10 | unwrap-lite = { path = "../unwrap-lite" } 11 | 12 | [lib] 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /lib/lpc55-rom-data/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lpc55-rom-data" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | test = false 8 | doctest = false 9 | bench = false 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /lib/lpc55-rom-data/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! lpc55-rom-data 6 | //! 7 | //! This crate is intended as a home for data / types / constants that need 8 | //! to be usable on both the host and target. When various data from the 9 | //! lpc55-romapi crate is needed in software built for the host it should 10 | //! be moved here. 11 | 12 | #![no_std] 13 | 14 | pub const FLASH_PAGE_SIZE: usize = 512; 15 | -------------------------------------------------------------------------------- /lib/lpc55-romapi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lpc55_romapi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | default = ["panic-messages"] 8 | panic-messages = [] 9 | 10 | [dependencies] 11 | lpc55-pac = { workspace = true } 12 | num-derive = { workspace = true } 13 | num-traits = { workspace = true } 14 | cfg-if = { workspace = true } 15 | 16 | lpc55-rom-data.path = "../lpc55-rom-data" 17 | 18 | [lib] 19 | test = false 20 | doctest = false 21 | bench = false 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /lib/lpc55-usart/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lib-lpc55-usart" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | embedded-hal = { workspace = true } 8 | lpc55-pac = { workspace = true } 9 | nb = { workspace = true } 10 | 11 | unwrap-lite = { path = "../../lib/unwrap-lite" } 12 | 13 | [lib] 14 | test = false 15 | doctest = false 16 | bench = false 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /lib/lpc55-usart/README.mkdn: -------------------------------------------------------------------------------- 1 | # lib-lpc55-usart 2 | 3 | This library wraps access to the lpc55 usart in the Read & Write traits from 4 | the embedded-hal crate. Additionally it provides some convenience functions 5 | for common operations. 6 | -------------------------------------------------------------------------------- /lib/multitimer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "multitimer" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | enum-map = { workspace = true } 8 | 9 | [target.'cfg(target_os = "none")'.dependencies] 10 | userlib = {path = "../../sys/userlib"} 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /lib/mutable-statics/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mutable-statics" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lints] 7 | workspace = true 8 | -------------------------------------------------------------------------------- /lib/oxide-barcode/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "oxide-barcode" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hubpack.workspace = true 8 | serde.workspace = true 9 | zerocopy = { workspace = true, features = ["derive"] } 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /lib/phash/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "phash" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lints] 7 | workspace = true 8 | -------------------------------------------------------------------------------- /lib/ringbuf/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ringbuf" 3 | version = "0.2.0" 4 | edition = "2021" 5 | 6 | [features] 7 | # To disable a ring buffer (but leave it otherwise present), enable the 8 | # "disabled" feature 9 | disabled = [] 10 | # To disable counters as well as ring buffers, enable the "counters-disabled" 11 | # feature. 12 | counters-disabled = [] 13 | default = ["counters"] 14 | 15 | [dependencies] 16 | static-cell = { path = "../static-cell" } 17 | counters = { path = "../counters", optional = true } 18 | 19 | [lib] 20 | test = false 21 | doctest = false 22 | bench = false 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /lib/snitch-core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "snitch-core" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | heapless.workspace = true 8 | unwrap-lite = { version = "0.1.0", path = "../unwrap-lite" } 9 | 10 | [lints] 11 | workspace = true 12 | 13 | [dev-dependencies] 14 | minicbor-serde = { version = "0.3.2", features = ["std"] } 15 | serde = { workspace = true, features = ["derive"] } 16 | -------------------------------------------------------------------------------- /lib/stage0-handoff/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "stage0-handoff" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | counters = { path = "../counters" } 8 | hubpack = { workspace = true } 9 | serde = { workspace = true } 10 | static_assertions = { workspace = true } 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /lib/stage0-handoff/README.md: -------------------------------------------------------------------------------- 1 | This code dumps information from flash known only to stage0 into RAM accessible by Hubris tasks. 2 | Currently it is used for DICE information and details of images. 3 | -------------------------------------------------------------------------------- /lib/static-cell/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "static-cell" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | armv6m-atomic-hack = {path = "../armv6m-atomic-hack"} 8 | 9 | [build-dependencies] 10 | build-util = { path = "../../build/util" } 11 | 12 | [lib] 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /lib/task-config/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-config" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | proc-macro2 = { workspace = true } 8 | quote = { workspace = true } 9 | serde = { workspace = true } 10 | syn = { workspace = true } 11 | toml = { workspace = true } 12 | build-util = { path = "../../build/util" } 13 | 14 | [lib] 15 | proc-macro = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /lib/toml-task/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "toml-task" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | anyhow.workspace = true 10 | indexmap.workspace = true 11 | ordered-toml.workspace = true 12 | serde.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /lib/unwrap-lite/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "unwrap-lite" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lints] 7 | workspace = true 8 | -------------------------------------------------------------------------------- /lib/update-buffer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "update-buffer" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | spin = { workspace = true } 8 | 9 | [lints] 10 | workspace = true 11 | -------------------------------------------------------------------------------- /lib/volatile-const/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "volatile-const" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lints] 7 | workspace = true 8 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly-2024-09-17" 3 | targets = [ "thumbv6m-none-eabi", "thumbv7em-none-eabihf", "thumbv8m.main-none-eabihf" ] 4 | profile = "minimal" 5 | components = [ "rustfmt" ] 6 | -------------------------------------------------------------------------------- /support/fake_certs/fake_certificate.der.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/support/fake_certs/fake_certificate.der.crt -------------------------------------------------------------------------------- /support/fake_certs/p256-private-key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/support/fake_certs/p256-private-key.der -------------------------------------------------------------------------------- /support/lpc4322_bl_crc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/support/lpc4322_bl_crc.bin -------------------------------------------------------------------------------- /support/lpc4322_lpc55s69xpresso_if_rla_swo_hacks.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxidecomputer/hubris/74d3ad23cf8d999d4dd7881c96cb00cac4c67af5/support/lpc4322_lpc55s69xpresso_if_rla_swo_hacks.bin -------------------------------------------------------------------------------- /support/support_tokens/README.md: -------------------------------------------------------------------------------- 1 | This folder contains the public keys for our support PIV tokens. 2 | 3 | `authorized_keys` is from [`oxidecomputer/support-piv-tokens@36abeb82`](https://github.com/oxidecomputer/support-piv-tokens/blob/36abeb82aacb3640be2f6c988e49844356cf65a8/authorized_keys). 4 | 5 | It has been edited to remove spaces from the comment field; 6 | see [`rustcrypto/SSH#289`](https://github.com/RustCrypto/SSH/pull/289) 7 | 8 | The `authorized_keys` file is also [mirrored in Omicron](https://github.com/oxidecomputer/omicron/blob/main/smf/switch_zone_setup/support_authorized_keys), 9 | from where it is copied into the host OS (for SSH login into the switch zone). 10 | -------------------------------------------------------------------------------- /sys/abi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "abi" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | zerocopy = { workspace = true, features = ["derive"] } 8 | bitflags = { workspace = true } 9 | byteorder = { workspace = true } 10 | serde = { workspace = true } 11 | phash = { path = "../../lib/phash" } 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /sys/kern/.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 80 2 | -------------------------------------------------------------------------------- /sys/kern/src/header.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | use abi::ImageHeader; 6 | 7 | // Filled with dummy data by the linker, then populated by the build system 8 | extern "C" { 9 | pub static HEADER: ImageHeader; 10 | } 11 | -------------------------------------------------------------------------------- /sys/kerncore/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "kerncore" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | 10 | [lints] 11 | workspace = true 12 | -------------------------------------------------------------------------------- /sys/kerncore/README.mkdn: -------------------------------------------------------------------------------- 1 | # `kerncore`: kernel core algorithms 2 | 3 | This crate contains bits of the Hubris kernel, factored out to make them more 4 | easily tested on other operating systems. 5 | 6 | It is left as an exercise for the reader whether `kerncore` is also 7 | 8 | - A musical genre 9 | - A fashion aesthetic 10 | - A form of crash dump 11 | - The middle part of an apple (lowercase) 12 | -------------------------------------------------------------------------------- /sys/num-tasks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hubris-num-tasks" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [build-dependencies] 7 | build-util = { path = "../../build/util" } 8 | 9 | [features] 10 | task-enum = [] 11 | 12 | [lib] 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /sys/num-tasks/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Allows applications to depend, at compile time, on the number of tasks in 6 | //! the image. 7 | //! 8 | //! `num_tasks::NUM_TASKS` is a `const` `usize` giving the total task count. 9 | //! This can be used to size tables, which in turn lets tasks effectively "add a 10 | //! field" to all tasks in the system, outside the kernel. 11 | 12 | #![no_std] 13 | #![forbid(clippy::wildcard_imports)] 14 | 15 | include!(concat!(env!("OUT_DIR"), "/tasks.rs")); 16 | -------------------------------------------------------------------------------- /sys/task-names/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hubris-task-names" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [build-dependencies] 7 | build-util = { path = "../../build/util" } 8 | 9 | [features] 10 | 11 | [lib] 12 | test = false 13 | doctest = false 14 | bench = false 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /sys/task-names/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Allows compile-time retrieval of task names in the current image. 6 | //! 7 | //! The code is generated, but here's what you can expect: 8 | //! 9 | //! `TASK_NAMES` is a `static` array of `&str`. 10 | //! 11 | //! `MAX_TASK_NAME` is a `const` `usize` giving the number of bytes in the 12 | //! longest task name. This can be useful for sizing buffers. 13 | 14 | #![no_std] 15 | #![forbid(clippy::wildcard_imports)] 16 | 17 | include!(concat!(env!("OUT_DIR"), "/tasks.rs")); 18 | -------------------------------------------------------------------------------- /sys/userlib/README.mkdn: -------------------------------------------------------------------------------- 1 | # Hubris user library for tasks 2 | 3 | This crate provides the Hubris system call interface and assorted utility code 4 | for use in task programs. 5 | 6 | ## Crate features 7 | 8 | - `panic-messages`: on `panic!`, attempt to record the panic message in unused 9 | stack space so the supervisor can extract it. This has an impact on both 10 | binary size and worst-case stack usage. Generally this feature should only be 11 | set in the top-level task, _not_ in libraries. 12 | 13 | -------------------------------------------------------------------------------- /task/attest-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | use std::error::Error; 6 | 7 | fn main() -> Result<(), Box> { 8 | idol::client::build_client_stub("../../idl/attest.idol", "client_stub.rs")?; 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /task/attest/src/config.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | use serde::Deserialize; 6 | 7 | #[derive(Deserialize, Default, Debug)] 8 | #[serde(rename_all = "kebab-case")] 9 | pub struct DataRegion { 10 | pub address: u32, 11 | pub size: u32, 12 | } 13 | -------------------------------------------------------------------------------- /task/caboose-reader/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/caboose.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /task/control-plane-agent-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/control-plane-agent.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /task/dump-agent-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters(idol::CounterSettings::default()) 8 | .build_client_stub("../../idl/dump-agent.idol", "client_stub.rs")?; 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /task/dump-agent/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | idol::Generator::new() 8 | .with_counters( 9 | idol::CounterSettings::default().with_server_counters(false), 10 | ) 11 | .build_server_support( 12 | "../../idl/dump-agent.idol", 13 | "server_stub.rs", 14 | idol::server::ServerStyle::InOrder, 15 | )?; 16 | 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /task/dumper-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/dumper.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/dumper/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters( 8 | idol::CounterSettings::default().with_server_counters(false), 9 | ) 10 | .build_server_support( 11 | "../../idl/dumper.idol", 12 | "server_stub.rs", 13 | idol::server::ServerStyle::InOrder, 14 | )?; 15 | 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /task/framulator/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-framulator" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | userlib = { path = "../../sys/userlib" } 8 | ringbuf = { path = "../../lib/ringbuf" } 9 | 10 | drv-mb85rsxx-fram = { path = "../../drv/mb85rsxx-fram" } 11 | drv-spi-api = { path = "../../drv/spi-api" } 12 | drv-stm32h7-spi-server = { path = "../../drv/stm32h7-spi-server" } 13 | 14 | [build-dependencies] 15 | build-util = { path = "../../build/util" } 16 | 17 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 18 | # since test builds don't work for cross compilation. 19 | [[bin]] 20 | name = "task-framulator" 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /task/framulator/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/gimlet-inspector/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/hiffy/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /task/host-sp-comms-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/host-sp-comms.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /task/host-sp-comms-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | //! Client API for the host / SP communications task. 6 | 7 | #![no_std] 8 | 9 | use derive_idol_err::IdolError; 10 | use userlib::*; 11 | 12 | pub use host_sp_messages::{HostStartupOptions, Status}; 13 | 14 | #[derive( 15 | Copy, Clone, Debug, FromPrimitive, Eq, PartialEq, IdolError, counters::Count, 16 | )] 17 | pub enum HostSpCommsError { 18 | InvalidStatus = 1, 19 | InvalidStartupOptions, 20 | 21 | #[idol(server_death)] 22 | ServerRestarted, 23 | } 24 | 25 | include!(concat!(env!("OUT_DIR"), "/client_stub.rs")); 26 | -------------------------------------------------------------------------------- /task/host-sp-comms/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /task/idle/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-idle" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | insomniac = [] 8 | 9 | [dependencies] 10 | # The idle task cannot panic, so we deliberately don't request panic-messages 11 | # to keep the binary tiny. 12 | userlib = { path = "../../sys/userlib" } 13 | cortex-m = { workspace = true } 14 | 15 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 16 | # since test builds don't work for cross compilation. 17 | [[bin]] 18 | name = "task-idle" 19 | test = false 20 | bench = false 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /task/jefe-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/jefe.idol", "client_stub.rs")?; 7 | 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /task/jefe/README.mkdn: -------------------------------------------------------------------------------- 1 | # El Jefe 2 | 3 | This is the supervisory task for the demo application, which handles last-ditch 4 | error reporting, task restarting, and the like. 5 | 6 | (*Jefe* is a Spanish word that is related to, and means roughly the same thing 7 | as, the English word *chief.*) 8 | -------------------------------------------------------------------------------- /task/monorail-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/monorail.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /task/monorail-server/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /task/net/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /task/nucleo-user-button/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | build_stm32xx_sys::build_gpio_irq_pins()?; 10 | 11 | Ok(()) 12 | } 13 | -------------------------------------------------------------------------------- /task/packrat-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/packrat.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /task/ping/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-ping" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | cortex-m = { workspace = true } 8 | userlib = { path = "../../sys/userlib", features = ["panic-messages"] } 9 | drv-user-leds-api = { path = "../../drv/user-leds-api" } 10 | 11 | [build-dependencies] 12 | build-util = { path = "../../build/util" } 13 | idol.workspace = true 14 | 15 | [features] 16 | uart = [] 17 | no-ipc-counters = ["idol/no-counters"] 18 | 19 | [[bin]] 20 | name = "task-ping" 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /task/ping/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_m_profile()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/pong/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-pong" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | panic-messages = ["userlib/panic-messages"] 8 | no-ipc-counters = ["idol/no-counters"] 9 | 10 | [dependencies] 11 | cortex-m = { workspace = true } 12 | 13 | drv-user-leds-api = { path = "../../drv/user-leds-api" } 14 | userlib = { path = "../../sys/userlib" } 15 | 16 | [build-dependencies] 17 | build-util = { path = "../../build/util" } 18 | idol.workspace = true 19 | 20 | [[bin]] 21 | name = "task-pong" 22 | test = false 23 | doctest = false 24 | bench = false 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /task/pong/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/power-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-power-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | 8 | 9 | [dependencies] 10 | hubpack.workspace = true 11 | num-traits.workspace = true 12 | pmbus.workspace = true 13 | serde.workspace = true 14 | serde-big-array.workspace = true 15 | static_assertions.workspace = true 16 | zerocopy.workspace = true 17 | zerocopy-derive.workspace = true 18 | 19 | counters = { path = "../../lib/counters" } 20 | drv-i2c-api.path = "../../drv/i2c-api" 21 | task-sensor-api.path = "../sensor-api" 22 | userlib.path = "../../sys/userlib" 23 | 24 | [build-dependencies] 25 | idol.workspace = true 26 | 27 | [lib] 28 | test = false 29 | doctest = false 30 | bench = false 31 | 32 | [lints] 33 | workspace = true 34 | -------------------------------------------------------------------------------- /task/power-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/power.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/power/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/power.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | build_i2c::codegen(build_i2c::Disposition::Sensors)?; 20 | 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /task/power/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /task/sensor-polling/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_i2c::codegen(build_i2c::Disposition::Sensors)?; 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /task/sensor/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | idol::Generator::new() 8 | .with_counters( 9 | idol::CounterSettings::default().with_server_counters(false), 10 | ) 11 | .build_server_support( 12 | "../../idl/sensor.idol", 13 | "server_stub.rs", 14 | idol::server::ServerStyle::InOrder, 15 | )?; 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /task/spd/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_util::build_notifications()?; 8 | 9 | let disposition = build_i2c::Disposition::Target; 10 | 11 | if let Err(e) = build_i2c::codegen(disposition) { 12 | println!("code generation failed: {}", e); 13 | std::process::exit(1); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /task/template/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-template" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | userlib = { path = "../../sys/userlib", features = ["panic-messages"] } 8 | 9 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 10 | # since test builds don't work for cross compilation. 11 | [[bin]] 12 | name = "task-template" 13 | test = false 14 | doctest = false 15 | bench = false 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /task/template/README.mkdn: -------------------------------------------------------------------------------- 1 | # Task Template 2 | 3 | Copy this directory to get started writing a new task. Don't forget to add your 4 | task to `workspace.members` in the root `Cargo.toml`! (If you forget, `cargo` 5 | will remind you.) 6 | -------------------------------------------------------------------------------- /task/template/src/main.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | #![no_std] 6 | #![no_main] 7 | 8 | // NOTE: you will probably want to remove this when you write your actual code; 9 | // we need to import userlib to get this to compile, but it throws a warning 10 | // because we're not actually using it yet! 11 | #[allow(unused_imports)] 12 | use userlib::*; 13 | 14 | #[export_name = "main"] 15 | fn main() -> ! { 16 | loop { 17 | // NOTE: you need to put code here before running this! Otherwise LLVM 18 | // will turn this into a single undefined instruction. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /task/thermal-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub( 7 | "../../idl/thermal.idol", 8 | "client_stub.rs", 9 | )?; 10 | Ok(()) 11 | } 12 | -------------------------------------------------------------------------------- /task/thermal/src/bsp.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | // This file should never be included; if it is, the build configuration is bad 6 | compile_error!("no BSP for the given target board"); 7 | -------------------------------------------------------------------------------- /task/uartecho/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/uartecho/src/README.mkdn: -------------------------------------------------------------------------------- 1 | # minicom config 2 | 3 | Using a Nucleo STM32H743, the following `minicom` config allows interaction with 4 | the `uartecho` task: 5 | 6 | ``` 7 | pu port /dev/ttyACM0 8 | pu baudrate 115200 9 | pu bits 8 10 | pu parity N 11 | pu stopbits 1 12 | ``` 13 | -------------------------------------------------------------------------------- /task/udpecho/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/udprpc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-udprpc" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | zerocopy = { workspace = true } 8 | zerocopy-derive = { workspace = true } 9 | 10 | task-net-api = { path = "../net-api" } 11 | userlib = { path = "../../sys/userlib", features = ["panic-messages"] } 12 | 13 | [build-dependencies] 14 | build-util = { path = "../../build/util" } 15 | idol.workspace = true 16 | 17 | [features] 18 | vlan = ["task-net-api/vlan"] 19 | no-ipc-counters = ["idol/no-counters"] 20 | 21 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 22 | # since test builds don't work for cross compilation. 23 | [[bin]] 24 | name = "task-udprpc" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /task/udprpc/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::build_notifications()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/validate/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_i2c::codegen(build_i2c::Disposition::Validation)?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/validate.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /task/vpd-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "task-vpd-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [features] 7 | 8 | 9 | [dependencies] 10 | counters = { path = "../../lib/counters" } 11 | derive-idol-err = { path = "../../lib/derive-idol-err" } 12 | drv-i2c-api = { path = "../../drv/i2c-api" } 13 | userlib = { path = "../../sys/userlib" } 14 | 15 | idol-runtime.workspace = true 16 | num-traits.workspace = true 17 | zerocopy.workspace = true 18 | zerocopy-derive.workspace = true 19 | 20 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 21 | # since test builds don't work for cross compilation. 22 | [lib] 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [build-dependencies] 28 | idol.workspace = true 29 | 30 | [lints] 31 | workspace = true 32 | -------------------------------------------------------------------------------- /task/vpd-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::client::build_client_stub("../../idl/vpd.idol", "client_stub.rs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /task/vpd/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 8 | 9 | idol::Generator::new() 10 | .with_counters( 11 | idol::CounterSettings::default().with_server_counters(false), 12 | ) 13 | .build_server_support( 14 | "../../idl/vpd.idol", 15 | "server_stub.rs", 16 | idol::server::ServerStyle::InOrder, 17 | )?; 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /test/test-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "test-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | userlib = { path = "../../sys/userlib" } 8 | num-traits = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | [build-dependencies] 13 | build-util = { path = "../../build/util" } 14 | 15 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 16 | # since test builds don't work for cross compilation. 17 | [lib] 18 | test = false 19 | doctest = false 20 | bench = false 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /test/test-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_m_profile()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /test/test-assist/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "test-assist" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | cortex-m = { workspace = true } 8 | num-traits = { workspace = true } 9 | zerocopy = { workspace = true } 10 | zerocopy-derive = { workspace = true } 11 | 12 | hubris-num-tasks = { path = "../../sys/num-tasks" } 13 | test-api = { path = "../test-api" } 14 | userlib = { path = "../../sys/userlib", features = ["panic-messages"] } 15 | 16 | [build-dependencies] 17 | build-util = { path = "../../build/util" } 18 | 19 | [features] 20 | 21 | [[bin]] 22 | name = "test-assist" 23 | test = false 24 | doctest = false 25 | bench = false 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /test/test-assist/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_m_profile()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /test/test-idol-api/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | idol::Generator::new() 7 | .with_counters(idol::CounterSettings::default()) 8 | .build_client_stub("api.idol", "client_stub.rs")?; 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /test/test-idol-server/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_target_board(); 7 | 8 | idol::Generator::new() 9 | .with_counters( 10 | idol::CounterSettings::default().with_server_counters(false), 11 | ) 12 | .build_server_support( 13 | "../test-idol-api/api.idol", 14 | "server_stub.rs", 15 | idol::server::ServerStyle::InOrder, 16 | )?; 17 | 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /test/test-runner/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_m_profile()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /test/test-suite/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() -> Result<(), Box> { 6 | build_util::expose_m_profile()?; 7 | 8 | #[cfg(feature = "i2c-devices")] 9 | build_i2c::codegen(build_i2c::Disposition::Devices)?; 10 | 11 | build_util::build_notifications()?; 12 | 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /test/tests-gemini-bu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-gemini-bu" 5 | version = "0.1.0" 6 | 7 | [features] 8 | h753 = ["stm32h7/stm32h753"] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt"] } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | [build-dependencies] 19 | build-util = { path = "../../build/util" } 20 | 21 | # this lets you use `cargo fix`! 22 | [[bin]] 23 | name = "tests-gemini-bu" 24 | path = "../../app/gemini-bu/src/main.rs" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /test/tests-gimletlet/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-gimletlet" 5 | version = "0.1.0" 6 | 7 | [features] 8 | h753 = ["stm32h7/stm32h753"] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | stm32h7 = { workspace = true, features = ["rt"] } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | [build-dependencies] 19 | build-util = { path = "../../build/util" } 20 | 21 | # this lets you use `cargo fix`! 22 | [[bin]] 23 | name = "tests-gimletlet" 24 | path = "../../app/gimletlet/src/main.rs" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /test/tests-lpc55xpresso/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-lpc55xpresso" 5 | version = "0.1.0" 6 | 7 | [features] 8 | plls = [] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | lpc55-pac = { workspace = true } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | # this lets you use `cargo fix`! 19 | [[bin]] 20 | name = "tests-lpc55xpresso" 21 | test = false 22 | doctest = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /test/tests-psc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | name = "tests-psc" 4 | version = "0.1.0" 5 | 6 | # this lets you use `cargo fix`! 7 | [[bin]] 8 | name = "tests-psc" 9 | path = "../../app/psc/src/main.rs" 10 | test = false 11 | doctest = false 12 | bench = false 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /test/tests-rot-carrier/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-rot-carrier" 5 | version = "0.1.0" 6 | 7 | [features] 8 | plls = [] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | lpc55-pac = { workspace = true } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | # this lets you use `cargo fix`! 19 | [[bin]] 20 | name = "tests-lpc55" 21 | path = "../../app/lpc55xpresso/src/main.rs" 22 | test = false 23 | doctest = false 24 | bench = false 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /test/tests-stm32fx/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-stm32f4" 5 | version = "0.1.0" 6 | 7 | [features] 8 | 9 | [dependencies] 10 | cortex-m = { workspace = true } 11 | cortex-m-rt = { workspace = true } 12 | stm32f3 = { workspace = true, optional = true, features = ["stm32f303", "rt"] } 13 | stm32f4 = { workspace = true, optional = true, features = ["stm32f407", "rt"] } 14 | 15 | kern = { path = "../../sys/kern" } 16 | 17 | # This section is here to discourage RLS/rust-analyzer from doing test builds, 18 | # since test builds don't work for cross compilation. 19 | [[bin]] 20 | name = "tests-stm32fx" 21 | path = "../../app/demo-stm32f4-discovery/src/main.rs" 22 | test = false 23 | bench = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /test/tests-stm32g0/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-stm32g0" 5 | version = "0.1.0" 6 | 7 | [features] 8 | g070 = ["stm32g0/stm32g070"] 9 | 10 | [dependencies] 11 | cfg-if = { workspace = true } 12 | cortex-m = { workspace = true } 13 | cortex-m-rt = { workspace = true } 14 | stm32g0 = { workspace = true } 15 | 16 | kern = { path = "../../sys/kern" } 17 | 18 | [build-dependencies] 19 | build-util = { path = "../../build/util" } 20 | 21 | # this lets you use `cargo fix`! 22 | [[bin]] 23 | name = "tests-stm32g0" 24 | path = "../../app/demo-stm32g0-nucleo/src/main.rs" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /test/tests-stm32g0/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | -------------------------------------------------------------------------------- /test/tests-stm32h7/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | edition = "2021" 3 | readme = "README.md" 4 | name = "tests-stm32h7" 5 | version = "0.1.0" 6 | 7 | [features] 8 | h743 = ["stm32h7/stm32h743"] 9 | h753 = ["stm32h7/stm32h753"] 10 | 11 | [dependencies] 12 | cfg-if = { workspace = true } 13 | cortex-m = { workspace = true } 14 | cortex-m-rt = { workspace = true } 15 | stm32h7 = { workspace = true, features = ["rt"] } 16 | 17 | kern = { path = "../../sys/kern" } 18 | 19 | [build-dependencies] 20 | build-util = { path = "../../build/util" } 21 | 22 | # this lets you use `cargo fix`! 23 | [[bin]] 24 | name = "tests-stm32h7" 25 | test = false 26 | doctest = false 27 | bench = false 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /test/tests-stm32h7/build.rs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the Mozilla Public 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this 3 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 4 | 5 | fn main() { 6 | build_util::expose_target_board(); 7 | } 8 | --------------------------------------------------------------------------------