#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2012-2024 Scott Penrose and WII5 Buoy contributors # # This file is part of WII5 Buoy firmware. # See LICENSE for full terms. # Flash the most-recently-built local hex via the standard arduino bootloader. # Configure with env vars: : "${WII5_SERIAL:=/dev/ttyUSB0}" : "${WII5_FULL_HEX:?path to wii5_buoy.ino.hex}" : "${WII5_AVRDUDE:=avrdude}" : "${WII5_AVRDUDE_CONF:?path to avrdude.conf}" "$WII5_AVRDUDE" \ -C"$WII5_AVRDUDE_CONF" -v \ -patmega2560 \ -carduino \ -P"$WII5_SERIAL" -b230400 \ -D \ -Uflash:w:"$WII5_FULL_HEX":i