diff --git a/fastbuild/buildnew b/fastbuild/buildnew index 05ec94e..eb7ed2b 100755 --- a/fastbuild/buildnew +++ b/fastbuild/buildnew @@ -1,7 +1,7 @@ #! /bin/bash # Update MicroPython source and prepare for build -cd /mnt/qnap2/data/Projects/MicroPython/micropython/ +cd $MPDIR echo Working... git checkout master git pull origin master @@ -16,8 +16,7 @@ make BOARD=PYBLITEV10 clean cd ../esp8266 make clean cd ../unix -make axtls +make -j 8 axtls # If you're going to enable deplibs: see micropython/README #make deplibs -make - +make -j 8 diff --git a/fastbuild/buildpyb b/fastbuild/buildpyb index b5a5771..ef50c5b 100755 --- a/fastbuild/buildpyb +++ b/fastbuild/buildpyb @@ -4,23 +4,32 @@ # requires pyb_check # Also requires the pyboard.py utility to be on the path (micropython/tools/pyboard.py) -export MPDIR='/mnt/qnap2/data/Projects/MicroPython/micropython' -export MPDEVICE='/dev/pyboard' +MPDEVICE='/dev/pyboard' + +# Determine board type BOARD="" -if pyb_check PYBV11 +if pyb_check $MPDEVICE PYBV11 then BOARD="PYBV11" fi -if pyb_check PYBV10 +if pyb_check $MPDEVICE PYBV10 then BOARD="PYBV10" fi -if pyb_check PYBLITEV10 +if pyb_check $MPDEVICE PYBLITEV10 then BOARD="PYBLITEV10" fi echo Building for $BOARD +# Check for user override of frozen directory +if [ $FROZEN_DIR ] +then + echo Frozen modules located in $FROZEN_DIR +else + FROZEN_DIR='modules' +fi + if [ $BOARD ] then cd $MPDIR/stmhal @@ -28,10 +37,10 @@ then then make BOARD=$BOARD clean fi - if make -j 8 BOARD=$BOARD FROZEN_MPY_DIR=modules && pyb_boot + if make -j 8 BOARD=$BOARD FROZEN_MPY_DIR=$FROZEN_DIR && pyb_boot $MPDEVICE then sleep 1 - sudo make BOARD=$BOARD deploy + make BOARD=$BOARD deploy cd - sleep 1 rshell