nickzoic / mpy-utils

Utility programs for Micropython ...
MIT License
104 stars 23 forks source link

infinite loop with Forcefully breaking the boot.py #15

Open europrimus opened 5 years ago

europrimus commented 5 years ago

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 ?

antonvh commented 5 years ago

Same here.

ottokuegerl commented 4 years ago

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

pholat commented 1 year ago

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 :)

nickzoic commented 1 year ago

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.