Page 1 of 1

Speeding the make-deploy cycle

Posted: Sun May 15, 2016 11:00 am
by pythoncoder
If you have a multi-core processor build times can be reduced by issuing (for the Pyboard 1.1):

Code: Select all

make BOARD=PYBV11 clean
make -j 8 BOARD=PYBV11
The -j 8 tells make to run 8 parallel jobs: substitute the number of cores (including hyperthreading) on your PC. On this core i7 laptop, build time was reduced from 105 secs to 35.

To speed getting the Pyboard into boot mode I use this script pyb_boot:

Code: Select all

#!/usr/bin/env python
import sys
sys.path.append('/mnt/qnap2/data/Projects/MicroPython/micropython/tools')
import pyboard
def main():
    pyb=pyboard.Pyboard('/dev/pyboard')
    pyb.enter_raw_repl()
    try:
        pyb.exec_raw('pyb.bootloader()')
    except:
        pass

if __name__ == "__main__":
    main()
Adapt the tools directory and Pyboard device according to your system.