scientifichackers / ampy

MicroPython Tool - Utility to interact with a MicroPython board over a serial connection.
MIT License
723 stars 157 forks source link

CAUTION - THIS PROJECT IS STALE (UNMAINTAINED). There is no point submitting PRs into it - nobody merges any of them... #125

Open gitcnd opened 10 months ago

gitcnd commented 10 months ago

Pity, since it's a nice tool, and since lots of us tried to contribute, but all our efforts just drop on the floor...

dhalbert commented 10 months ago

Anyone is welcome to fork this and pick up maintenance. Adafruit gave up maintenance and scientifichackers took over. Could someone else do that now?

gitcnd commented 10 months ago

I'm happy to look after it, and have a massive selection of boards and PC/Mac/linux hosts for testing. If you know how to add me to allow this, please do (I'm kinda new to contributing through GitHub to other peoples work, so if I'm supposed to do something from my side - let me know.). More about me is here: https://www.linkedin.com/in/drakechristopher/

dhalbert commented 10 months ago

The owners of the scientifichackers organization are @curiouswala and @devxpy. You could try contacting them to see if they would make you a collaborator on this repo so you could maintain it, or even transfer the repo to you. There is contat info in their profiles: just click on their user ids in this post. Or you could just fork it and announce that here.

gitcnd commented 10 months ago

I'll ask ( https://github.com/scientifichackers/ampy/pull/126 )

vvvictor07 commented 9 months ago

Hi @gitcnd any news around this? I am also interested to make this project work again (because this one is not an replacement) and I also interested to update its package, because there are some projects depending on it, e.g. intellij-micropython

If there will be no news, i will fork this repo, review and merge exist PRs, contact adafruit-python to update package, because it seems that project got stucked.

dhalbert commented 9 months ago

We have talked a little with the MicroPython folks about making mpremote, their preferred CLI tool, compatible with CircuitPython. Would mpremote be an acceptable substitute? We don't feel we need such a tool for CircuitPython, but that doesn't mean other people wouldn't want one.

gitcnd commented 9 months ago

ampy uses pyboard "under the hood".

mpremote is a rewrite of pyboard (exact same source code, all the same bugs)

the source code is a very basic and generally unintelligent "hack" that's hardcoded to look for specific responses (with bugs in their timeout code) and generally has zero robustness.

I fixed and patched most of that and submitted PRs, but there's little chance those will get incorporated anytime soon (one is a bug with python itself, but it has a workaround). micropython is infamous for rarely/never adopting PRs (or taking years) and generally being hostile to outside help.

I recommend to switch to circuitpython - the micropython fork is too unprofessional and too far behind to rely on.

jdimpson commented 8 months ago

@dhalbert I've noticed that Adafruit has started building CircuitPython images for ESP32C3 chips (which don't support USB drive interface). Surely Adafruit uses something similar to ampy to automate their testing. Do you happen to know what it is?

dhalbert commented 8 months ago

We suggest Thonny, and we have a web workflow: https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor https://learn.adafruit.com/circuitpython-with-esp32-quick-start

gitcnd commented 6 months ago

Thonny and the adafrruit online workflow both suffer the RTS/DTR pin setting problems which make them "not work" on boards which wire those pins to Reset and GPIO0 :-(

I just modified my local ampy - it works great with circuitpython now. All that's needed this this in ampy/files.py

            try:
                import ubinascii
            except:
                import binascii as ubinascii
gitcnd commented 6 months ago

My new code is here: https://github.com/gitcnd/ampy

For anyone wanting it - here's a handy "one liner" to recursively copy all the files off your micropython or circuitpython board into your current folder:-


export PORT=/dev/ttyS15

export NORM=`echo -e '\033[0m'` RED=`echo -e '\033[31;1m'` GRN=`echo -e '\033[32;1m'` YEL=`echo -e '\033[33;1m'` NAV=`echo -e '\033[34;1m'` BLU=`echo -e '\033[36;1m'` SAVE=`echo -e '\033[s'` REST=`echo -e '\033[u'` CLR=`echo -e '\033[K'` PRP=`echo -e '\033[35;1m'` WHT=`echo -e '\033[37;1m'` ZZR=`echo -e '\033[0m'`

ampy --port $PORT ls -l -r >dir_all.txt; mkdir -p `cat dir_all.txt  | perl -ne 'print ".$1\n" if(/(.+)\//)'|sort|uniq`; for FN in `cat dir_all.txt  | perl -ne '$_=~s/ - .*//;print'`;do echo $GRN $FN $YEL ; ampy --port $PORT get $FN ./$FN; echo $NORM;done