mpy-utils icon indicating copy to clipboard operation
mpy-utils copied to clipboard

infinite loop with Forcefully breaking the boot.py

Open europrimus opened this issue 5 years ago • 4 comments

with a pip intall --user, i try several command:

$ mpy-fuse /mnt/rom/ --debug
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
$ mpy-sync --port /dev/ttyUSB0 --baud 115200 --delay 5 --debug main.py 
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
$ mpy-upload --debug main.py 
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py
Forcefully breaking the boot.py

I always have the message Forcefully breaking the boot.py display in infinite loop

my board is an ESP8266wifi D1 mini

>>> esp.info
<function>
>>> esp.info()
_text_start=40100000
_text_end=40107984
_irom0_text_start=40209000
_irom0_text_end=40293ab8
_data_start=3ffe8000
_data_end=3ffe844c
_rodata_start=3ffe8450
_rodata_end=3ffe9114
_bss_start=3ffe9118
_bss_end=3fff8cb8
_heap_start=3fff8cb8
_heap_end=3fffc000
qstr:
  n_pool=1
  n_qstr=31
  n_str_data_bytes=343
  n_total_bytes=3703
GC:
  35968 total
  11008 : 24960
  1=65 2=16 m=264

i use micropython esp8266-20180511-v1.9.4.bin
is some one have an idea of what append ?

europrimus avatar Feb 02 '19 23:02 europrimus

Same here.

antonvh avatar Jun 05 '19 08:06 antonvh

I get the same message - any help available; I'm not able to use the tool mpy-fuse msg: forcefully breaking the boot.py mpy-fuse --port /dev/ttyUSB0 --baud 115000 --debug --reset /home/nuc8/tmp/esp8266

ottokuegerl avatar Feb 04 '20 18:02 ottokuegerl

I had the same issue, after reading the init code it seems that replcontrol.py in def initialize(self) lacks start = time.time() before said log - due to which it sends an immediate reset after reset.

After fixing that I was able to load the file correctly. One line change def initialize(self) below:

    def initialize(self):
        # break, break, raw mode, reboot
        self.io.writebytes(b"\x03\x03\x01\x04")
        start = time.time()
        while True:
            resp = self.io.readall()
            if resp.endswith(b"\r\n>"):
                break
            elif time.time() - start > 3:
                start = time.time()
                if self.debug:
                    self.log("Forcefully breaking the boot.py")
                self.io.writebytes(b"\x03\x03\x01\x04")
            time.sleep(self.delay / 1000.0)
        self.io.flushinput()

I can PR it, though I do not know if it's maintained :)

pholat avatar Jan 02 '23 19:01 pholat

Yeah, kinda sorta still maintained, I just haven't done anything with it in ages. Not all the changes were on PyPI yet so I just updated the package to 0.1.13 which maybe will fix your problem. I think I was always installing from github anyway.

nickzoic avatar Jan 11 '23 05:01 nickzoic