diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 88ef549..ff8d6dc 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -19,7 +19,7 @@ jobs: # dev-qemu is intentionally excluded from binsize benchmarks: it targets QEMU virt # and uses semihosting, so its ELF section layout doesn't represent real flash/RAM # footprint the way the SoC-backed platforms do. - platform: ["dev-imxrt", "dev-npcx"] + platform: ["dev-imxrt", "dev-npcx", "dev-mcxa"] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/cargo-vet.yml b/.github/workflows/cargo-vet.yml index 35453cb..62a08ba 100644 --- a/.github/workflows/cargo-vet.yml +++ b/.github/workflows/cargo-vet.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ["dev-imxrt", "dev-npcx", "dev-qemu"] + platform: ["dev-imxrt", "dev-npcx", "dev-qemu", "dev-mcxa"] env: CARGO_VET_VERSION: 0.10.2 steps: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 29b708b..b287740 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ["platform-common", "dev-imxrt", "dev-npcx", "dev-qemu"] + platform: ["platform-common", "dev-imxrt", "dev-npcx", "dev-qemu", "dev-mcxa"] steps: - uses: actions/checkout@v4 @@ -67,7 +67,7 @@ jobs: matrix: # Get early warning of new lints which are regularly introduced in beta channels. toolchain: [stable] - platform: ["platform-common", "dev-imxrt", "dev-npcx", "dev-qemu"] + platform: ["platform-common", "dev-imxrt", "dev-npcx", "dev-qemu", "dev-mcxa"] steps: - uses: actions/checkout@v4 @@ -117,6 +117,8 @@ jobs: target: thumbv7em-none-eabihf - platform: dev-qemu target: riscv32imac-unknown-none-elf + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf steps: - uses: actions/checkout@v4 @@ -151,6 +153,8 @@ jobs: target: thumbv7em-none-eabihf - platform: dev-qemu target: riscv32imac-unknown-none-elf + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf steps: - uses: actions/checkout@v4 @@ -180,7 +184,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ["dev-imxrt", "dev-npcx", "dev-qemu"] + platform: ["dev-imxrt", "dev-npcx", "dev-qemu", "dev-mcxa"] steps: - uses: actions/checkout@v4 @@ -205,7 +209,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ["dev-imxrt", "dev-npcx", "dev-qemu"] + platform: ["dev-imxrt", "dev-npcx", "dev-qemu", "dev-mcxa"] steps: - uses: actions/checkout@v4 @@ -237,6 +241,8 @@ jobs: target: thumbv7em-none-eabihf - platform: dev-qemu target: riscv32imac-unknown-none-elf + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf msrv: ["1.83"] # We're relying on namespaced-features, which # was released in 1.60 # @@ -290,6 +296,9 @@ jobs: - platform: dev-qemu target: riscv32imac-unknown-none-elf needs_flip_link: false + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf + needs_flip_link: true steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml index c549194..a0ae7bc 100644 --- a/.github/workflows/nostd.yml +++ b/.github/workflows/nostd.yml @@ -29,6 +29,8 @@ jobs: target: thumbv7em-none-eabihf - platform: dev-qemu target: riscv32imac-unknown-none-elf + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/rolling.yml b/.github/workflows/rolling.yml index 67dc7e3..9164420 100644 --- a/.github/workflows/rolling.yml +++ b/.github/workflows/rolling.yml @@ -25,6 +25,8 @@ jobs: target: thumbv7em-none-eabihf - platform: dev-qemu target: riscv32imac-unknown-none-elf + - platform: dev-mcxa + target: thumbv8m.main-none-eabihf steps: - uses: actions/checkout@v4 diff --git a/.vscode/settings.json b/.vscode/settings.json index 1a116e7..96a271b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,5 +22,6 @@ "platform/dev-imxrt/Cargo.toml", "platform/dev-npcx/Cargo.toml", "platform/dev-qemu/Cargo.toml", + "platform/dev-mcxa/Cargo.toml", ] } diff --git a/README.md b/README.md index 9b12108..c3c4798 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ integration testing, and as a starting point for downstream EC projects. ## Scope -This repository hosts the three public `dev-*` development targets and their +This repository hosts the four public `dev-*` development targets and their shared `platform-common` library. Vendor- and silicon-specific production platforms are maintained separately and are not in scope here. @@ -17,6 +17,7 @@ platforms are maintained separately and are not in scope here. |-------|------|--------| | `platform-common` | Shared `no_std` library crate — HAL traits, board abstractions, common services | (library, no build target) | | `dev-imxrt` | Development target on NXP i.MXRT685S (Cortex-M33) | `thumbv8m.main-none-eabihf` | +| `dev-mcxa` | Development target on NXP MCXA266 (Cortex-M33) | `thumbv8m.main-none-eabihf` | | `dev-npcx` | Development target on Nuvoton NPCX498M (Cortex-M4F) | `thumbv7em-none-eabihf` | | `dev-qemu` | Development target under QEMU `virt` machine (RISC-V 32-bit) | `riscv32imac-unknown-none-elf` | @@ -33,7 +34,7 @@ Toolchain channel and targets are pinned in `rust-toolchain.toml`: All three `dev-*` targets are installed automatically the first time `cargo` is invoked inside this repo; no manual `rustup target add` is required. -`dev-imxrt` and `dev-npcx` link via [`flip-link`](https://github.com/knurling-rs/flip-link) +`dev-imxrt`, `dev-mcxa`, and `dev-npcx` link via [`flip-link`](https://github.com/knurling-rs/flip-link) for stack-overflow protection. Install it once: ``` diff --git a/docs/supply-chain.md b/docs/supply-chain.md index 49d2570..b542db8 100644 --- a/docs/supply-chain.md +++ b/docs/supply-chain.md @@ -7,7 +7,7 @@ It matches all dependencies against a set of audits conducted by the authors of To learn more, visit [mozilla/cargo-vet](https://github.com/mozilla/cargo-vet) -This repository contains three independent platform crates (`platform/dev-imxrt`, `platform/dev-npcx`, `platform/dev-qemu`), each with its own `Cargo.lock` and its own `supply-chain/` store. Run all `cargo vet` commands from the relevant platform directory. +This repository contains platform crates (`platform/dev-imxrt`, `platform/dev-mcxa`, `platform/dev-npcx`, `platform/dev-qemu`), each with its own `Cargo.lock` and its own `supply-chain/` store. Run all `cargo vet` commands from the relevant platform directory. --- diff --git a/platform/dev-mcxa/.cargo/config.toml b/platform/dev-mcxa/.cargo/config.toml new file mode 100644 index 0000000..c2d2d53 --- /dev/null +++ b/platform/dev-mcxa/.cargo/config.toml @@ -0,0 +1,21 @@ +[target.thumbv8m.main-none-eabihf] +runner = 'probe-rs run --chip MCXA276 --preverify --verify --protocol swd --speed 12000' + +rustflags = [ + "-C", + "linker=flip-link", + "-C", + "link-arg=-Tlink.x", + "-C", + "link-arg=-Tdefmt.x", + # This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x + # See https://github.com/rust-embedded/cortex-m-quickstart/pull/95 + "-C", + "link-arg=--nmagic", +] + +[build] +target = "thumbv8m.main-none-eabihf" # Cortex-M33 + +[env] +DEFMT_LOG = "trace" diff --git a/platform/dev-mcxa/Cargo.lock b/platform/dev-mcxa/Cargo.lock new file mode 100644 index 0000000..ca348fd --- /dev/null +++ b/platform/dev-mcxa/Cargo.lock @@ -0,0 +1,1569 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "bare-metal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5deb64efa5bd81e31fcd1938615a6d98c82eafcbcd787162b6f63b91d6bac5b3" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "battery-service" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "battery-service-interface", + "defmt 0.3.100", + "embassy-futures", + "embassy-sync", + "embassy-time", + "embedded-batteries-async", + "embedded-services", + "odp-service-common", + "power-policy-interface", +] + +[[package]] +name = "battery-service-interface" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embedded-batteries-async", +] + +[[package]] +name = "battery-service-relay" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "battery-service-interface", + "defmt 0.3.100", + "embedded-services", + "num_enum", +] + +[[package]] +name = "bbqueue" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68917624e17aad88607cb5a5936f6da9b607c48c711e4e9ed101e7189aed28c2" +dependencies = [ + "const-init", + "critical-section", + "maitake-sync", +] + +[[package]] +name = "bit-register" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/odp-utilities#583015c08ad9855f310bdb25d5cf9abff77b5e08" +dependencies = [ + "num-traits", +] + +[[package]] +name = "bitfield" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" + +[[package]] +name = "bitfield" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0" + +[[package]] +name = "bitfield-struct" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8769c4854c5ada2852ddf6fd09d15cf43d4c2aaeccb4de6432f5402f08a6003b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "bq40z50-rx" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b6faf600295f12c3fb99b45266bc9140af5c344b08f2705bc06bfa0e8b549e" +dependencies = [ + "device-driver", + "embedded-batteries-async", + "embedded-hal 1.0.0", + "embedded-hal-async", + "smbus-pec", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.2.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "const-init" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd422bfb4f24a97243f60b6a4443e63d810c925d8da4bb2d8fde26a7c1d57ec" + +[[package]] +name = "convert_case" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cordyceps" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688d7fbb8092b8de775ef2536f36c8c31f2bc4006ece2e8d8ad2d17d00ce0a2a" +dependencies = [ + "loom", + "tracing", +] + +[[package]] +name = "cortex-m" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ec610d8f49840a5b376c69663b6369e71f4b34484b9b2eb29fb918d92516cb9" +dependencies = [ + "bare-metal", + "bitfield 0.13.2", + "critical-section", + "embedded-hal 0.2.7", + "volatile-register", +] + +[[package]] +name = "cortex-m-rt" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801d4dec46b34c299ccf6b036717ae0fce602faa4f4fe816d9013b9a7c9f5ba6" +dependencies = [ + "cortex-m-rt-macros", +] + +[[package]] +name = "cortex-m-rt-macros" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e37549a379a9e0e6e576fd208ee60394ccb8be963889eebba3ffe0980364f472" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "defmt" +version = "0.3.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0963443817029b2024136fc4dd07a5107eb8f977eaf18fcd1fdeb11306b64ad" +dependencies = [ + "defmt 1.0.1", +] + +[[package]] +name = "defmt" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "548d977b6da32fa1d1fda2876453da1e7df63ad0304c8b3dae4dbe7b96f39b78" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d4fc12a85bcf441cfe44344c4b72d58493178ce635338a3f3b78943aceb258e" +dependencies = [ + "defmt-parser", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror", +] + +[[package]] +name = "defmt-rtt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d5a25c99d89c40f5676bec8cefe0614f17f0f40e916f98e345dae941807f9e" +dependencies = [ + "critical-section", + "defmt 1.0.1", +] + +[[package]] +name = "dev-mcxa" +version = "0.1.0" +dependencies = [ + "cortex-m", + "cortex-m-rt", + "defmt 1.0.1", + "defmt-rtt", + "embassy-executor", + "embassy-mcxa", + "embedded-io 0.6.1", + "embedded-io-async 0.6.1", + "panic-probe", + "platform-common", + "static_cell", + "uart-service", +] + +[[package]] +name = "device-driver" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e4547bd66511372d2a38ac3c1b2892c7ebf83cf0d5411c3406e496c85a1d96" +dependencies = [ + "embedded-io 0.6.1", + "embedded-io-async 0.6.1", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "embassy-embedded-hal" +version = "0.6.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "embassy-futures", + "embassy-hal-internal", + "embassy-sync", + "embedded-hal 0.2.7", + "embedded-hal 1.0.0", + "embedded-hal-async", + "embedded-storage", + "embedded-storage-async", + "nb 1.1.0", +] + +[[package]] +name = "embassy-executor" +version = "0.10.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "cordyceps", + "cortex-m", + "critical-section", + "defmt 1.0.1", + "document-features", + "embassy-executor-macros", + "embassy-executor-timer-queue", +] + +[[package]] +name = "embassy-executor-macros" +version = "0.8.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "embassy-executor-timer-queue" +version = "0.1.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" + +[[package]] +name = "embassy-futures" +version = "0.1.2" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" + +[[package]] +name = "embassy-hal-internal" +version = "0.5.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "cortex-m", + "critical-section", + "num-traits", +] + +[[package]] +name = "embassy-mcxa" +version = "0.1.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "bbqueue", + "convert_case", + "cortex-m", + "cortex-m-rt", + "critical-section", + "defmt 1.0.1", + "embassy-embedded-hal", + "embassy-executor", + "embassy-futures", + "embassy-hal-internal", + "embassy-sync", + "embassy-time", + "embassy-time-driver", + "embassy-time-queue-utils", + "embedded-hal 0.2.7", + "embedded-hal 1.0.0", + "embedded-hal-async", + "embedded-hal-nb", + "embedded-io 0.7.1", + "embedded-io-async 0.7.0", + "embedded-storage", + "grounded", + "heapless 0.9.3", + "indexmap", + "maitake-sync", + "nb 1.1.0", + "nxp-pac", + "paste", + "proc-macro2", + "quote", + "rand_core 0.10.1", + "rand_core 0.6.4", + "rand_core 0.9.5", + "regex", + "syn", +] + +[[package]] +name = "embassy-sync" +version = "0.8.0" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "cfg-if", + "critical-section", + "defmt 1.0.1", + "embedded-io-async 0.7.0", + "futures-core", + "futures-sink", + "heapless 0.9.3", +] + +[[package]] +name = "embassy-time" +version = "0.5.1" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "cfg-if", + "critical-section", + "defmt 1.0.1", + "document-features", + "embassy-time-driver", + "embedded-hal 0.2.7", + "embedded-hal 1.0.0", + "embedded-hal-async", + "futures-core", +] + +[[package]] +name = "embassy-time-driver" +version = "0.2.2" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "document-features", +] + +[[package]] +name = "embassy-time-queue-utils" +version = "0.3.2" +source = "git+https://github.com/embassy-rs/embassy?rev=7af7d3d270f019ff70f919c62c78d51f28f2d50a#7af7d3d270f019ff70f919c62c78d51f28f2d50a" +dependencies = [ + "embassy-executor-timer-queue", + "heapless 0.9.3", +] + +[[package]] +name = "embedded-batteries" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f975432b4e146342a1589c563cffab6b7a692024cb511bf87b6bfe78c84125" +dependencies = [ + "bitfield-struct", + "bitflags 2.11.1", + "defmt 0.3.100", + "embedded-hal 1.0.0", + "zerocopy", +] + +[[package]] +name = "embedded-batteries-async" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3bf0e4be67770cfc31f1cea8b73baf98c0baf2c57d6bd8c3a4c315acb1d8bd4" +dependencies = [ + "bitfield-struct", + "defmt 0.3.100", + "embedded-batteries", + "embedded-hal 1.0.0", +] + +[[package]] +name = "embedded-crc-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1c75747a43b086df1a87fb2a889590bc0725e0abf54bba6d0c4bf7bd9e762c" + +[[package]] +name = "embedded-fans" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5007eb97aabfe3606c0b02823b3120e861c748ed3560756aa4fd231ef9ebf0" +dependencies = [ + "defmt 1.0.1", +] + +[[package]] +name = "embedded-fans-async" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafd19dc3b6aaa5027856818e19ccbfe84ebfb094c8a0ecf84a20e75c3b8e959" +dependencies = [ + "defmt 1.0.1", + "embedded-fans", +] + +[[package]] +name = "embedded-hal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" +dependencies = [ + "nb 0.1.3", + "void", +] + +[[package]] +name = "embedded-hal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" + +[[package]] +name = "embedded-hal-async" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4c685bbef7fe13c3c6dd4da26841ed3980ef33e841cddfa15ce8a8fb3f1884" +dependencies = [ + "embedded-hal 1.0.0", +] + +[[package]] +name = "embedded-hal-nb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal 1.0.0", + "nb 1.1.0", +] + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "embedded-io" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb1aa714776b75c7e67e1da744b81a129b3ff919c8712b5e1b32252c1f07cc7" + +[[package]] +name = "embedded-io-async" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff09972d4073aa8c299395be75161d582e7629cd663171d62af73c8d50dba3f" +dependencies = [ + "embedded-io 0.6.1", +] + +[[package]] +name = "embedded-io-async" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2564b9f813c544241430e147d8bc454815ef9ac998878d30cc3055449f7fd4c0" +dependencies = [ + "embedded-io 0.7.1", +] + +[[package]] +name = "embedded-mcu-hal" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02b992c2b871b7fc616e4539258d92ea8b085e2f09cc0ad2862aa4d0e185ad1" +dependencies = [ + "defmt 1.0.1", + "num_enum", +] + +[[package]] +name = "embedded-sensors-hal" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c703756bee31e7aaf55d8fb6dcf7337cfc231cfb4a3ad34b9df509846fd9001" +dependencies = [ + "defmt 1.0.1", + "paste", +] + +[[package]] +name = "embedded-sensors-hal-async" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c524a78b2804eca0d9ec05154e51d9af948b40cd0a6bbcc4d5832ff7e47b5b" +dependencies = [ + "defmt 1.0.1", + "embedded-sensors-hal", + "paste", +] + +[[package]] +name = "embedded-services" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "bitfield 0.17.0", + "cortex-m", + "critical-section", + "defmt 0.3.100", + "embassy-futures", + "embassy-sync", + "mctp-rs", + "paste", + "portable-atomic", + "serde", +] + +[[package]] +name = "embedded-storage" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21dea9854beb860f3062d10228ce9b976da520a73474aed3171ec276bc0c032" + +[[package]] +name = "embedded-storage-async" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1763775e2323b7d5f0aa6090657f5e21cfa02ede71f5dc40eead06d64dcd15cc" +dependencies = [ + "embedded-storage", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "espi-device" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/haf-ec-service#0d21aa34fd8691c6544533e6c72fe41824dc2fa8" +dependencies = [ + "bit-register", + "bitflags 2.11.1", + "num-traits", + "num_enum", + "static_assertions", + "subenum", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "generator" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows-link", + "windows-result", +] + +[[package]] +name = "grounded" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7c71ebd5d467418b46639b622912cd0338ce59766bd19130bffcbf9ac6df2c" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "maitake-sync" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d77c365d697828821727b9bc09e6bc3c518b8c63804e79e1be5a5ae091a7c5f" +dependencies = [ + "cordyceps", + "critical-section", + "loom", + "mutex-traits", + "mycelium-bitfield", + "pin-project", + "portable-atomic", + "tracing", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "mctp-rs" +version = "0.1.0" +source = "git+https://github.com/dymk/mctp-rs#3d941ba5205ca7781bf37e3dc7c5dfdc99a082d6" +dependencies = [ + "bit-register", + "defmt 0.3.100", + "embedded-batteries", + "espi-device", + "num_enum", + "smbus-pec", + "thiserror", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mutex-traits" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3929f2b5633d29cf7b6624992e5f3c1e9334f1193423e12d17be4faf678cde3f" + +[[package]] +name = "mycelium-bitfield" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e0cc5e2c585acbd15c5ce911dff71e1f4d5313f43345873311c4f5efd741cc" + +[[package]] +name = "nb" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" +dependencies = [ + "nb 1.1.0", +] + +[[package]] +name = "nb" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "nxp-pac" +version = "0.1.0" +source = "git+https://github.com/embassy-rs/nxp-pac.git?rev=de562468e3956108913453f7a049d5fe7758de0b#de562468e3956108913453f7a049d5fe7758de0b" +dependencies = [ + "cfg_aliases", + "cortex-m", + "cortex-m-rt", + "defmt 0.3.100", +] + +[[package]] +name = "odp-service-common" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "embedded-services", + "static_cell", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "panic-probe" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd402d00b0fb94c5aee000029204a46884b1262e0c443f166d86d2c0747e1a1a" +dependencies = [ + "cortex-m", + "defmt 1.0.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "platform-common" +version = "0.1.0" +dependencies = [ + "battery-service", + "battery-service-interface", + "battery-service-relay", + "bq40z50-rx", + "defmt 0.3.100", + "embassy-executor", + "embassy-futures", + "embassy-sync", + "embassy-time", + "embedded-batteries-async", + "embedded-fans-async", + "embedded-hal 1.0.0", + "embedded-hal-async", + "embedded-mcu-hal", + "embedded-sensors-hal-async", + "embedded-services", + "odp-service-common", + "static_cell", + "thermal-service", + "thermal-service-interface", + "thermal-service-relay", + "time-alarm-service", + "time-alarm-service-interface", + "time-alarm-service-relay", +] + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +dependencies = [ + "critical-section", +] + +[[package]] +name = "power-policy-interface" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "bitfield 0.17.0", + "defmt 0.3.100", + "embassy-sync", + "embedded-batteries-async", + "embedded-services", + "num_enum", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smbus-pec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0763a680cd5d72b28f7bfc8a054c117d8841380a6ad4f72f05bd2a34217d3e" +dependencies = [ + "embedded-crc-macros", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "static_cell" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0530892bb4fa575ee0da4b86f86c667132a94b74bb72160f58ee5a4afec74c23" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subenum" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee3fb942ed39f3971438fcc7e05e20717e599e14c5c7cb50edd0df2a44b274" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thermal-service" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embassy-futures", + "embassy-sync", + "embassy-time", + "embedded-fans-async", + "embedded-sensors-hal-async", + "embedded-services", + "heapless 0.8.0", + "odp-service-common", + "thermal-service-interface", +] + +[[package]] +name = "thermal-service-interface" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embassy-time", + "embedded-fans-async", + "embedded-sensors-hal-async", +] + +[[package]] +name = "thermal-service-relay" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embedded-services", + "num_enum", + "thermal-service-interface", + "uuid", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time-alarm-service" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embassy-futures", + "embassy-sync", + "embassy-time", + "embedded-mcu-hal", + "embedded-services", + "odp-service-common", + "time-alarm-service-interface", + "zerocopy", +] + +[[package]] +name = "time-alarm-service-interface" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "bitfield 0.17.0", + "defmt 0.3.100", + "embedded-mcu-hal", + "num_enum", + "zerocopy", +] + +[[package]] +name = "time-alarm-service-relay" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embedded-mcu-hal", + "embedded-services", + "num_enum", + "time-alarm-service-interface", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "uart-service" +version = "0.1.0" +source = "git+https://github.com/OpenDevicePartnership/embedded-services?branch=v0.2.0#e831384e6df04f2ed2e27398b8024ffbf8681a2a" +dependencies = [ + "defmt 0.3.100", + "embassy-sync", + "embedded-io-async 0.6.1", + "embedded-services", + "mctp-rs", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcell" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "volatile-register" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" +dependencies = [ + "vcell", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/platform/dev-mcxa/Cargo.toml b/platform/dev-mcxa/Cargo.toml new file mode 100644 index 0000000..a70340d --- /dev/null +++ b/platform/dev-mcxa/Cargo.toml @@ -0,0 +1,85 @@ +[package] +edition = "2024" +license = "MIT" +publish = false +name = "dev-mcxa" +version = "0.1.0" + +[[bin]] +bench = false +name = "dev-mcxa" +test = false + +[profile.release] +lto = true # better optimizations +codegen-units = 1 +debug = true +opt-level = "z" +panic = "abort" +incremental = false + +# Optimize dependencies for size but keep root crate unoptimized for better debuggability +[profile.dev.package."*"] +opt-level = "z" + +# Uncomment to turn off optimization for specific dependency (such as when debugging a service) +# [profile.dev.package.dependency-name] +# opt-level = 0 + +[lints.rust] +warnings = "deny" + +[lints.clippy] +correctness = "deny" +perf = "deny" +suspicious = "deny" +style = "deny" + +[dependencies] +cortex-m = { version = "0.7.7", features = [ + "inline-asm", + "critical-section-single-core", +] } +cortex-m-rt = { version = "0.7.3", features = ["set-sp", "set-vtor"] } +defmt = "1.0" +defmt-rtt = "1.0" +embassy-executor = { version = "0.10.0", default-features = false, features = [ + "platform-cortex-m", + "executor-thread", + "executor-interrupt", + "defmt", +] } +embassy-mcxa = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a", features = [ + "defmt", + "unstable-pac", + "mcxa2xx", +] } +uart-service = { git = "https://github.com/OpenDevicePartnership/embedded-services", branch = "v0.2.0", features = [ + "defmt", +] } +static_cell = "2.1.0" +platform-common = { path = "../platform-common", features = ["mock"] } +# uart-service (v0.2.0 branch) depends on embedded-io-async 0.6, but +# embassy-mcxa upstream uses 0.7. We bring in 0.6 explicitly so we can adapt +# the Lpuart driver to the older trait surface required by uart-service. +# TODO: once uart-service is updated to use embedded-io-async 0.7, remove this dependency. +embedded-io-async-6 = { version = "0.6", package = "embedded-io-async" } +embedded-io-6 = { version = "0.6", package = "embedded-io" } + +panic-probe = { version = "1.0.0", features = ["print-defmt"] } + +[package.metadata.cargo-machete] +ignored = ["cortex-m", "cortex-m-rt"] + +# embassy-mcxa pulls embassy-time-driver from the embassy-rs git repo, which +# uses `links = "embassy-time"`. Other crates in the dependency graph pull +# embassy-time/embassy-time-driver from crates.io, which would cause a duplicate +# `links` conflict. Force everyone to use the git versions. +[patch.crates-io] +embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-time-driver = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-time-queue-utils = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } +embassy-embedded-hal = { git = "https://github.com/embassy-rs/embassy", rev = "7af7d3d270f019ff70f919c62c78d51f28f2d50a" } diff --git a/platform/dev-mcxa/build.rs b/platform/dev-mcxa/build.rs new file mode 100644 index 0000000..555cdf6 --- /dev/null +++ b/platform/dev-mcxa/build.rs @@ -0,0 +1,21 @@ +use std::env; +use std::fs::File; +use std::io::Write; +use std::path::PathBuf; + +fn main() { + // Put `memory.x` in our output directory and ensure it's + // on the linker search path. + let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); + File::create(out.join("memory.x")) + .unwrap() + .write_all(include_bytes!("memory.x")) + .unwrap(); + println!("cargo:rustc-link-search={}", out.display()); + + // By default, Cargo will re-run a build script whenever + // any file in the project changes. By specifying `memory.x` + // here, we ensure the build script is only re-run when + // `memory.x` is changed. + println!("cargo:rerun-if-changed=memory.x"); +} diff --git a/platform/dev-mcxa/dev-mcxa.code-workspace b/platform/dev-mcxa/dev-mcxa.code-workspace new file mode 100644 index 0000000..331c67f --- /dev/null +++ b/platform/dev-mcxa/dev-mcxa.code-workspace @@ -0,0 +1,23 @@ +{ + "folders": [ + { + "path": "../.." + }, + { + "path": "." + } + ], + "settings": { + "rust-analyzer.checkOnSave": true, + "rust-analyzer.cargo.target": "thumbv8m.main-none-eabihf", + "rust-analyzer.linkedProjects": [ + "platform/dev-mcxa/Cargo.toml" + ], + "rust-analyzer.check.workspace": false, + "terminal.integrated.cwd": ".", + // + // Variables for launch.json customization + // (grayed out in UI, but can be used in launch.json) + "platform": "dev-mcxa", + }, +} \ No newline at end of file diff --git a/platform/dev-mcxa/memory.x b/platform/dev-mcxa/memory.x new file mode 100644 index 0000000..0ff2896 --- /dev/null +++ b/platform/dev-mcxa/memory.x @@ -0,0 +1,12 @@ +MEMORY +{ + FLASH : ORIGIN = 0x00000000, LENGTH = 1M + /* technically we should have 256KiB of RAM, but it would cause a fault on the device. + After digging into the official MCUExpresso examples, the linker script defines the + RAM region as starting from 0x2000_0000 with a length of 0x3_C000 (240K) + Based on our own testing, the first 0x3000 bytes in memory are wiped out when resetting + the chip. For testing purposes where we may want to run from RAM, this will corrupt that + region so start at 0x2000_3000. Length is 240KiB - 12KiB = 228KiB + */ + RAM : ORIGIN = 0x20003000, LENGTH = 228K +} diff --git a/platform/dev-mcxa/src/board.rs b/platform/dev-mcxa/src/board.rs new file mode 100644 index 0000000..c407062 --- /dev/null +++ b/platform/dev-mcxa/src/board.rs @@ -0,0 +1,45 @@ +use embassy_mcxa::{bind_interrupts, clocks::periph_helpers::LpuartClockSel, lpuart}; +use platform_common::board::BoardIo; +use static_cell::ConstStaticCell; + +bind_interrupts!(struct Irqs { + LPUART3 => lpuart::BbqInterruptHandler::; +}); + +const SIZE: usize = 4096; +static RX_BUF: ConstStaticCell<[u8; SIZE]> = ConstStaticCell::new([0u8; SIZE]); +static TX_BUF: ConstStaticCell<[u8; SIZE]> = ConstStaticCell::new([0u8; SIZE]); + +/// Board IO for the dev-mcxa platform. +/// +/// This minimal development board provides a UART interface +/// for ODP service communication. +pub struct Board { + /// UART for ODP service communication. + pub uart: lpuart::LpuartBbq, +} + +impl BoardIo for Board { + type Peripherals = embassy_mcxa::Peripherals; + + fn init(p: Self::Peripherals) -> Self { + let mut config = lpuart::BbqConfig::default(); + config.power = embassy_mcxa::clocks::PoweredClock::NormalEnabledDeepSleepDisabled; + config.source = LpuartClockSel::FroHfDiv; + + let tx_buf = TX_BUF.take(); + let rx_buf = RX_BUF.take(); + + // Create UART instance with DMA channels + let tx_dma = embassy_mcxa::dma::DmaChannel::new(p.DMA0_CH0); + let rx_dma = embassy_mcxa::dma::DmaChannel::new(p.DMA0_CH1); + + let parts = lpuart::BbqParts::new(p.LPUART3, Irqs, p.P4_5, tx_buf, tx_dma, p.P4_2, rx_buf, rx_dma) + .expect("failed to create BbqParts"); + + let lpuart = lpuart::LpuartBbq::new(parts, config, lpuart::BbqRxMode::Efficiency) + .expect("failed to initialize async LPUART"); + + Board { uart: lpuart } + } +} diff --git a/platform/dev-mcxa/src/clocks.rs b/platform/dev-mcxa/src/clocks.rs new file mode 100644 index 0000000..1fc0469 --- /dev/null +++ b/platform/dev-mcxa/src/clocks.rs @@ -0,0 +1,56 @@ +//! Clock configuration for the MCXA dev board. + +use embassy_mcxa::clocks::PoweredClock; +use embassy_mcxa::clocks::config::{ + ClocksConfig, CoreSleep, Div8, FircConfig, FircFreqSel, FlashSleep, MainClockConfig, MainClockSource, + VddDriveStrength, VddLevel, +}; + +/// Build the desired clock tree configuration for the board. +pub fn config() -> ClocksConfig { + let mut cfg = ClocksConfig::default(); + + // Enable 180MHz clock source + let mut fcfg = FircConfig::default(); + fcfg.frequency = FircFreqSel::Mhz180; + fcfg.power = PoweredClock::NormalEnabledDeepSleepDisabled; + fcfg.fro_hf_enabled = true; + fcfg.clk_hf_fundamental_enabled = false; + fcfg.fro_hf_div = Some(const { Div8::from_divisor(4).unwrap() }); + cfg.firc = Some(fcfg); + + // Enable 12M osc + cfg.sirc.fro_12m_enabled = true; + cfg.sirc.fro_lf_div = Some(Div8::no_div()); + cfg.sirc.power = PoweredClock::AlwaysEnabled; + + // Disable 16K osc + cfg.fro16k = None; + + // Disable external osc + cfg.sosc = None; + + // Disable PLL + cfg.spll = None; + + // Feed core from 180M osc + cfg.main_clock = MainClockConfig { + source: MainClockSource::FircHfRoot, + power: PoweredClock::NormalEnabledDeepSleepDisabled, + ahb_clk_div: Div8::no_div(), + }; + + // We don't sleep, set relatively high power + cfg.vdd_power.active_mode.level = VddLevel::OverDriveMode; + cfg.vdd_power.low_power_mode.level = VddLevel::MidDriveMode; + cfg.vdd_power.active_mode.drive = VddDriveStrength::Normal; + cfg.vdd_power.low_power_mode.drive = VddDriveStrength::Low { enable_bandgap: false }; + + // Set "never sleep" mode + cfg.vdd_power.core_sleep = CoreSleep::WfeUngated; + + // Set flash doze, allowing internal flash clocks to be gated on sleep + cfg.vdd_power.flash_sleep = FlashSleep::FlashDoze; + + cfg +} diff --git a/platform/dev-mcxa/src/main.rs b/platform/dev-mcxa/src/main.rs new file mode 100644 index 0000000..b77bf00 --- /dev/null +++ b/platform/dev-mcxa/src/main.rs @@ -0,0 +1,40 @@ +#![no_std] +#![no_main] + +mod board; +mod clocks; +mod uart_adapter; + +use board::Board; +use defmt::info; +use defmt_rtt as _; +use embassy_executor::Spawner; +use panic_probe as _; +use platform_common::board::BoardIo; +use platform_common::mock::MockOdpRelayHandler; +use static_cell::StaticCell; +use uart_adapter::UartAdapter; + +#[embassy_executor::task] +async fn uart_service(uart: UartAdapter, relay: MockOdpRelayHandler) { + info!("Starting uart service"); + static UART_SERVICE: StaticCell> = StaticCell::new(); + let uart_service = uart_service::Service::new(relay).unwrap(); + let uart_service = UART_SERVICE.init(uart_service); + + let Err(e) = uart_service::task::uart_service(uart_service, uart).await; + panic!("uart-service error: {:?}", e); +} + +#[embassy_executor::main] +async fn main(spawner: Spawner) { + let mut cfg = embassy_mcxa::config::Config::default(); + cfg.clock_cfg = clocks::config(); + let p = embassy_mcxa::init(cfg); + let board = Board::init(p); + + info!("Hello world from MCXA!"); + + let relay = platform_common::mock::init(spawner).await; + spawner.spawn(uart_service(UartAdapter(board.uart), relay).expect("Failed to spawn UART service task")); +} diff --git a/platform/dev-mcxa/src/uart_adapter.rs b/platform/dev-mcxa/src/uart_adapter.rs new file mode 100644 index 0000000..adca5c4 --- /dev/null +++ b/platform/dev-mcxa/src/uart_adapter.rs @@ -0,0 +1,44 @@ +//! Adapter wrapping [`embassy_mcxa::lpuart::Lpuart`] to expose the +//! `embedded-io-async` 0.6 trait surface required by the OpenDevicePartnership +//! `uart-service` crate. +//! +//! The upstream `embassy-mcxa` HAL implements `embedded-io-async` 0.7, while +//! `uart-service` still depends on the 0.6 traits. +//! +//! TODO: once uart-service is updated to use embedded-io-async 0.7, this can be removed. + +use embassy_mcxa::lpuart; + +/// Type-erased UART error suitable for the 0.6 `embedded-io` trait family. +#[derive(Debug, defmt::Format)] +pub struct UartError; + +impl embedded_io_6::Error for UartError { + fn kind(&self) -> embedded_io_6::ErrorKind { + embedded_io_6::ErrorKind::Other + } +} + +/// UART wrapper to bridge embedded-io-async v0.6 traits over an MCXA DMA LPUART. +pub struct UartAdapter(pub lpuart::LpuartBbq); + +impl embedded_io_6::ErrorType for UartAdapter { + type Error = UartError; +} + +impl embedded_io_async_6::Read for UartAdapter { + async fn read(&mut self, buf: &mut [u8]) -> Result { + self.0.read(buf).await.map_err(|_| UartError) + } +} + +impl embedded_io_async_6::Write for UartAdapter { + async fn write(&mut self, buf: &[u8]) -> Result { + self.0.write(buf).await.map_err(|_| UartError) + } + + async fn flush(&mut self) -> Result<(), Self::Error> { + self.0.flush().await; + Ok(()) + } +} diff --git a/platform/dev-mcxa/supply-chain/audits.toml b/platform/dev-mcxa/supply-chain/audits.toml new file mode 100644 index 0000000..2772ccb --- /dev/null +++ b/platform/dev-mcxa/supply-chain/audits.toml @@ -0,0 +1,4 @@ + +# cargo-vet audits file + +[audits] diff --git a/platform/dev-mcxa/supply-chain/config.toml b/platform/dev-mcxa/supply-chain/config.toml new file mode 100644 index 0000000..8ac9306 --- /dev/null +++ b/platform/dev-mcxa/supply-chain/config.toml @@ -0,0 +1,386 @@ + +# cargo-vet config file + +[cargo-vet] +version = "0.10" + +[imports.bytecode-alliance] +url = "https://raw.githubusercontent.com/bytecodealliance/wasmtime/main/supply-chain/audits.toml" + +[imports.google] +url = "https://raw.githubusercontent.com/google/rust-crate-audits/main/audits.toml" + +[imports.mozilla] +url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml" + +[imports.open-device-partnership] +url = "https://raw.githubusercontent.com/OpenDevicePartnership/embedded-services/main/supply-chain/audits.toml" + +[policy.embassy-embedded-hal] +audit-as-crates-io = true + +[policy.embassy-executor] +audit-as-crates-io = true + +[policy.embassy-executor-macros] +audit-as-crates-io = true + +[policy.embassy-executor-timer-queue] +audit-as-crates-io = true + +[policy.embassy-futures] +audit-as-crates-io = true + +[policy.embassy-hal-internal] +audit-as-crates-io = true + +[policy.embassy-mcxa] +audit-as-crates-io = true + +[policy.embassy-sync] +audit-as-crates-io = true + +[policy.embassy-time] +audit-as-crates-io = true + +[policy.embassy-time-driver] +audit-as-crates-io = true + +[policy.embassy-time-queue-utils] +audit-as-crates-io = true + +[[exemptions.aho-corasick]] +version = "1.1.4" +criteria = "safe-to-deploy" + +[[exemptions.bare-metal]] +version = "0.2.5" +criteria = "safe-to-deploy" + +[[exemptions.bbqueue]] +version = "0.7.0" +criteria = "safe-to-deploy" + +[[exemptions.bitfield]] +version = "0.13.2" +criteria = "safe-to-deploy" + +[[exemptions.bq40z50-rx]] +version = "0.8.1" +criteria = "safe-to-deploy" + +[[exemptions.cc]] +version = "1.2.61" +criteria = "safe-to-deploy" + +[[exemptions.cfg-if]] +version = "1.0.4" +criteria = "safe-to-deploy" + +[[exemptions.cfg_aliases]] +version = "0.2.1" +criteria = "safe-to-deploy" + +[[exemptions.convert_case]] +version = "0.11.0" +criteria = "safe-to-deploy" + +[[exemptions.cortex-m]] +version = "0.7.7" +criteria = "safe-to-deploy" + +[[exemptions.cortex-m-rt]] +version = "0.7.5" +criteria = "safe-to-deploy" + +[[exemptions.cortex-m-rt-macros]] +version = "0.7.5" +criteria = "safe-to-deploy" + +[[exemptions.critical-section]] +version = "1.2.0" +criteria = "safe-to-deploy" + +[[exemptions.darling]] +version = "0.20.11" +criteria = "safe-to-deploy" + +[[exemptions.darling_core]] +version = "0.20.11" +criteria = "safe-to-deploy" + +[[exemptions.darling_macro]] +version = "0.20.11" +criteria = "safe-to-deploy" + +[[exemptions.defmt]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.defmt-macros]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.defmt-parser]] +version = "1.0.0" +criteria = "safe-to-deploy" + +[[exemptions.defmt-rtt]] +version = "1.1.0" +criteria = "safe-to-deploy" + +[[exemptions.document-features]] +version = "0.2.12" +criteria = "safe-to-deploy" + +[[exemptions.embassy-embedded-hal]] +version = "0.6.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-executor]] +version = "0.10.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-executor-macros]] +version = "0.8.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-executor-timer-queue]] +version = "0.1.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-futures]] +version = "0.1.2@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-hal-internal]] +version = "0.5.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-mcxa]] +version = "0.1.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-sync]] +version = "0.8.0@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-time]] +version = "0.5.1@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-time-driver]] +version = "0.2.2@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embassy-time-queue-utils]] +version = "0.3.2@git:7af7d3d270f019ff70f919c62c78d51f28f2d50a" +criteria = "safe-to-deploy" + +[[exemptions.embedded-hal]] +version = "0.2.7" +criteria = "safe-to-deploy" + +[[exemptions.embedded-sensors-hal]] +version = "0.1.1" +criteria = "safe-to-deploy" + +[[exemptions.find-msvc-tools]] +version = "0.1.9" +criteria = "safe-to-deploy" + +[[exemptions.futures-core]] +version = "0.3.32" +criteria = "safe-to-deploy" + +[[exemptions.futures-sink]] +version = "0.3.32" +criteria = "safe-to-deploy" + +[[exemptions.generator]] +version = "0.8.8" +criteria = "safe-to-deploy" + +[[exemptions.grounded]] +version = "0.2.1" +criteria = "safe-to-deploy" + +[[exemptions.hashbrown]] +version = "0.17.0" +criteria = "safe-to-deploy" + +[[exemptions.heapless]] +version = "0.9.3" +criteria = "safe-to-deploy" + +[[exemptions.ident_case]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.indexmap]] +version = "2.14.0" +criteria = "safe-to-deploy" + +[[exemptions.libc]] +version = "0.2.186" +criteria = "safe-to-deploy" + +[[exemptions.litrs]] +version = "1.0.0" +criteria = "safe-to-deploy" + +[[exemptions.loom]] +version = "0.7.2" +criteria = "safe-to-deploy" + +[[exemptions.maitake-sync]] +version = "0.3.0" +criteria = "safe-to-deploy" + +[[exemptions.memchr]] +version = "2.8.0" +criteria = "safe-to-deploy" + +[[exemptions.once_cell]] +version = "1.21.4" +criteria = "safe-to-deploy" + +[[exemptions.panic-probe]] +version = "1.0.0" +criteria = "safe-to-deploy" + +[[exemptions.paste]] +version = "1.0.15" +criteria = "safe-to-deploy" + +[[exemptions.pin-project]] +version = "1.1.12" +criteria = "safe-to-deploy" + +[[exemptions.pin-project-internal]] +version = "1.1.12" +criteria = "safe-to-deploy" + +[[exemptions.pin-project-lite]] +version = "0.2.17" +criteria = "safe-to-deploy" + +[[exemptions.portable-atomic]] +version = "1.13.1" +criteria = "safe-to-deploy" + +[[exemptions.proc-macro2]] +version = "1.0.106" +criteria = "safe-to-deploy" + +[[exemptions.quote]] +version = "1.0.45" +criteria = "safe-to-deploy" + +[[exemptions.rand_core]] +version = "0.10.1" +criteria = "safe-to-deploy" + +[[exemptions.regex]] +version = "1.12.3" +criteria = "safe-to-deploy" + +[[exemptions.regex-automata]] +version = "0.4.14" +criteria = "safe-to-deploy" + +[[exemptions.regex-syntax]] +version = "0.8.10" +criteria = "safe-to-deploy" + +[[exemptions.rustc_version]] +version = "0.2.3" +criteria = "safe-to-deploy" + +[[exemptions.rustversion]] +version = "1.0.22" +criteria = "safe-to-deploy" + +[[exemptions.scoped-tls]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.semver]] +version = "0.9.0" +criteria = "safe-to-deploy" + +[[exemptions.semver-parser]] +version = "0.7.0" +criteria = "safe-to-deploy" + +[[exemptions.stable_deref_trait]] +version = "1.2.1" +criteria = "safe-to-deploy" + +[[exemptions.subenum]] +version = "1.2.0" +criteria = "safe-to-deploy" + +[[exemptions.syn]] +version = "2.0.117" +criteria = "safe-to-deploy" + +[[exemptions.thiserror]] +version = "2.0.18" +criteria = "safe-to-deploy" + +[[exemptions.thiserror-impl]] +version = "2.0.18" +criteria = "safe-to-deploy" + +[[exemptions.tracing]] +version = "0.1.44" +criteria = "safe-to-deploy" + +[[exemptions.tracing-attributes]] +version = "0.1.31" +criteria = "safe-to-deploy" + +[[exemptions.tracing-core]] +version = "0.1.36" +criteria = "safe-to-deploy" + +[[exemptions.tracing-subscriber]] +version = "0.3.23" +criteria = "safe-to-deploy" + +[[exemptions.unicode-ident]] +version = "1.0.24" +criteria = "safe-to-deploy" + +[[exemptions.unicode-segmentation]] +version = "1.13.2" +criteria = "safe-to-deploy" + +[[exemptions.vcell]] +version = "0.1.3" +criteria = "safe-to-deploy" + +[[exemptions.volatile-register]] +version = "0.2.2" +criteria = "safe-to-deploy" + +[[exemptions.windows-link]] +version = "0.2.1" +criteria = "safe-to-deploy" + +[[exemptions.windows-result]] +version = "0.4.1" +criteria = "safe-to-deploy" + +[[exemptions.windows-sys]] +version = "0.61.2" +criteria = "safe-to-deploy" + +[[exemptions.zerocopy]] +version = "0.8.48" +criteria = "safe-to-deploy" + +[[exemptions.zerocopy-derive]] +version = "0.8.48" +criteria = "safe-to-deploy" diff --git a/platform/dev-mcxa/supply-chain/imports.lock b/platform/dev-mcxa/supply-chain/imports.lock new file mode 100644 index 0000000..897e16e --- /dev/null +++ b/platform/dev-mcxa/supply-chain/imports.lock @@ -0,0 +1,658 @@ + +# cargo-vet imports lock + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Jamey Sharp " +criteria = "safe-to-deploy" +delta = "2.1.0 -> 2.2.1" +notes = """ +This version adds unsafe impls of traits from the bytemuck crate when built +with that library enabled, but I believe the impls satisfy the documented +safety requirements for bytemuck. The other changes are minor. +""" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.3.2 -> 2.3.3" +notes = """ +Nothing outside the realm of what one would expect from a bitflags generator, +all as expected. +""" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.4.1 -> 2.6.0" +notes = """ +Changes in how macros are invoked and various bits and pieces of macro-fu. +Otherwise no major changes and nothing dealing with `unsafe`. +""" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.7.0 -> 2.9.4" +notes = "Tweaks to the macro, nothing out of order." + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.10.0 -> 2.11.1" +notes = "Minor updates, nothing awry here." + +[[audits.bytecode-alliance.audits.embedded-io]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.4.0" +notes = "No `unsafe` code and only uses `std` in ways one would expect the crate to do so." + +[[audits.bytecode-alliance.audits.embedded-io]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.4.0 -> 0.6.1" +notes = "Major updates, but almost all safe code. Lots of pruning/deletions, nothing out of the ordrinary." + +[[audits.bytecode-alliance.audits.heck]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.4.1 -> 0.5.0" +notes = "Minor changes for a `no_std` upgrade but otherwise everything looks as expected." + +[[audits.bytecode-alliance.audits.matchers]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.0" + +[[audits.bytecode-alliance.audits.matchers]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.1.0 -> 0.2.0" +notes = "Some unsafe code, but not more than before. Nothing awry." + +[[audits.bytecode-alliance.audits.nu-ansi-term]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.46.0" +notes = "one use of unsafe to call windows specific api to get console handle." + +[[audits.bytecode-alliance.audits.nu-ansi-term]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.46.0 -> 0.50.1" +notes = "Lots of stylistic/rust-related changes, plus new features, but nothing out of the ordrinary." + +[[audits.bytecode-alliance.audits.nu-ansi-term]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.50.1 -> 0.50.3" +notes = "CI changes, Rust changes, nothing out of the ordinary." + +[[audits.bytecode-alliance.audits.num-traits]] +who = "Andrew Brown " +criteria = "safe-to-deploy" +version = "0.2.19" +notes = "As advertised: a numeric library. The only `unsafe` is from some float-to-int conversions, which seems expected." + +[[audits.bytecode-alliance.audits.sharded-slab]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.4" +notes = "I always really enjoy reading eliza's code, she left perfect comments at every use of unsafe." + +[[audits.bytecode-alliance.audits.shlex]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "1.1.0" +notes = "Only minor `unsafe` code blocks which look valid and otherwise does what it says on the tin." + +[[audits.bytecode-alliance.audits.smallvec]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "1.13.2 -> 1.14.0" +notes = "Minor new feature, nothing out of the ordinary." + +[[audits.bytecode-alliance.audits.static_assertions]] +who = "Andrew Brown " +criteria = "safe-to-deploy" +version = "1.1.0" +notes = "No dependencies and completely a compile-time crate as advertised. Uses `unsafe` in one module as a compile-time check only: `mem::transmute` and `ptr::write` are wrapped in an impossible-to-run closure." + +[[audits.bytecode-alliance.audits.thread_local]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "1.1.4" +notes = "uses unsafe to implement thread local storage of objects" + +[[audits.bytecode-alliance.audits.tracing-log]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.1.3" +notes = """ +This is a standard adapter between the `log` ecosystem and the `tracing` +ecosystem. There's one `unsafe` block in this crate and it's well-scoped. +""" + +[[audits.bytecode-alliance.audits.tracing-log]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.1.3 -> 0.2.0" +notes = "Nothing out of the ordinary, a typical major version update and nothing awry." + +[[audits.google.audits.autocfg]] +who = "Manish Goregaokar " +criteria = "safe-to-deploy" +version = "1.4.0" +notes = "Contains no unsafe" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.bitflags]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +version = "1.3.2" +notes = """ +Security review of earlier versions of the crate can be found at +(Google-internal, sorry): go/image-crate-chromium-security-review + +The crate exposes a function marked as `unsafe`, but doesn't use any +`unsafe` blocks (except for tests of the single `unsafe` function). I +think this justifies marking this crate as `ub-risk-1`. + +Additional review comments can be found at https://crrev.com/c/4723145/31 +""" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.byteorder]] +who = "danakj " +criteria = "safe-to-deploy" +version = "1.5.0" +notes = "Unsafe review in https://crrev.com/c/5838022" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.equivalent]] +who = "George Burgess IV " +criteria = "safe-to-deploy" +version = "1.0.1" +aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" + +[[audits.google.audits.equivalent]] +who = "Jonathan Hao " +criteria = "safe-to-deploy" +delta = "1.0.1 -> 1.0.2" +notes = "No changes to any .rs files or Rust code." +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.heck]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +version = "0.4.1" +notes = """ +Grepped for `-i cipher`, `-i crypto`, `'\bfs\b'``, `'\bnet\b'``, `'\bunsafe\b'`` +and there were no hits. + +`heck` (version `0.3.3`) has been added to Chromium in +https://source.chromium.org/chromium/chromium/src/+/28841c33c77833cc30b286f9ae24c97e7a8f4057 +""" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.lazy_static]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +version = "1.4.0" +notes = ''' +I grepped for \"crypt\", \"cipher\", \"fs\", \"net\" - there were no hits. + +There are two places where `unsafe` is used. Unsafe review notes can be found +in https://crrev.com/c/5347418. + +This crate has been added to Chromium in https://crrev.com/c/3321895. +''' +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.lazy_static]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +delta = "1.4.0 -> 1.5.0" +notes = "Unsafe review notes: https://crrev.com/c/5650836" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.log]] +who = "danakj " +criteria = "safe-to-deploy" +version = "0.4.22" +notes = """ +Unsafe review in https://docs.google.com/document/d/1IXQbD1GhTRqNHIGxq6yy7qHqxeO4CwN5noMFXnqyDIM/edit?usp=sharing + +Unsafety is generally very well-documented, with one exception, which we +describe in the review doc. +""" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.log]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +delta = "0.4.22 -> 0.4.25" +notes = "No impact on `unsafe` usage in `lib.rs`." +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.log]] +who = "Daniel Cheng " +criteria = "safe-to-deploy" +delta = "0.4.25 -> 0.4.26" +notes = "Only trivial code and documentation changes." +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.nb]] +who = "George Burgess IV " +criteria = "safe-to-deploy" +version = "1.0.0" +aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" + +[[audits.google.audits.nb]] +who = "George Burgess IV " +criteria = "safe-to-deploy" +delta = "1.0.0 -> 0.1.3" +aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" + +[[audits.google.audits.nb]] +who = "George Burgess IV " +criteria = "safe-to-deploy" +delta = "1.0.0 -> 1.1.0" +aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" + +[[audits.google.audits.rand_core]] +who = "Lukasz Anforowicz " +criteria = "safe-to-deploy" +version = "0.6.4" +notes = """ +For more detailed unsafe review notes please see https://crrev.com/c/6362797 +""" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.smallvec]] +who = "Manish Goregaokar " +criteria = "safe-to-deploy" +version = "1.13.2" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.strsim]] +who = "danakj@chromium.org" +criteria = "safe-to-deploy" +version = "0.10.0" +notes = """ +Reviewed in https://crrev.com/c/5171063 + +Previously reviewed during security review and the audit is grandparented in. +""" +aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" + +[[audits.mozilla.audits.bitflags]] +who = "Alex Franchuk " +criteria = "safe-to-deploy" +delta = "1.3.2 -> 2.0.2" +notes = "Removal of some unsafe code/methods. No changes to externals, just some refactoring (mostly internal)." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Nicolas Silva " +criteria = "safe-to-deploy" +delta = "2.0.2 -> 2.1.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Teodor Tanasoaia " +criteria = "safe-to-deploy" +delta = "2.2.1 -> 2.3.2" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "2.3.3 -> 2.4.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "2.4.0 -> 2.4.1" +notes = "Only allowing new clippy lints" +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = [ + "Teodor Tanasoaia ", + "Erich Gubler ", +] +criteria = "safe-to-deploy" +delta = "2.6.0 -> 2.7.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Benjamin VanderSloot " +criteria = "safe-to-deploy" +delta = "2.9.4 -> 2.10.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.fnv]] +who = "Bobby Holley " +criteria = "safe-to-deploy" +version = "1.0.7" +notes = "Simple hasher implementation with no unsafe code." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.log]] +who = "Erich Gubler " +criteria = "safe-to-deploy" +delta = "0.4.26 -> 0.4.29" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.proc-macro-error-attr2]] +who = "Kagami Sascha Rosylight " +criteria = "safe-to-deploy" +version = "2.0.0" +notes = "No unsafe block." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.proc-macro-error2]] +who = "Kagami Sascha Rosylight " +criteria = "safe-to-deploy" +version = "2.0.1" +notes = "No unsafe block with a lovely `#![forbid(unsafe_code)]`." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.serde_core]] +who = "Erich Gubler " +criteria = "safe-to-deploy" +delta = "1.0.226 -> 1.0.227" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.serde_core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "1.0.227 -> 1.0.228" +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.sharded-slab]] +who = "Mark Hammond " +criteria = "safe-to-deploy" +delta = "0.1.4 -> 0.1.7" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.shlex]] +who = "Max Inden " +criteria = "safe-to-deploy" +delta = "1.1.0 -> 1.3.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.smallvec]] +who = "Erich Gubler " +criteria = "safe-to-deploy" +delta = "1.14.0 -> 1.15.1" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.strsim]] +who = "Ben Dean-Kawamura " +criteria = "safe-to-deploy" +delta = "0.10.0 -> 0.11.1" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.void]] +who = "Bobby Holley " +criteria = "safe-to-deploy" +version = "1.0.2" +notes = "Very small crate, just hosts the Void type for easier cross-crate interfacing." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.open-device-partnership.audits.autocfg]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "1.4.0 -> 1.5.0" +notes = "No unsafe, no build.rs, no network access; delta adds edition-aware rustc probing and best-effort probe-file cleanup only. Assisted-by: copilot-cli:GPT-5.3-Codex cargo-vet" + +[[audits.open-device-partnership.audits.bitfield]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.13.2 -> 0.15.0" +notes = "Delta audit: BitRange/Bit traits split into read-only and mutable variants (BitRangeMut/BitMut); added mask constant generation; clippy fixes; MSRV bump. No unsafe, no build script, no proc macros, no powerful imports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.bitfield]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.15.0 -> 0.17.0" +notes = "Delta: adds bitwise op derives, constructor derives, arbitrary visibility. Pure declarative macros. No unsafe, no build script. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.bitfield-struct]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.10.1" +notes = "Proc-macro crate generating safe bitfield structs. No unsafe, no build script. Standard proc-macro deps only. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.bitfield-struct]] +who = "matteotullo " +criteria = "safe-to-deploy" +delta = "0.10.1 -> 0.12.1" +notes = "Adds hash and bitenum derives, mostly parsing and refactoring changes. No code execution nor writing to the filesystem." + +[[audits.open-device-partnership.audits.const-init]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.0.0" + +[[audits.open-device-partnership.audits.cordyceps]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.3.4" +notes = "Intrusive data structures crate (no_std). ~115 unsafe blocks, all necessary for intrusive linked list/queue/stack ops. Correct patterns: addr_of_mut, proper atomic orderings, Vyukov MPSC algorithm. No build script, no proc macros, no powerful imports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.defmt]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.3.100" +notes = "Compatibility shim: no_std crate that re-exports defmt 1.x items for 0.3 API compatibility. No unsafe code, no build script, no powerful imports, no logic - pure pub-use re-exports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.device-driver]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.0.7" +notes = "no_std device driver toolkit. Unsafe limited to ops.rs bitfield load/store using get_unchecked with documented invariants; fuzz-tested against bitvec. No build script, no proc macros, no filesystem/network/process access. Assisted-by: copilot-chat:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.device-driver]] +who = "Adam Sasine " +criteria = "safe-to-deploy" +delta = "1.0.7 -> 1.0.9" +notes = "Fixes compilation bugs for large registers but does not change invariants or testing strategy." + +[[audits.open-device-partnership.audits.embedded-batteries]] +who = "matteotullo " +criteria = "safe-to-deploy" +version = "0.3.4" +notes = "ODP crates are always trusted." + +[[audits.open-device-partnership.audits.embedded-batteries-async]] +who = "matteotullo " +criteria = "safe-to-deploy" +version = "0.3.4" +notes = "ODP crates are always trusted." + +[[audits.open-device-partnership.audits.embedded-crc-macros]] +who = "Matteo Tullo " +criteria = "safe-to-deploy" +version = "1.0.0" + +[[audits.open-device-partnership.audits.embedded-fans]] +who = "Kurtis Dinelle " +criteria = "safe-to-deploy" +version = "0.1.0" +notes = "ODP crates are always trusted." + +[[audits.open-device-partnership.audits.embedded-fans-async]] +who = "Kurtis Dinelle " +criteria = "safe-to-deploy" +version = "0.2.0" +notes = "ODP crates are always trusted." + +[[audits.open-device-partnership.audits.embedded-hal]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.2.7 -> 1.0.0" +notes = "Pure no_std trait crate. Complete API redesign for 1.0: removed nb-based traits, CAN module, all unsafe code. Only defines traits/enums/types for digital, I2C, SPI, PWM, delay. No build script, no proc macros, no powerful imports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-hal-async]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.0.0" +notes = "no_std async HAL trait definitions. No unsafe in library. Build script only runs rustc --version. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-hal-nb]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.0.0" +notes = "no_std trait-only crate. No unsafe, no build script, no proc macros, no powerful imports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-io]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.6.1 -> 0.7.1" +notes = "No unsafe, no build script, no I/O. Trait evolution: Error requires core::error::Error (MSRV 1.81), BufRead: Read, Seek gains seek_relative, new VecDeque impls, defmt bumped to v1. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-io-async]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.6.1" +notes = "No unsafe. Build script only detects nightly via rustc --version. Pure async trait definitions for embedded I/O. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-io-async]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.6.1 -> 0.7.0" +notes = "Delta 0.6.1->0.7.0: No unsafe. Build script removed (AFIT now stable). flush() made required, BufRead requires Read, new VecDeque impls. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-mcu-hal]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.2.0" +notes = "Trait-based MCU HAL with zero unsafe code. No build script or powerful imports. Pure trait design with optional chrono/defmt features. Ideal for embedded controllers." + +[[audits.open-device-partnership.audits.embedded-sensors-hal-async]] +who = "Kurtis Dinelle " +criteria = "safe-to-deploy" +version = "0.3.0" +notes = "ODP crates are always trusted." + +[[audits.open-device-partnership.audits.embedded-storage]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.3.1" +notes = "Pure no_std storage abstraction traits. deny(unsafe_code), no build script, no dependencies, no powerful imports. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.embedded-storage-async]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.4.1" +notes = "Pure no_std async trait definitions for NOR flash storage. No unsafe code, no build script, no powerful imports. Only dependency is embedded-storage. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.hash32]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.3.1" +notes = "no_std 32-bit hashing (FNV, MurmurHash3). ~10 unsafe blocks in murmur3.rs for MaybeUninit buffer handling - all sound. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.heapless]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.8.0" +notes = "no_std fixed-capacity data structures. Extensive unsafe for MaybeUninit buffer management, lock-free queues (Vyukov MPMC, SPSC), and Treiber stack memory pools with ABA prevention. Patterns mirror std or published algorithms. Build script probes for atomic/LLSC support. Assisted-by: copilot-cli:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.mutex-traits]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.0.1" + +[[audits.open-device-partnership.audits.mycelium-bitfield]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.1.5" +notes = "Pure safe no_std bitfield macro crate. No unsafe code, no build script, no proc macros, no dependencies, no powerful imports. Only core:: types used. Assisted-by: copilot-chat:claude-opus-4.6 cargo-vet" + +[[audits.open-device-partnership.audits.num_enum]] +who = "Matteo Tullo " +criteria = "safe-to-deploy" +version = "0.7.4" + +[[audits.open-device-partnership.audits.num_enum]] +who = "Billy Price " +criteria = "safe-to-deploy" +delta = "0.7.4 -> 0.7.5" +notes = "Looks like this is just uptaking a new version of num_enum_derive" + +[[audits.open-device-partnership.audits.num_enum]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.7.5 -> 0.7.6" +notes = "Version bump with test infrastructure updates. No unsafe code, no build script, no powerful imports. Purely additive test changes." + +[[audits.open-device-partnership.audits.num_enum_derive]] +who = "Matteo Tullo " +criteria = "safe-to-deploy" +version = "0.7.4" + +[[audits.open-device-partnership.audits.num_enum_derive]] +who = "Billy Price " +criteria = "safe-to-deploy" +delta = "0.7.4 -> 0.7.5" +notes = "Looks like mostly improvements to error messaging" + +[[audits.open-device-partnership.audits.num_enum_derive]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "0.7.5 -> 0.7.6" +notes = "Minor update adding byte literal support for enum discriminants. No unsafe code, no build script, no powerful imports." + +[[audits.open-device-partnership.audits.rand_core]] +who = "Billy Price " +criteria = "safe-to-deploy" +delta = "0.6.4 -> 0.9.5" + +[[audits.open-device-partnership.audits.serde]] +who = "Robert Zieba " +criteria = "safe-to-deploy" +version = "1.0.228" +notes = "Changes are mostly a reorganization of the internal module structure" + +[[audits.open-device-partnership.audits.serde_core]] +who = "Robert Zieba " +criteria = "safe-to-deploy" +version = "1.0.226" + +[[audits.open-device-partnership.audits.serde_derive]] +who = "Robert Zieba " +criteria = "safe-to-deploy" +version = "1.0.228" +notes = "Diff is clean-up in proc macros" + +[[audits.open-device-partnership.audits.smbus-pec]] +who = "Matteo Tullo " +criteria = "safe-to-deploy" +version = "1.0.1" + +[[audits.open-device-partnership.audits.static_cell]] +who = "Robert Zieba " +criteria = "safe-to-deploy" +version = "2.1.1" + +[[audits.open-device-partnership.audits.thread_local]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +delta = "1.1.4 -> 1.1.9" +notes = "No build script, no FS/net/process capability expansion; unsafe refactor to lock-free insertion and nightly TLS path appears sound on review. Assisted-by: copilot-cli:GPT-5.3-Codex cargo-vet" + +[[audits.open-device-partnership.audits.uuid]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "1.17.0" + +[[audits.open-device-partnership.audits.valuable]] +who = "Jerry Xie " +criteria = "safe-to-deploy" +version = "0.1.1" +notes = "No unsafe code; build.rs only sets target atomic cfg via env; no fs/net/process capability use observed; behavior matches value-inspection purpose. Assisted-by: copilot-cli:GPT-5.3-Codex cargo-vet" diff --git a/scripts/check-all.sh b/scripts/check-all.sh index 7ac0d85..baf3e68 100755 --- a/scripts/check-all.sh +++ b/scripts/check-all.sh @@ -26,15 +26,15 @@ set -euo pipefail REPO_ROOT=$(git rev-parse --show-toplevel) cd "$REPO_ROOT" -PLATFORMS=(dev-imxrt dev-npcx dev-qemu) -FMT_CRATES=(platform-common dev-imxrt dev-npcx dev-qemu) +PLATFORMS=(dev-imxrt dev-mcxa dev-npcx dev-qemu) +FMT_CRATES=(platform-common dev-imxrt dev-mcxa dev-npcx dev-qemu) banner() { printf '\n=== %s ===\n' "$*"; } have() { command -v "$1" >/dev/null 2>&1; } if ! have flip-link; then - echo "warning: flip-link not installed — dev-imxrt / dev-npcx builds will fail." >&2 + echo "warning: flip-link not installed — dev-imxrt / dev-mcxa / dev-npcx builds will fail." >&2 echo " Install with: cargo install flip-link --locked" >&2 fi