various improvements and fixes, justfile
Some checks failed
shared-hal-ci / Check build (push) Has been cancelled
shared-hal-ci / Check formatting (push) Has been cancelled
shared-hal-ci / Check Documentation Build (push) Has been cancelled
shared-hal-ci / Clippy (push) Has been cancelled
va108xx-ci / Check build (push) Has been cancelled
va108xx-ci / Run Tests (push) Has been cancelled
va108xx-ci / Check formatting (push) Has been cancelled
va108xx-ci / Check Documentation Build (push) Has been cancelled
va108xx-ci / Clippy (push) Has been cancelled
va416xx-ci / Check build (push) Has been cancelled
va416xx-ci / Run Tests (push) Has been cancelled
va416xx-ci / Check formatting (push) Has been cancelled
va416xx-ci / Check Documentation Build (push) Has been cancelled
va416xx-ci / Clippy (push) Has been cancelled

This commit is contained in:
Robin Mueller
2025-10-28 22:06:49 +01:00
parent d413f01d91
commit cdf5b2a07e
14 changed files with 101 additions and 3 deletions

View File

@@ -18,6 +18,16 @@ jobs:
- run: cargo check -p va108xx --target thumbv6m-none-eabi --all-features
- run: cargo check -p va108xx-hal --target thumbv6m-none-eabi --features "defmt"
build:
name: Check build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "thumbv6m-none-eabi"
- run: cargo build --target thumbv6m-none-eabi
test:
name: Run Tests
runs-on: ubuntu-latest

View File

@@ -18,6 +18,16 @@ jobs:
- run: cargo check -p va416xx --target thumbv7em-none-eabihf --all-features
- run: cargo check -p va416xx-hal --target thumbv7em-none-eabihf --features "defmt va41630"
build:
name: Check build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "thumbv7em-none-eabihf"
- run: cargo build --target thumbv7em-none-eabihf
test:
name: Run Tests
runs-on: ubuntu-latest

70
justfile Normal file
View File

@@ -0,0 +1,70 @@
all: check-all \
build-all \
fmt-all \
clippy-all \
docs-all
check-all: check-va108xx check-va416xx
build-all: build-va108xx build-va416xx
fmt-all: fmt-va108xx fmt-va416xx
clippy-all: clippy-va108xx clippy-va416xx
docs-all: docs-va108xx docs-va416xx
clean-all: clean-va108xx clean-va416xx
[working-directory: 'va108xx']
check-va108xx:
cargo check --target thumbv6m-none-eabi
cargo check --target thumbv6m-none-eabi --examples
cargo check -p va108xx --target thumbv6m-none-eabi --all-features
cargo check -p va108xx-hal --target thumbv6m-none-eabi --features "defmt"
[working-directory: 'va416xx']
check-va416xx:
cargo check --target thumbv7em-none-eabihf
cargo check --target thumbv7em-none-eabihf --examples
cargo check -p va416xx --target thumbv7em-none-eabihf --all-features
cargo check -p va416xx-hal --target thumbv7em-none-eabihf --features "defmt va41630"
[working-directory: 'va108xx']
build-va108xx:
cargo build --target thumbv6m-none-eabi
[working-directory: 'va416xx']
build-va416xx:
cargo build --target thumbv7em-none-eabihf
[working-directory: 'va108xx']
fmt-va108xx:
cargo fmt --all -- --check
[working-directory: 'va416xx']
fmt-va416xx:
cargo fmt --all -- --check
[working-directory: 'va108xx']
clippy-va108xx:
cargo clippy --target thumbv6m-none-eabi -- -D warnings
[working-directory: 'va416xx']
clippy-va416xx:
cargo clippy --target thumbv7em-none-eabihf -- -D warnings
[working-directory: 'va108xx']
docs-va108xx:
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx --all-features
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va108xx-hal --all-features
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-reb1
[working-directory: 'va416xx']
docs-va416xx:
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features va41630
RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx
[working-directory: 'va108xx']
clean-va108xx:
cargo clean
[working-directory: 'va416xx']
clean-va416xx:
cargo clean

View File

@@ -64,7 +64,7 @@ const APP_B_CRC_ADDR: u32 = APP_B_END_ADDR - 4;
pub const APP_B_END_ADDR: u32 = NVM_SIZE - 8;
pub const APP_IMG_SZ: u32 = (APP_B_END_ADDR - APP_A_START_ADDR) / 2;
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR) % 2 == 0);
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR).is_multiple_of(2));
pub const VECTOR_TABLE_OFFSET: u32 = 0x0;
pub const VECTOR_TABLE_LEN: u32 = 0xC0;

View File

@@ -24,4 +24,5 @@ irq-oc29-oc30 = ["irqs-in-lib"]
irq-oc30-oc31 = ["irqs-in-lib"]
[package.metadata.docs.rs]
targets = ["thumbv6m-none-eabi"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -30,6 +30,7 @@ defmt = ["dep:defmt", "vorago-shared-hal/defmt"]
[package.metadata.docs.rs]
all-features = true
targets = ["thumbv6m-none-eabi"]
rustdoc-args = ["--generate-link-to-definition"]
[package.metadata.cargo-machete]

View File

@@ -27,4 +27,5 @@ debug = []
[package.metadata.docs.rs]
all-features = true
targets = ["thumbv6m-none-eabi"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -2,7 +2,7 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[doc = r"Number available in the NVIC for configuring priority"]
pub const NVIC_PRIO_BITS: u8 = 2;
#[cfg(feature = "rt")]

View File

@@ -34,4 +34,5 @@ dummy-pin = "1"
[package.metadata.docs.rs]
all-features = true
targets = ["thumbv6m-none-eabi"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -64,7 +64,7 @@ pub const APP_B_END_ADDR: u32 = NVM_SIZE;
pub const APP_IMG_SZ: u32 = APP_B_END_ADDR - APP_A_START_ADDR / 2;
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR) % 2 == 0);
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR).is_multiple_of(2));
pub const VECTOR_TABLE_OFFSET: u32 = 0x0;
pub const VECTOR_TABLE_LEN: u32 = 0x350;

View File

@@ -28,4 +28,5 @@ irq-tim22-tim23 = ["_irqs-in-lib"]
_irqs-in-lib = []
[package.metadata.docs.rs]
targets = ["thumbv7em-none-eabihf"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -48,4 +48,5 @@ revb = []
[package.metadata.docs.rs]
features = ["va41630", "defmt"]
targets = ["thumbv7em-none-eabihf"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -30,4 +30,5 @@ debug = []
[package.metadata.docs.rs]
all-features = true
targets = ["thumbv7em-none-eabihf"]
rustdoc-args = ["--generate-link-to-definition"]

View File

@@ -18,4 +18,5 @@ lis2dh12 = { version = "0.7", features = ["out_f32"] }
[package.metadata.docs.rs]
all-features = true
targets = ["thumbv7em-none-eabihf"]
rustdoc-args = ["--generate-link-to-definition"]