Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs after (successful?) entering repl #76

Open
supersjimmie opened this issue Mar 28, 2019 · 3 comments
Open

Hangs after (successful?) entering repl #76

supersjimmie opened this issue Mar 28, 2019 · 3 comments

Comments

@supersjimmie
Copy link

I have an esp32 with loboris micropython.
When I completely clear the esp32 and put a fresh flashed image, I can enter mpfshell, access the files and all seems fine. But when I want to enter repl, the system completely hangs.

me:~/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD$ ./BUILD.sh -v -p /dev/ttyS12 erase

----------------------------------------
MicroPython for ESP32 with psRAM support
----------------------------------------

======================
Erasing ESP32 Flash...
======================
Erasing entire flash...
esptool.py v2.5.0
Serial port /dev/ttyS12
Connecting.....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse
MAC: 80:7d:3a:b9:9b:6c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Erasing flash (this may take a while)...
Chip erase completed successfully in 5.3s
Hard resetting via RTS pin...
OK.

me:~/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD$ ./BUILD.sh -v -p /dev/ttyS12 flash

----------------------------------------
MicroPython for ESP32 with psRAM support
----------------------------------------

=========================================
Flashing MicroPython firmware to ESP32...
=========================================
Building partitions from /home/me/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD/partitions_mpy.csv...
Flashing binaries to serial port /dev/ttyS12 (app at offset 0x10000 )...
esptool.py v2.5.0
Serial port /dev/ttyS12
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse
MAC: 80:7d:3a:b9:9b:6c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 19440 bytes to 11566...
Wrote 19440 bytes (11566 compressed) at 0x00001000 in 0.2 seconds (effective 938.3 kbit/s)...
Hash of data verified.
Compressed 144 bytes to 69...
Wrote 144 bytes (69 compressed) at 0x0000f000 in 0.0 seconds (effective 202.2 kbit/s)...
Hash of data verified.
Compressed 1956560 bytes to 1130961...
Wrote 1956560 bytes (1130961 compressed) at 0x00010000 in 17.4 seconds (effective 900.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 4069.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
OK.

me:~/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD$ mpfshell -c "open ttyS12"
Connected to esp32_LoBo

** Micropython File Shell v0.9.0, [email protected] **
-- Running on Python 2.7 using PySerial 3.4 --

mpfs [/flash]> ls

Remote files in '/flash':

 <dir> ..
       boot.py

mpfs [/flash]> cat boot.py
# This file is executed on every boot (including wake-boot from deepsleep)
import sys
sys.path[1] = '/flash/lib'

mpfs [/flash]> repl
>
*** Exit REPL with Ctrl+] ***

MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Type "help()" for more information.
>>>

Here nothing works anymore, I have to kill the mpfshell to get out.

@skorokithakis
Copy link
Collaborator

Hmm, this sounds like something isn't initialized properly. Unfortunately, I don't have an ESP32 to test this on, if you could debug I would appreciate it.

@supersjimmie
Copy link
Author

supersjimmie commented Mar 29, 2019

seemed to work when I just added the log with debug level, but then after going in and out the repl it hung again.
the log doesn't show much specific.

cat ~/mpfshell.log
2019-03-29 09:39:12,734 INFO    Micropython File Shell v0.9.0 started
2019-03-29 09:39:12,734 INFO    Running on Python 2.7 using PySerial 3.4
��19-03-29 09:39:12,852 DEBUG   serial write >
�019-03-29 09:39:12,854 DEBUG   serial write >
2019-03-29 09:39:12,859 DEBUG   serial read <
2019-03-29 09:39:12,860 DEBUG   serial read <

2019-03-29 09:39:12,861 DEBUG   serial read < >
2019-03-29 09:39:12,861 DEBUG   serial read < >
2019-03-29 09:39:12,861 DEBUG   serial read < >
2019-03-29 09:39:12,861 DEBUG   serial read <
2019-03-29 09:39:12,862 DEBUG   serial read <
2019-03-29 09:39:12,862 DEBUG   serial read <

2019-03-29 09:39:12,864 DEBUG   serial read < >
2019-03-29 09:39:12,865 DEBUG   serial read < >
2019-03-29 09:39:12,866 DEBUG   serial read < >
2019-03-29 09:39:12,866 DEBUG   serial read <
2019-03-29 09:39:12,866 DEBUG   serial read <
2019-03-29 09:39:12,867 DEBUG   serial read <

2019-03-29 09:39:12,867 DEBUG   serial read < >
2019-03-29 09:39:12,868 DEBUG   serial read < >
2019-03-29 09:39:12,868 DEBUG   serial read < >
2019-03-29 09:39:12,868 DEBUG   serial read <
2019-03-29 09:39:12,869 DEBUG   serial read <
2019-03-29 09:39:12,869 DEBUG   serial read <

2019-03-29 09:39:12,869 DEBUG   serial read < >
2019-03-29 09:39:12,869 DEBUG   serial read < >
2019-03-29 09:39:12,870 DEBUG   serial read < >
2019-03-29 09:39:12,870 DEBUG   serial read <
2019-03-29 09:39:12,870 DEBUG   serial read <
2019-03-29 09:39:12,870 DEBUG   serial read <

2019-03-29 09:39:12,871 DEBUG   serial read < r
2019-03-29 09:39:12,871 DEBUG   serial read < a
2019-03-29 09:39:12,871 DEBUG   serial read < w
2019-03-29 09:39:12,871 DEBUG   serial read <
2019-03-29 09:39:12,872 DEBUG   serial read < R
2019-03-29 09:39:12,872 DEBUG   serial read < E
2019-03-29 09:39:12,873 DEBUG   serial read < P
2019-03-29 09:39:12,873 DEBUG   serial read < L
2019-03-29 09:39:12,873 DEBUG   serial read < ;
2019-03-29 09:39:12,873 DEBUG   serial read <
2019-03-29 09:39:12,873 DEBUG   serial read < C
2019-03-29 09:39:12,874 DEBUG   serial read < T
2019-03-29 09:39:12,874 DEBUG   serial read < R
2019-03-29 09:39:12,874 DEBUG   serial read < L
2019-03-29 09:39:12,874 DEBUG   serial read < -
2019-03-29 09:39:12,875 DEBUG   serial read < B
2019-03-29 09:39:12,875 DEBUG   serial read <
2019-03-29 09:39:12,875 DEBUG   serial read < t
2019-03-29 09:39:12,875 DEBUG   serial read < o
2019-03-29 09:39:12,875 DEBUG   serial read <
2019-03-29 09:39:12,876 DEBUG   serial read < e
2019-03-29 09:39:12,876 DEBUG   serial read < x
2019-03-29 09:39:12,876 DEBUG   serial read < i
2019-03-29 09:39:12,876 DEBUG   serial read < t
2019-03-29 09:39:12,876 DEBUG   serial read <
2019-03-29 09:39:12,876 DEBUG   serial read <

2019-03-29 09:39:12,877 DEBUG   serial read < >
2019-03-29 09:39:12,877 DEBUG   serial write > import uos, sys
2019-03-29 09:39:12,888 DEBUG   serial write > �
2019-03-29 09:39:12,890 DEBUG   serial read < OK
2019-03-29 09:39:12,899 DEBUG   serial read < �
2019-03-29 09:39:12,899 DEBUG   serial read < �
2019-03-29 09:39:12,899 DEBUG   serial read < >
2019-03-29 09:39:12,899 DEBUG   serial write > try:
    import ubinascii
except ImportError:
    import binascii as ubinascii
2019-03-29 09:39:12,910 DEBUG   serial write > �
2019-03-29 09:39:12,912 DEBUG   serial read < OK
2019-03-29 09:39:12,922 DEBUG   serial read < �
2019-03-29 09:39:12,923 DEBUG   serial read < �
2019-03-29 09:39:12,923 DEBUG   serial read < >
2019-03-29 09:39:12,923 DEBUG   serial write > print(uos.getcwd())
2019-03-29 09:39:12,933 DEBUG   serial write > �
2019-03-29 09:39:12,935 DEBUG   serial read < OK
2019-03-29 09:39:12,949 DEBUG   serial read < /
2019-03-29 09:39:12,949 DEBUG   serial read < f
2019-03-29 09:39:12,950 DEBUG   serial read < l
2019-03-29 09:39:12,950 DEBUG   serial read < a
2019-03-29 09:39:12,950 DEBUG   serial read < s
2019-03-29 09:39:12,950 DEBUG   serial read < h
2019-03-29 09:39:12,951 DEBUG   serial read <
2019-03-29 09:39:12,951 DEBUG   serial read <

2019-03-29 09:39:12,951 DEBUG   serial read < �
2019-03-29 09:39:12,951 DEBUG   serial read < �
2019-03-29 09:39:12,952 DEBUG   serial read < >
2019-03-29 09:39:12,952 DEBUG   serial write > print(uos.uname()[0])
2019-03-29 09:39:12,963 DEBUG   serial write > �
2019-03-29 09:39:12,965 DEBUG   serial read < OK
2019-03-29 09:39:12,976 DEBUG   serial read < e
2019-03-29 09:39:12,976 DEBUG   serial read < s
2019-03-29 09:39:12,977 DEBUG   serial read < p
2019-03-29 09:39:12,977 DEBUG   serial read < 3
2019-03-29 09:39:12,977 DEBUG   serial read < 2
2019-03-29 09:39:12,978 DEBUG   serial read < _
2019-03-29 09:39:12,978 DEBUG   serial read < L
2019-03-29 09:39:12,978 DEBUG   serial read < o
2019-03-29 09:39:12,978 DEBUG   serial read < B
2019-03-29 09:39:12,979 DEBUG   serial read < o
2019-03-29 09:39:12,979 DEBUG   serial read <
2019-03-29 09:39:12,979 DEBUG   serial read <

2019-03-29 09:39:12,980 DEBUG   serial read < �
2019-03-29 09:39:12,980 DEBUG   serial read < �
�019-03-29 09:39:15,560 DEBUG   serial write >
2019-03-29 09:39:15,561 DEBUG   serial read < >
2019-03-29 09:39:15,571 DEBUG   serial read <
2019-03-29 09:39:15,572 DEBUG   serial read <
MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Type "help()" for more information.
>>>

So nothing at the moment it hangs.

@janoist1
Copy link

@supersjimmie how to debug ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants