vos/tools/svl-wrapper.sh

20 lines
309 B
Bash
Raw Permalink Normal View History

2022-10-24 06:45:43 +00:00
#! /usr/bin/env bash
set -ep
TARGET=${1}
BIN="${TARGET}.bin"
BOOTLOADER="$(dirname ${0})/svl/svl.py"
echo "size:"
arm-none-eabi-size "${TARGET}"
echo "objcopy.."
arm-none-eabi-objcopy -S -O binary "${TARGET}" "${BIN}"
echo "flashing /dev/ttyUSB0.."
python3 "${BOOTLOADER}" -f "${BIN}" /dev/ttyUSB0 -v