Improvements to fastbuild scripts

pull/7/head
Peter Hinch 2016-11-27 13:56:27 +00:00
rodzic fca404821b
commit 0b22d8c057
5 zmienionych plików z 43 dodań i 17 usunięć

Wyświetl plik

@ -5,14 +5,19 @@ then
make clean
esptool.py --port /dev/ttyUSB0 erase_flash
fi
if make -j 8
if make -j 8 axtls
then
sleep 1
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=detect -fm dio 0 firmware-combined.bin
cd -
sleep 1
rsusb # alias rsusb='rshell -p /dev/pyboard --editor nano -p /dev/ttyUSB0'
if make -j 8
then
sleep 1
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=detect -fm dio 0 build/firmware-combined.bin
cd -
sleep 1
rshell -p /dev/ttyUSB0 --editor nano
else
echo Build failure
fi
else
echo Build failure
echo Axtls build failure
fi
cd -

Wyświetl plik

@ -2,8 +2,10 @@
# Update MicroPython source and prepare for build
cd /mnt/qnap2/data/Projects/MicroPython/micropython/
echo Working...
git checkout master
git pull origin master
git submodule update --init
cd mpy-cross
make clean
make -j 8
@ -13,3 +15,9 @@ make BOARD=PYBV10 clean
make BOARD=PYBLITEV10 clean
cd ../esp8266
make clean
cd ../unix
make axtls
# If you're going to enable deplibs: see micropython/README
#make deplibs
make

Wyświetl plik

@ -4,7 +4,8 @@
# requires pyb_check
# Also requires the pyboard.py utility to be on the path (micropython/tools/pyboard.py)
DIRECTORY='/mnt/qnap2/data/Projects/MicroPython/micropython/stmhal'
export MPDIR='/mnt/qnap2/data/Projects/MicroPython/micropython'
export MPDEVICE='/dev/pyboard'
BOARD=""
if pyb_check PYBV11
then
@ -22,7 +23,7 @@ echo Building for $BOARD
if [ $BOARD ]
then
cd $DIRECTORY
cd $MPDIR/stmhal
if [ $# -eq 1 ] && [ $1 = "--clean" ]
then
make BOARD=$BOARD clean

16
fastbuild/pyb_boot 100644 → 100755
Wyświetl plik

@ -1,15 +1,21 @@
#!/usr/bin/env python
# Edit this to match the location of micropython/tools and the Pyboard device
#!/usr/bin/python3
# Called from buildpyb
# Put pyboard into DFU mode.
import sys
sys.path.append('/mnt/qnap2/data/Projects/MicroPython/micropython/tools')
import os
mp = os.getenv('MPDIR')
device = os.getenv('MPDEVICE')
sys.path.append(''.join((mp, '/tools')))
import pyboard
def main():
pyb=pyboard.Pyboard('/dev/pyboard')
pyb=pyboard.Pyboard(device)
pyb.enter_raw_repl()
try:
pyb.exec_raw('pyb.bootloader()')
except:
print('Failed to enter DFU mode')
except Exception: # It will throw one!
pass
if __name__ == "__main__":

Wyświetl plik

@ -7,17 +7,23 @@
import sys
import os, os.path
mp = os.getenv('MPDIR')
sys.path.append(''.join((mp, '/tools')))
import pyboard
device = '/dev/pyboard'
errmsg = 'Must supply board type PYBV10 PYBV11 PYBLITEV10'
d = {'PYBV11' : b'PYBv1.1', 'PYBV10' : b'PYBv1.0', 'PYBLITEV10' : b'PYBLITEv1.0'}
device = os.getenv('MPDEVICE')
def main():
if len(sys.argv) < 2:
print(errmsg)
sys.exit(1)
if not os.path.exists(device):
sys.exit(1)
pybd = pyboard.Pyboard('/dev/pyboard')
pybd = pyboard.Pyboard(device)
pybd.enter_raw_repl()
hardware = pybd.exec('import os; print(os.uname()[4].split(' ')[0])').strip()
pybd.exit_raw_repl()