Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can not run twice for ESP32 #41

Closed
iascchen opened this issue Mar 2, 2018 · 6 comments
Closed

Can not run twice for ESP32 #41

iascchen opened this issue Mar 2, 2018 · 6 comments

Comments

@iascchen
Copy link

iascchen commented Mar 2, 2018

When I use it on my MAC OS, I found it will be hanged when i run ampy --port /dev/tty.SLAB_USBtoUART ls in second time. If I want to use it again, I have to replug usb cable.

I used the ampy 1.0.3 version, and micropython firmware of esp32-20180302-v1.9.3-386-g9884a2c7.bin, python version is 3.6.4

default

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ampy/cli.py", line 147, in ls for f in board_files.ls(directory): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ampy/files.py", line 94, in ls self._pyboard.enter_raw_repl() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ampy/pyboard.py", line 192, in enter_raw_repl raise PyboardError('could not enter raw repl') ampy.pyboard.PyboardError: could not enter raw repl

I checked the source code of micropython, and think may be the issue caused by it firmware code in ports/esp32/main.c

for (;;) { if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { if (pyexec_raw_repl() != 0) { break; } } else { if (pyexec_friendly_repl() != 0) { break; } } }

@hutualive
Copy link

I have similar issue on mac but not linux(debian). I checked the code mentioned in ports/esp32/main.c, seems it's a standard implementation cross different Arch/MCUs, so better figure out a walk-around on pyboard.py alone.

@hyansuper
Copy link

I have the same issue, I am using Ubuntu

@jerryneedell
Copy link

are you using the latest version of ampy (1.0.5)? I cannot reproduce this problem on my Ubuntu 18.04 system.

@Tomekske
Copy link

Tomekske commented Jan 5, 2019

Use the option '-d 0.5' in every command.
e.g.: ampy -p COM5 -d 0.5 ls or ampy -p COM5 -d 0.5 put file.py

@ladyada
Copy link
Collaborator

ladyada commented Jan 21, 2019

Hiya! We are discontinuing support for ampy, and will no longer be maintaining it. We are leaving this repository available for continued use. If you would like to take over supporting it, please contact us on the Adafruit Discord server and we can transfer the repository to you.
If you wish to continue developing it on your own, please fork the repository.

@ladyada ladyada closed this as completed Jan 21, 2019
@scientist1642
Copy link

or if -d 0.5 doesn't work use -d 1 from Mac.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants