mcu: temporarily roll back Stabilizer to pre-MQTT, & generate all variants #59
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "harry/nix-scripts:fix-mcu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR will temporarily roll back Stabilizer to the last master commit before it is switched to MQTT (with DHCP for addressing the client but not the broker), as well as enable generation of all the available variants of the repo, namely
dual-iir
,lockin-external
,lockin-internal
, and a Pounder v1.1 version per item.Here, the temporary fix uses a branch on my own Stabilizer fork (https://github.com/HarryMakes/stabilizer/tree/pre-mqtt), which reverts the cargosha256.nix file back to original and updates the hash. This change was made hand-in-hand with this PR, where the name of the Cargo vendor directory can now be independent of the variant, and is now the same per firmware repo (i.e.
stabilizer
for all Stabilizer variants). ThecargoSha256
checksum is still dependent on the directory name because it is calculated from the tarball archiving the directory.This branch on my fork also fixes some Git entries on Cargo.toml and Cargo.lock which would have prevented
cargo vendor
from correctly fetching the dependencies. Mainly, either the problematic entries specifiedbranch
rather thanrev
, or they pointed to detached HEADs on the GitHub server.In addition,
buildStm32Firmware
now accepts an optionaldoCheck
since firmware usually does not run any test withstd
. It istrue
by default, and is set tofalse
on Stabilizer variants. See the NixOS manual for reference: https://nixos.org/manual/nixpkgs/stable/#cross-compilation. It appears that Thermostat runs a number of#[test]
that might not be exclusive to the STM32 platforms, but in itscheckPhase
Cargo runs the tests on the build platform (x86_64-unknown-linux-gnu) rather than host/target, as indicated by the nix-build output: (maybe the Mozilla overlay doesn't take care ofstdenv.targetPlatform
?)To build various binaries for the same firmware, this PR introduces a simple function using lib attribute mapping capabilities. As this is my first time contributing such code, I will highly appreciate any feedbacks.
44ac0a985d
toa00537688c