Board Definition Updates (#121)

This commit is contained in:
Ben Lye
2017-12-11 20:55:24 +00:00
committed by GitHub
parent f46b8366b0
commit 5c568da125
93 changed files with 32915 additions and 690 deletions

View File

View File

View File

View File

@@ -0,0 +1,47 @@
#!/bin/bash
BUILD_PATH=$1
PROJECT_NAME=$2
SKETCH_PATH=$3
MULTI_BOARD=$4
EXPORT_FLAG=$5
MULTI_TYPE=stm
if [ -e "$BUILD_PATH/sketch/Multiprotocol.h" ]; then
MAJOR_VERSION=$(grep "VERSION_MAJOR" "$BUILD_PATH/sketch/Multiprotocol.h" | awk -v N=3 '{print $N}')
MINOR_VERSION=$(grep "VERSION_MINOR" "$BUILD_PATH/sketch/Multiprotocol.h" | awk -v N=3 '{print $N}')
REVISION_VERSION=$(grep "VERSION_REVISION" "$BUILD_PATH/sketch/Multiprotocol.h" | awk -v N=3 '{print $N}')
PATCH_VERSION=$(grep "VERSION_PATCH" "$BUILD_PATH/sketch/Multiprotocol.h" | awk -v N=3 '{print $N}')
MULTI_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$REVISION_VERSION.$PATCH_VERSION
else
MULTI_VERSION=
fi
if [ -e "$BUILD_PATH/$PROJECT_NAME.hex" ]; then
cp "$BUILD_PATH/$PROJECT_NAME.hex" "$BUILD_PATH/multi-$MULTI_TYPE-$MULTI_VERSION.hex"
fi
if [ -e "$BUILD_PATH/$PROJECT_NAME.bin" ]; then
cp "$BUILD_PATH/$PROJECT_NAME.bin" "$BUILD_PATH/multi-$MULTI_TYPE-$MULTI_VERSION.bin"
fi
if [ $# -eq 5 ]; then
if [ $EXPORT_FLAG == "EXPORT" ]; then
if [ -e "$BUILD_PATH/$PROJECT_NAME.hex" ]; then
cp "$BUILD_PATH/$PROJECT_NAME.hex" "$SKETCH_PATH/multi-$MULTI_TYPE-$MULTI_VERSION.hex"
fi
if [ -e "$BUILD_PATH/$PROJECT_NAME.bin" ]; then
cp "$BUILD_PATH/$PROJECT_NAME.bin" "$SKETCH_PATH/multi-$MULTI_TYPE-$MULTI_VERSION.bin"
fi
if [ -e "$SKETCH_PATH/multi-$MULTI_TYPE.hex" ]; then
rm "$SKETCH_PATH/multi-$MULTI_TYPE.hex"
fi
if [ -e "$SKETCH_PATH/multi-$MULTI_TYPE.bin" ]; then
rm "$SKETCH_PATH/multi-$MULTI_TYPE.bin"
fi
fi
fi

0
BootLoaders/Boards/stm32/tools/linux64/maple_upload Normal file → Executable file
View File

13
BootLoaders/Boards/stm32/tools/linux64/serial_upload Normal file → Executable file
View File

@@ -1,2 +1,13 @@
#!/bin/bash
$(dirname $0)/stm32flash/stm32flash -g 0x8000000 -b 115200 -w "$4" /dev/"$1"
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 -g $addr -b 57600 -w "$file" /dev/"$port"
else
# Do 32-bit stuff
$(dirname $0)/stm32flash/stm32flash -g $addr -b 57600 -w "$file" /dev/"$port"
fi

View File

0
BootLoaders/Boards/stm32/tools/linux64/tx_upload Normal file → Executable file
View File

BIN
BootLoaders/Boards/stm32/tools/linux64/upload-reset Normal file → Executable file

Binary file not shown.