Speeding the make-deploy cycle

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
pythoncoder
Posts: 4232
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Speeding the make-deploy cycle

Post by pythoncoder » Sun May 15, 2016 11:00 am

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.
Peter Hinch

Post Reply