ampy icon indicating copy to clipboard operation
ampy copied to clipboard

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

Open gitcnd opened this issue 1 year ago • 11 comments
trafficstars

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

gitcnd avatar Jan 16 '24 02:01 gitcnd

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

dhalbert avatar Jan 16 '24 02:01 dhalbert

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/

gitcnd avatar Jan 16 '24 04:01 gitcnd

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.

dhalbert avatar Jan 16 '24 13:01 dhalbert

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

gitcnd avatar Jan 16 '24 22:01 gitcnd

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.

vvvictor07 avatar Feb 15 '24 17:02 vvvictor07

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.

dhalbert avatar Feb 15 '24 18:02 dhalbert

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.

gitcnd avatar Feb 16 '24 00:02 gitcnd

@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?

jdimpson avatar Mar 01 '24 04:03 jdimpson

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

dhalbert avatar Mar 01 '24 04:03 dhalbert

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 avatar May 09 '24 04:05 gitcnd

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

gitcnd avatar May 09 '24 04:05 gitcnd