diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3ff428c..bc41a83 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -29,4 +29,6 @@ jobs: - name: Load sources run: ./d download-all - name: Run build - run: cargo run --release --bin stm32-bindings-gen + run: cargo run --release --bin stm32-bindings-gen -- --target=thumbv8m.main-none-eabihf + - name: Run package build + run: cd build/stm32-bindings && cargo build --target=thumbv8m.main-none-eabihf diff --git a/d b/d index 9d19ef5..399f690 100644 --- a/d +++ b/d @@ -8,6 +8,9 @@ REV=8382ecbcc976ab5e91070b386700dbfd1e654275 shift case "$CMD" in + gen) + cargo run --release stm32-bindings-gen -- --target=thumbv8m.main-none-eabihf + ;; download-all) rm -rf ./sources/ git clone https://github.com/STMicroelectronics/STM32CubeWBA.git ./sources/ -q diff --git a/d.ps1 b/d.ps1 index 6bfb93e..03a300f 100644 --- a/d.ps1 +++ b/d.ps1 @@ -9,6 +9,9 @@ param ( $REV = "8382ecbcc976ab5e91070b386700dbfd1e654275" Switch ($CMD) { + "gen" { + cargo run --release stm32-bindings-gen -- --target=thumbv8m.main-none-eabihf + } "download-all" { rm -r -Force ./sources/ -ErrorAction SilentlyContinue git clone https://github.com/STMicroelectronics/STM32CubeWBA.git ./sources/ diff --git a/stm32-bindings-gen/res/Cargo.toml b/stm32-bindings-gen/res/Cargo.toml index 167536a..b2935df 100644 --- a/stm32-bindings-gen/res/Cargo.toml +++ b/stm32-bindings-gen/res/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "stm32-metapac" +name = "stm32-bindings" version = "18.0.0" edition = "2024" license = "MIT OR Apache-2.0" diff --git a/stm32-bindings-gen/res/build.rs b/stm32-bindings-gen/res/build.rs index b97aa27..7f8db90 100644 --- a/stm32-bindings-gen/res/build.rs +++ b/stm32-bindings-gen/res/build.rs @@ -6,7 +6,7 @@ fn main() { println!( "cargo:rustc-link-search=native={}", - crate_dir.join("src/lib").to_str().unwrap() + crate_dir.join("src").join("lib").to_str().unwrap() ); - println!("cargo:rustc-link-lib=static=wba_mac_lib"); + println!("cargo:rustc-link-lib=wba_mac_lib"); }