Problem with boot.py
Posted: Sat Dec 28, 2019 3:54 pm
I have two TinyPICO boards and I use rshell to communicate with them. I have found that if I remove or overwrite boot.py the board hangs after a few more rshell file commands. Here is a transcript of a typical session:
Pauls-Mac-mini:TinyPICO paul$ esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART erase_flash
esptool.py v2.7
<snipped>...
Pauls-Mac-mini:TinyPICO paul$ esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash -z 0x1000 firmware/esp32-idf3-20191220-v1.12.bin
esptool.py v2.7
<snipped>...
Pauls-Mac-mini:TinyPICO paul$ rshell
Using buffer-size of 32
Connecting to /dev/tty.SLAB_USBtoUART (buffer-size 32)...
Trying to connect to REPL connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Dec 27, 2019 11:14:18
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Welcome to rshell. Use Control-D (or the exit command) to exit rshell.
/Users/paul/Projects/TinyPICO> ls -al /pyboard
139 Jan 1 2000 boot.py
/Users/paul/Projects/TinyPICO> rm /pyboard/boot.py
/Users/paul/Projects/TinyPICO> ls -al /pyboard
/Users/paul/Projects/TinyPICO> cp test24.py /pyboard/boot.py
/Users/paul/Projects/TinyPICO> ls -al /pyboard
<*** the board has hung, enter Ctrl-C to quit rshell>^C
Pauls-Mac-mini:TinyPICO paul$ rshell
Using buffer-size of 32
Connecting to /dev/tty.SLAB_USBtoUART (buffer-size 32)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ...
<*** rshell hangs here>
At first I thought it was because I was removing the only file in the filesystem. However, that is not the case. If I copy other files across all is ok until I touch boot.py. If I quit rshell and invoke it again, it hangs at the point where it is looking for unhexlify (see above). The only way out is to use esptool to erase the flash and then write a new firmware image to the board. All is then fine again. The problem occurs with both v1.11 and v1.12 non-spiram firmwares and on both of my TinyPICO boards.
Can anyone reproduce this behaviour? Is it an esp32 issue or does it also happen on a pyboard? Any help will be appreciated!
Pauls-Mac-mini:TinyPICO paul$ esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART erase_flash
esptool.py v2.7
<snipped>...
Pauls-Mac-mini:TinyPICO paul$ esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash -z 0x1000 firmware/esp32-idf3-20191220-v1.12.bin
esptool.py v2.7
<snipped>...
Pauls-Mac-mini:TinyPICO paul$ rshell
Using buffer-size of 32
Connecting to /dev/tty.SLAB_USBtoUART (buffer-size 32)...
Trying to connect to REPL connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Dec 27, 2019 11:14:18
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Welcome to rshell. Use Control-D (or the exit command) to exit rshell.
/Users/paul/Projects/TinyPICO> ls -al /pyboard
139 Jan 1 2000 boot.py
/Users/paul/Projects/TinyPICO> rm /pyboard/boot.py
/Users/paul/Projects/TinyPICO> ls -al /pyboard
/Users/paul/Projects/TinyPICO> cp test24.py /pyboard/boot.py
/Users/paul/Projects/TinyPICO> ls -al /pyboard
<*** the board has hung, enter Ctrl-C to quit rshell>^C
Pauls-Mac-mini:TinyPICO paul$ rshell
Using buffer-size of 32
Connecting to /dev/tty.SLAB_USBtoUART (buffer-size 32)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ...
<*** rshell hangs here>
At first I thought it was because I was removing the only file in the filesystem. However, that is not the case. If I copy other files across all is ok until I touch boot.py. If I quit rshell and invoke it again, it hangs at the point where it is looking for unhexlify (see above). The only way out is to use esptool to erase the flash and then write a new firmware image to the board. All is then fine again. The problem occurs with both v1.11 and v1.12 non-spiram firmwares and on both of my TinyPICO boards.
Can anyone reproduce this behaviour? Is it an esp32 issue or does it also happen on a pyboard? Any help will be appreciated!