1

I have a NodeMCU board and I'm trying to use it for IoT. I'm using mac and this is the commands I'm using to install MicroPython:

esptool.py --port /dev/cu.usbserial-110 erase_flash esptool.py --port /dev/cu.usbserial-110 --baud 115200 write_flash --flash_size=detect 0 sp8266-512k-20220618-v1.19.1.bin

The installation looks to work fine, I can even access the REPL but then, to load the main.py file I want it to run, I do:

ampy --port /dev/cu.usbserial-110 -b 115200 put main.py

And I get the following error:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/ampy", line 8, in <module>
    sys.exit(cli())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ampy/cli.py", line 264, in put
    board_files.put(remote, infile.read())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ampy/files.py", line 223, in put
    self._pyboard.exec_("f.write({0})".format(chunk))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ampy/pyboard.py", line 279, in exec_
    raise PyboardError('exception', ret, ret_err)

I have tried to reset the board many times, be sure that the screen command I used to connect the REPL is not in progress anymore, and even different baud rates, but nothing is working...

Any idea?

Thank you so much!

Alexgar
  • 21
  • 3
  • Seems you have an incomplete stack trace, there should be a line with a human readable string – ykhrustalev Feb 27 '23 at 01:17
  • 1
    Yes... you are right. Anyway I realized I was using the wrong MicroPython image, I was installing the one for boards with 512KiB flash memory. When I installed the 2MiB+ version it worked. Here the links: https://micropython.org/download/?mcu=esp8266 – Alexgar Mar 01 '23 at 16:04

0 Answers0