Use arm-none-eabi-objcopy instead of llvm-objcopy #95
@ -45,7 +45,7 @@ There are several options for flashing Thermostat. DFU requires only a micro-USB
|
|||||||
|
|
||||||
### dfu-util on Linux
|
### dfu-util on Linux
|
||||||
* Install the DFU USB tool (dfu-util).
|
* 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.
|
* 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.
|
* Add jumper to Thermostat v2.0 across 2-pin jumper adjacent to JTAG connector.
|
||||||
* Cycle board power to put it in DFU update mode
|
* Cycle board power to put it in DFU update mode
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.llvm ];
|
nativeBuildInputs = [ pkgs.gcc-arm-embedded ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cargo build --release --bin thermostat
|
cargo build --release --bin thermostat
|
||||||
@ -49,7 +49,7 @@
|
|||||||
mkdir -p $out $out/nix-support
|
mkdir -p $out $out/nix-support
|
||||||
cp target/thumbv7em-none-eabihf/release/thermostat $out/thermostat.elf
|
cp target/thumbv7em-none-eabihf/release/thermostat $out/thermostat.elf
|
||||||
echo file binary-dist $out/thermostat.elf >> $out/nix-support/hydra-build-products
|
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
|
echo file binary-dist $out/thermostat.bin >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -67,7 +67,8 @@
|
|||||||
devShell.x86_64-linux = pkgs.mkShell {
|
devShell.x86_64-linux = pkgs.mkShell {
|
||||||
name = "thermostat-dev-shell";
|
name = "thermostat-dev-shell";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
rust openocd dfu-util
|
rust gcc-arm-embedded
|
||||||
|
openocd dfu-util
|
||||||
] ++ (with python3Packages; [
|
] ++ (with python3Packages; [
|
||||||
numpy matplotlib
|
numpy matplotlib
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user