1
0
Fork 0

mcu-contrib: update rust, use cargopatches, fix stabilizer-lockin

This commit is contained in:
mwojcik 2024-06-06 11:23:44 +08:00 committed by sb10q
parent e1ff78e578
commit 71c1b297b3
3 changed files with 48 additions and 33 deletions

View File

@ -8,8 +8,8 @@ let
"thumbv7em-none-eabihf"
];
rustManifest = pkgs.fetchurl {
url = "https://static.rust-lang.org/dist/2022-11-03/channel-rust-stable.toml";
sha256 = "sha256-DzNEaW724O8/B8844tt5AVHmSjSQ3cmzlU4BP90oRlY=";
url = "https://static.rust-lang.org/dist/2023-12-07/channel-rust-stable.toml";
sha256 = "sha256-PjvuouwTsYfNKW5Vi5Ye7y+lL7SsWGBxCtBOOm2z14c=";
};
rustChannelOfTargets = _channel: _date: targets:
(pkgs.lib.rustLib.fromManifestFile rustManifest {
@ -24,12 +24,12 @@ let
cargo = rust;
});
buildStm32Firmware = { name, src, cargoDepsName ? name, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", doCheck ? true, binaryName ? name, extraCargoBuildArgs ? "", outputHashes ? {} }:
buildStm32Firmware = { name, src, cargoDepsName ? name, cargoPatches ? [], patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", doCheck ? true, binaryName ? name, extraCargoBuildArgs ? "", outputHashes ? {} }:
rustPlatform.buildRustPackage rec {
inherit name cargoDepsName;
version = "0.0.0";
inherit src;
inherit src cargoPatches;
cargoLock = { lockFile = "${src}/Cargo.lock"; inherit outputHashes; };
@ -66,6 +66,9 @@ in
patchPhase = ''
patch -p1 < ${./pounder-725.diff}
'';
cargoPatches = [
./pounder-cargo-patch.diff
];
doCheck = false;
} // value))) {
dual-iir = {};

View File

@ -1,31 +1,3 @@
diff --git a/Cargo.lock b/Cargo.lock
index 7c796acf..cee5ba60 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -983,9 +983,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.203"
+version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
+checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
dependencies = [
"serde_derive",
]
@@ -1003,9 +1003,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.203"
+version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
+checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [
"proc-macro2",
"quote",
diff --git a/ad9959/src/lib.rs b/ad9959/src/lib.rs
index 025f7d4f..59578cce 100644
--- a/ad9959/src/lib.rs
@ -399,6 +371,18 @@ index a4a04be8..83dcdefb 100644
))
});
diff --git a/src/bin/lockin.rs b/src/bin/lockin.rs
index e0cfb58f..c9b26831 100644
--- a/src/bin/lockin.rs
+++ b/src/bin/lockin.rs
@@ -551,6 +551,7 @@ mod app {
gains[0],
gains[1],
c.local.cpu_temp_sensor.get_temperature().unwrap(),
+ None,
))
});
diff --git a/src/hardware/pounder/attenuators.rs b/src/hardware/pounder/attenuators.rs
index cfd08b7f..2570f506 100644
--- a/src/hardware/pounder/attenuators.rs

View File

@ -0,0 +1,28 @@
diff --git a/Cargo.lock b/Cargo.lock
index 7c796acf..cee5ba60 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -983,9 +983,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.203"
+version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
+checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
dependencies = [
"serde_derive",
]
@@ -1003,9 +1003,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.203"
+version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
+checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [
"proc-macro2",
"quote",