From 889533d5b2b2d3b598832954e4a9f97d6600e601 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 9 Aug 2023 01:02:52 +0200 Subject: [PATCH] Add toolchain.sh - fvcompile, fvflash etc... --- toolchain.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 toolchain.sh diff --git a/toolchain.sh b/toolchain.sh new file mode 100644 index 0000000..58e1d8f --- /dev/null +++ b/toolchain.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +export PATH="$HOME/src/ch341eeprom/:$PATH" + +# fvcompile, fvhex2bin, fvflash, fverase + +function fvcompile { + python -m asfv1 -b -c -s $1 $1.bin +} + +function fvhex2bin { + srec_cat $1 -Intel -o $1.bin -binary +} + +function fvflash { + sudo ch341eeprom -v -s 24c32 -w $1 +} + +function fverase { + sudo ch341eeprom -v -s 24c32 --erase +} + +$* +