diff --git a/README.md b/README.md index 221263d..1c29fde 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ There are several options for flashing Thermostat. DFU requires only a micro-USB ### dfu-util on Linux * Install the DFU USB tool (dfu-util). -* Convert firmware from ELF to BIN: `arm-none-eabi-objcopy -O binary thermostat thermostat.bin` (you can skip this step if using the BIN from Hydra) +* Convert firmware from ELF to BIN: `arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/thermostat thermostat.bin` (you can skip this step if using the BIN from Hydra) * Connect to the Micro USB connector to Thermostat below the RJ45. * Add jumper to Thermostat v2.0 across 2-pin jumper adjacent to JTAG connector. * Cycle board power to put it in DFU update mode diff --git a/flake.nix b/flake.nix index 803e774..d7329c7 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ }; }; - nativeBuildInputs = [ pkgs.llvm ]; + nativeBuildInputs = [ pkgs.gcc-arm-embedded ]; buildPhase = '' cargo build --release --bin thermostat @@ -49,7 +49,7 @@ mkdir -p $out $out/nix-support cp target/thumbv7em-none-eabihf/release/thermostat $out/thermostat.elf echo file binary-dist $out/thermostat.elf >> $out/nix-support/hydra-build-products - llvm-objcopy -O binary target/thumbv7em-none-eabihf/release/thermostat $out/thermostat.bin + arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/thermostat $out/thermostat.bin echo file binary-dist $out/thermostat.bin >> $out/nix-support/hydra-build-products ''; @@ -67,7 +67,8 @@ devShell.x86_64-linux = pkgs.mkShell { name = "thermostat-dev-shell"; buildInputs = with pkgs; [ - rust openocd dfu-util + rust gcc-arm-embedded + openocd dfu-util ] ++ (with python3Packages; [ numpy matplotlib ]);