From b5b955e58e9bfa292181c44c10a26035070dfd1b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 20 Mar 2017 08:52:24 +0100 Subject: [PATCH] Add a flash.sh script --- README.md | 7 ++----- flash.sh | 5 +++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100755 flash.sh diff --git a/README.md b/README.md index a28c678..513f2ad 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,10 @@ A bare metal example of blink written in rust for the teensy 3.1 * arm-none-eabi-gcc * arm-none-eabi-ar * arm-none-eabi-objcopy +* teensy-loader-cli ## Compile and upload ```bash -cargo build --target thumbv7em-none-eabi -arm-none-eabi-objcopy -O ihex -R .eeprom target/thumbv7em-none-eabi/debug/blink blink.hex - -echo "Reset teensy now" -teensy-loader-cli -w --mcu=mk20dx256 blink.hex +./flash.sh ``` diff --git a/flash.sh b/flash.sh new file mode 100755 index 0000000..2131a93 --- /dev/null +++ b/flash.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +cargo build --target thumbv7em-none-eabi --release +arm-none-eabi-objcopy -O ihex -R .eeprom target/thumbv7em-none-eabi/release/blink target/blink.hex +teensy-loader-cli -v -w --mcu=mk20dx256 target/blink.hex