Commit c12f426a authored by Astro's avatar Astro
Browse files

shell.nix: add cargo-card10

parent 094d43a0
#!/usr/bin/env bash
set -e
cargo build --release
arm-none-eabihf-objcopy -O binary target/thumbv7em-none-eabihf/release/$2 card10.bin
python c/bootloader/crc_patch.py card10.bin
echo "Copy this file to the device in USB Mass Storage mode:"
ls -l card10.bin
......@@ -31,5 +31,5 @@ let
'';
};
in {
inherit openocd rust rustPlatform firmware;
inherit openocd rust rustPlatform py-crc16 firmware;
}
......@@ -9,6 +9,7 @@ stdenv.mkDerivation {
gdb
rust
pkgsCross.armhf-embedded.stdenv.cc
py-crc16
];
# Set Environment Variables
......@@ -21,6 +22,7 @@ stdenv.mkDerivation {
# Let openocd output scroll by
sleep 1
echo "Run 'cargo run --release watchapp'"
export PATH=`pwd`/.bin:$PATH
echo "Run 'cargo card10 watchapp'"
'';
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment