pybkick - tools to make deploying code to pyboard easier

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
User avatar
shell
Posts: 15
Joined: Tue Aug 12, 2014 8:31 pm
Location: Germany
Contact:

Re: pybkick - tools to make deploying code to pyboard easier

Post by shell » Sun Oct 26, 2014 6:02 pm

pybkick --src dev

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: pybkick - tools to make deploying code to pyboard easier

Post by EasyRider » Sun Jan 03, 2016 6:11 am

Newbie bump.

I have just started playing with MicroPython and have very limited knowledge of Linux and the development side of MicroPython source.

I have an applications to transfer/deploy python code to embedded remote pyboards via serial UART link.

As I understand this thread and pybkick offers the solution to serial "file" transfer and deployment. Unfortunately, I don't quiet understand the process and if pyboard needs any particular driver/library or if it needs to be placed in any particular state/mode to receive/deploy remotely transferred code. Secondly, as I am working on Win 7 PC at the moment, is it possible and how to transfer/deploy code from Win 7 host PC ? In what format (text?) should the code file be, is it same as main.py?

Would appreciate advice from original author or anyone else that may assist.

Best Regards
John

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

Re: pybkick - tools to make deploying code to pyboard easier

Post by dhylands » Sun Jan 03, 2016 6:19 am

I'm not familiar with pybkick, but I've also written a program call rshell.py which can be used to copy files into and out of the pyboard over a serial UART link or the USB serial link.

It also allows you use the repl. It still has some rough edges, but I'm also constantly improving it.

https://github.com/dhylands/upy-shell/t ... ter/rshell

It also allows you edit files on the pyboard (it copies the files to the host, invokes an editor and copies them back it any changes were made).
rshell requires no extra software to be installed on the pyboard and takes advantage of the raw-repl to perform all of its work.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: pybkick - tools to make deploying code to pyboard easier

Post by EasyRider » Sun Jan 03, 2016 6:30 am

Thanks Dave,

It's time I set up a PC with Ubuntu and will try rshell.

rshell looks fairly comprehensive too.

Best Regards
John

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

Re: pybkick - tools to make deploying code to pyboard easier

Post by dhylands » Sun Jan 03, 2016 7:02 am

For testing new code, my typical cycle looks something like this:

Code: Select all

cd into-directory-with-source-code
2113 >rshell.py 
Connecting to /dev/ttyACM0 ...
Welcome to rshell. Use Control-D to exit.
/home/dhylands/Dropbox/micropython/upy-examples> cp hello.py /flash
/home/dhylands/Dropbox/micropython/upy-examples> repl
Entering REPL. Use Control-X to exit.
>
MicroPython v1.5.2-dirty on 2016-01-02; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>> 
>>> import hello
Hello World
>>>  <Press Control-X> to leave REPL>
/home/dhylands/Dropbox/micropython/upy-examples> <Press Up-Arrow twice to get previous cp command>
I normally edit my file using a separate editor, but that's just my habit.

rshell uses Control-X to exit the REPL (so that Control-D can still be used for a soft-reset) and uses Control-D to exit from the rshell prompt (when not at the REPL).

I also normally use the command

Code: Select all

pyb.usb_mode('CDC')
in my boot.py file so that the USB Mass Storage is disabled, since USB Mass Storage can often mess up files on the pyboard.

Post Reply