Ben Lye 301c8da9eb Arduino IDE Board Updates (#142)
* Fix macOS serial upload

* Add verification switch to serial upload scripts

* Fix do_version.bat

Allow parentheses and other special characters in the sketch path

* Fix AVR board linker flags

* Switch to new STM32 dual bootloader

Single bootloader for flash via USB and from TX

* Increment board versions

* Add new board archive files and add new versions to JSON file
2018-01-24 09:07:22 +01:00

14 lines
326 B
Bash
Executable File

#!/bin/bash
port=$1
addr=$2
file=$3
uname -m | grep "x86_64" 2>&1 1>/dev/null
if [ $? -eq 0 ]; then
# Do 64-bit stuff
$(dirname $0)/../linux64/stm32flash/stm32flash -v -g $addr -b 57600 -w "$file" /dev/"$port"
else
# Do 32-bit stuff
$(dirname $0)/stm32flash/stm32flash -v -g $addr -b 57600 -w "$file" /dev/"$port"
fi