Frozen modules attempt failed

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
davef
Posts: 180
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Frozen modules attempt failed

Post by davef » Mon Feb 15, 2021 3:58 am

In rshell:

Code: Select all

timed out or error in transfer to remote: b'F'
which led me to:
viewtopic.php?t=8591
and then to:
https://github.com/micropython/micropyt ... nifest.py
So, checked for a manifest.py file and found one in /ports/esp8266/boards/ which seems to have similar commands in it.

I see my modules being built-in:

Code: Select all

MPY umail.py
MPY wifi_functions.py
MPY ramfs.py
There is no boot.py and possibly no filesystem as in the forum link above.

What critical step(s) have I missed?

Thanks.

User avatar
jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Frozen modules attempt failed

Post by jimmo » Mon Feb 15, 2021 5:30 am

davef wrote:
Mon Feb 15, 2021 3:58 am
What critical step(s) have I missed?
Can you provide more information about what you did?

i.e. exactly which files you've created and their contents and how you're building the firmware?

My guess is that maybe your manifest isn't including the base manifest.

davef
Posts: 180
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Frozen modules attempt failed

Post by davef » Mon Feb 15, 2021 6:03 am

I followed:
https://learn.adafruit.com/micropython- ... ng-modules
recognising that it might not be 100% correct.

Basically, place my .py files into /ports/esp8266/modules and do a <make>. I get a firmware-combined.bin and loaded that on to the ESP8266.

The files I am trying to freeze are: umail.py, ramfs.py and my own wifi_functions.py I am happy to post the files if still required.

When you say "your manifest" does that mean I need to code a file and not rely on the manifest.py provided?

Thanks,
Dave

User avatar
jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Frozen modules attempt failed

Post by jimmo » Mon Feb 15, 2021 6:43 am

davef wrote:
Mon Feb 15, 2021 6:03 am
I followed:
https://learn.adafruit.com/micropython- ... ng-modules
recognising that it might not be 100% correct.
Yeah a lot has changed since that was written but it still should work.
davef wrote:
Mon Feb 15, 2021 6:03 am
Basically, place my .py files into /ports/esp8266/modules and do a <make>. I get a firmware-combined.bin and loaded that on to the ESP8266.
OK, yep, that should work. The default manifest will scoop up everything in the modules directory.
davef wrote:
Mon Feb 15, 2021 3:58 am
What critical step(s) have I missed?
I think I assumed that something wasn't working... but is it actually working?

You won't see the other filenames printed during the build if they were already built previously.
davef wrote:
Mon Feb 15, 2021 6:03 am
When you say "your manifest" does that mean I need to code a file and not rely on the manifest.py provided?
Yeah, the idea is that you'd write your own manifest.py (which includes the base manifest). This way you can maintain your files outside of the micropython repo. See this other thread here: viewtopic.php?f=2&t=9798

davef
Posts: 180
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Frozen modules attempt failed

Post by davef » Mon Feb 15, 2021 6:51 am

I get the error:

Code: Select all

timed out or error in transfer to remote: b'F'
when I tried to rshell my own boot.py, so I stopped there. IE it doesn't "work".

Off to check out the linked thread. Already read that ... do I have to it "outside my micropython repo"? I think I am happy to do it inside.

davef
Posts: 180
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Frozen modules attempt failed

Post by davef » Mon Feb 15, 2021 8:07 am

I got brave and proceeded by doing <repl> and got this:

Code: Select all

  File "_boot.py", line 13, in <module>
  File "inisetup.py", line 44, in setup
  File "inisetup.py", line 16, in check_bootsec
  File "flashbdev.py", line 13, in readblocks
OSError: [Errno 5] EIO

MicroPython v1.14-25-g7ed9954-dirty on 2021-02-15; ESP module with ESP8266
Type "help()" for more information.
>>> 
I recall that I got some errors when I cloned micropython.git

Code: Select all

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/hathach/nxp_driver.git' into submodule path 'hw/mcu/nxp' failed
Failed to recurse into submodule path 'lib/tinyusb'
so maybe that might explain why things are not working as expected. I should sort that out before proceeding. I couldn't find a way to just repair or update micropython. Sorry, if I have confused matters.

User avatar
pythoncoder
Posts: 4940
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Frozen modules attempt failed

Post by pythoncoder » Mon Feb 15, 2021 2:04 pm

I would definitely re-clone: those errors should not occur.

It's always a good idea to erase flash on the ESP8266 if you encounter problems (this will wipe any files in the filesystem). It will ensure that inisetup.py creates a new littlefs filesystem. You can check which modules are frozen with help('modules').
Peter Hinch

davef
Posts: 180
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Frozen modules attempt failed

Post by davef » Sat Feb 20, 2021 8:35 am

Re-cloned micropython.git with no errors or warnings. Then read a suggestion that you have to re-make esp-open-sdk when you up-version micropython ... so did that.

Next without touching anything and in the /ports/esp8266 directory did <make> and got a firmware-combined.bin. Erase_flash and upload this .bin using:

Code: Select all

sudo esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect 0 firmware-combined.bin
and still get the same error:

Code: Select all

timed out or error in transfer to remote: b'F'
Any other suggestions?

User avatar
Roberthh
Posts: 2462
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Frozen modules attempt failed

Post by Roberthh » Sat Feb 20, 2021 9:38 am

Which board do you use,? Sometimes it helps to lower to he baud rate. I use 460800. Sometimes even 230400.

User avatar
pythoncoder
Posts: 4940
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Frozen modules attempt failed

Post by pythoncoder » Sat Feb 20, 2021 10:32 am

I use

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect -fm dio 0 build-GENERIC/firmware-combined.bin
The dio may take other values depending on the make of board. I have needed dout on some boards. A forum search may throw up other options.
Peter Hinch

Post Reply