Permalink
Browse files

added scripts for automatic upload

  • Loading branch information...
danielkucera committed Mar 8, 2018
1 parent 2316cb0 commit 19dca30e28a96fe3ac32cf793ff479dad0a4950a
Showing with 29 additions and 2 deletions.
  1. +14 −0 extra_script.py
  2. +2 −2 platformio.ini
  3. +13 −0 upload.sh
@@ -0,0 +1,14 @@
Import('env')
from base64 import b64decode
#
# Dump build environment (for debug)
# print env.Dump()
#
print "Running extra_script.py"
env.Append(UPLOADCMD='bash upload.sh $SOURCES')
# uncomment line below to see environment variables
# print ARGUMENTS
@@ -13,6 +13,6 @@ platform = ststm32
board = nucleo_f103rb
framework = mbed
;build_flags = -Wl,--wrap,main -D PIO_FRAMEWORK_MBED_RTOS_PRESENT -D PIO_FRAMEWORK_MBED_EVENTS_PRESENT
upload_port = null
upload_protocol = dfu
lib_deps = https://os.mbed.com/users/hudakz/code/USBDevice_STM32F103/
upload_protocol = none
extra_scripts = pre:extra_script.py
@@ -0,0 +1,13 @@
#!/bin/bash
echo Running: $0 $@
echo Waiting for device
while ! lsusb -d 1209:db42
do
echo .
sleep 1
done
dfu-util -D $1

0 comments on commit 19dca30

Please sign in to comment.