A couple of scripts

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: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

A couple of scripts

Post by pythoncoder » Thu Dec 01, 2016 2:14 pm

I've posted a couple of Bash scripts aimed at speeding up the pull/build/deploy cycle and avoiding some of the gonk traps I fall into periodically https://github.com/peterhinch/micropython-samples.git.

buildnew pulls the latest source, does a make clean for each Pyboard variant, and rebuilds the cross compiler, axtls and the Unix port.
buildpyb checks the attached Pyboard and builds firmware appropriate for the board. It puts the board into DFU mode and deploys it, finally launching rshell without the need for user interaction (courtesy of a udev rule which avoids the need for sudo).

Any comments/improvements welcome.
Peter Hinch
Index to my micropython libraries.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: A couple of scripts

Post by dhylands » Thu Dec 01, 2016 4:20 pm

It looks like your script still has sudo:
https://github.com/peterhinch/micropyth ... ildpyb#L34

I use the following rshell command to put the device in bootloader mode:

Code: Select all

rshell repl '~ pyb.bootloader()~'

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: A couple of scripts

Post by pythoncoder » Thu Dec 01, 2016 5:25 pm

Oops! It helps to push the right version of the scripts ;)

Nice way of using rshell!
Peter Hinch
Index to my micropython libraries.

Post Reply