Use arm-none-eabi-objcopy instead of llvm-objcopy #95

Open
atse wants to merge 1 commits from atse/thermostat:workaround-llvm-bug into master
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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
]);