Announcing mpy-miniterm, a serial terminal with integrated file synchronisation
Posted: Tue Jun 12, 2018 8:51 pm
Hi all,
I've just created a new tool that allows seamless code synchronisation from a serial REPL session.
Please check it out and let me know what you think
https://github.com/jeffmakes/mpy-miniterm
I just started working with MicroPython on an ESP-32 dev board, and was finding the existing options for downloading code onto the board to be rather clunky, especially given that I had to close my serial console application so that mpy-sync/ampy/etc could connect. Yes, I know mpfshell exists, but I found that pretty clunky too, particularly when working with a large project with many files.
It's essentially a modified version of PySerial's miniterm, with an added menu option to synchronise a local folder of code on your PC to the filesystem on the MicroPython device. Simply press Ctrl+T Ctrl-G and your code is downloaded to the target. Before transferring anything, mpy-miniterm hashes the files locally and on the remote to avoid downloading unmodified files. This really saves time when working with a large project with many packages, etc.
So far it's only been tested on Linux with an ESP-32 board, but should work fine on other platforms since the original miniterm works cross-platform. Let me know whether I'm right!
I should credit Nick Moore - I'm using his ReplControl class to manage the communication.
Cheers!
Jeff
I've just created a new tool that allows seamless code synchronisation from a serial REPL session.
Please check it out and let me know what you think
https://github.com/jeffmakes/mpy-miniterm
I just started working with MicroPython on an ESP-32 dev board, and was finding the existing options for downloading code onto the board to be rather clunky, especially given that I had to close my serial console application so that mpy-sync/ampy/etc could connect. Yes, I know mpfshell exists, but I found that pretty clunky too, particularly when working with a large project with many files.
It's essentially a modified version of PySerial's miniterm, with an added menu option to synchronise a local folder of code on your PC to the filesystem on the MicroPython device. Simply press Ctrl+T Ctrl-G and your code is downloaded to the target. Before transferring anything, mpy-miniterm hashes the files locally and on the remote to avoid downloading unmodified files. This really saves time when working with a large project with many packages, etc.
So far it's only been tested on Linux with an ESP-32 board, but should work fine on other platforms since the original miniterm works cross-platform. Let me know whether I'm right!
I should credit Nick Moore - I'm using his ReplControl class to manage the communication.
Cheers!
Jeff