Additional Info: Flashing microPython to a NodeMCU mini board

117 views
Skip to first unread message

Mickey Mx

unread,
Jul 12, 2022, 8:53:12 AM7/12/22
to thonny
Aivar,

I've tried erasing the "NodeMCU mini" by all four methods, flashed a microPython build, but the REPL still fails.
This is the error message I receive:

MicroPython v1.19.1-espnow-6-g44f65965b on 2022-07-09; ESP module with ESP8266
Type "help()" for more information.
ERROR   thonny.plugins.micropython.backend: Crash in backend
Traceback (most recent call last):
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 136, in __init__
    self._prepare_after_soft_reboot(clean)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 155, in _prepare_after_soft_reboot
    self._execute_without_output(script)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 587, in _execute_without_output
    out, err = self._execute(script, capture_output=True)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 561, in _execute
    self._execute_with_consumer(script, consume_output)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 698, in _execute_with_consumer
    self._submit_code(script)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 557, in _submit_code
    self._submit_code_via_raw_paste_mode(to_be_sent)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 647, in _submit_code_via_raw_paste_mode
    self._raw_paste_write(script_bytes)
  File "C:\Program Files\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 681, in _raw_paste_write
    raise AssertionError("Unexpected read during raw paste: {}".format(data))
AssertionError: Unexpected read during raw paste: b''

Backend terminated or disconnected. Use 'Stop/Restart' to restart.

The "NodeMCU mini" has an ESP-12F, which I have successfully been able to program in a basic module in a development carrier that supports the ESP-01 & ESP-12 basic modules.

I've see videos others have posted having success with the less integrated Arduino IDE & esptool; so it should be compatible with Thonny.

Any suggestions?

Aivar Annamaa

unread,
Jul 13, 2022, 6:49:20 AM7/13/22
to thonny
Which Thonny version are you using?

Can you get the REPL via a simpler tool (eg. Putty)?

Best regards,
Aivar

--
You received this message because you are subscribed to the Google Groups "thonny" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thonny+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thonny/b2fcc951-155c-4ca4-b5a0-9d1b39d81fb5n%40googlegroups.com.

Mickey Mx

unread,
Jul 13, 2022, 7:58:58 AM7/13/22
to thonny
The Thonny version is 3.3.13.

Mick

Mickey Mx

unread,
Jul 13, 2022, 9:01:42 AM7/13/22
to thonny
I tried Putty with and ESP8266 that works with Thonny. I get the REPL >>>. But, if I type "help()+cntr-j" nothing happens.

When I connect the NodeMCU-mini to Thonny I now get run-away errors repeating stream in the shell.
After a "disconnect" here's a snap shot.

 4
tail 0
chksum 0xdd
csum 0xdd
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 32756, room 16
tail 4
chksum 0xa3
load 0x3ffe8000, len 2148, room 4
tail 0
chksum 0xdd
csum 0xdd
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 32756, room 16
tail 4
chksum 0xa3
load 0x3ffe8000, len 2148, room 4
tail 0
chksum 0xdd
csum 0xdd
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 32756, room 16
tail 4
chksum 0xa3
load 0x3ffe8000, len 2148, room 4
tail 0
chksum 0xdd
csum 0xdd
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

Just keeps repeating; also does the same on Putty.

Mick

Mickey Mx

unread,
Jul 13, 2022, 9:28:32 AM7/13/22
to thonny
Tried a second NodeMCU-mini, with a lower version of microPython; got the same results run-away repeating error in the Shell:

load 0x3ffe8400, len 664, room 0
tail 8
chksum 0x01
csum 0x01
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000001, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 32652, room 16
tail 12
chksum 0x19
ho 0 tail 12 room 4
load 0x3ffe8000, len 1012, room 12
tail 8
chksum 0x15
load 0x3ffe8400, len 664, room 0
tail 8
chksum 0x01
csum 0x01
Fatal exception 0(IllegalInstructionCause):
�pc1=0x4020a04c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000001, depc=0x00000000
 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

As with the first NodeMCU-mini the microPython installation succeeded without any reported issues.

Hope this additional information helps diagnose the problem using the NodeMCU-mini with Thonny.
As I've mentioned there have been no problems using ESP-01, 01S , 12E or 12F devices used in a development-board.

Mick

Aivar Annamaa

unread,
Jul 15, 2022, 3:56:19 AM7/15/22
to thonny
Thonny uses esptool with most common parameters, but some ESP32 models may require something different. I recommend googling for recommended esptool parameters for your board and install MicroPython directly with esptool. 

Let me know if you are able to use it properly via Putty, but not via Thonny.

Best regards,
Aivar

Reply all
Reply to author
Forward
0 new messages