No REPL on ESP32-S2
No REPL on ESP32-S2
Hello all,
I'm pretty new to Micropytohn firmware building process, but I tried to build the GENERIC_S2 esp32 port from current Micropython master and I was able to get a micropython.bin firmware executable.
Once deployed on my board (a simple standalone esp32-s2-wroom already checked with espressif examples) I have no REPL on UART0 (RX module pin 37 and TX module pin 38) but only the following:
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x12b0
load:0x4004c000,len:0x8c4
load:0x40050000,len:0x2ca4
entry 0x4004c1a8
I have no panic at 0x4004c1a8 so I think the firmware is running, but I'm not sure, any suggestion?
Here my deployment command:
esptool.py esp32s2 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 micropython.bin
Here my IDF SDK version:
ESP-IDF v4.4-dev-4-g73db14240-dirty
Thanks in advance
Alex
I'm pretty new to Micropytohn firmware building process, but I tried to build the GENERIC_S2 esp32 port from current Micropython master and I was able to get a micropython.bin firmware executable.
Once deployed on my board (a simple standalone esp32-s2-wroom already checked with espressif examples) I have no REPL on UART0 (RX module pin 37 and TX module pin 38) but only the following:
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x12b0
load:0x4004c000,len:0x8c4
load:0x40050000,len:0x2ca4
entry 0x4004c1a8
I have no panic at 0x4004c1a8 so I think the firmware is running, but I'm not sure, any suggestion?
Here my deployment command:
esptool.py esp32s2 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 micropython.bin
Here my IDF SDK version:
ESP-IDF v4.4-dev-4-g73db14240-dirty
Thanks in advance
Alex
Re: No REPL on ESP32-S2
Hi Alexmus,
The ESP32S2 build seems to send REPL to the native USB port, not the UART port where you programmed the ESP32S2 from.
I have my S2 currently running MP 1.15 with USB Data Positive (White Wire) connected to ESP32S2 Pin 19 and USB Data Negative (Green Wire) connected to ESP32S2 Pin 20.
It connects as /dev/ttyACM1 on my RPi.
Cheers
Barry
The ESP32S2 build seems to send REPL to the native USB port, not the UART port where you programmed the ESP32S2 from.
I have my S2 currently running MP 1.15 with USB Data Positive (White Wire) connected to ESP32S2 Pin 19 and USB Data Negative (Green Wire) connected to ESP32S2 Pin 20.
It connects as /dev/ttyACM1 on my RPi.
Cheers
Barry
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: No REPL on ESP32-S2
I also encounter the same problem. After compiling and enabling USB, the repl of serial port will no longer respond
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: No REPL on ESP32-S2
Try the following modifications to make USB and UART work at the same time:
1. main.c
83 line
#if CONFIG_USB_ENABLED
usb_init();
#endif
uart_init();
2. mphalport.c
121 line
#if CONFIG_USB_ENABLED
usb_tx_strn(str, len);
#endif
for (uint32_t i = 0; i < len; ++i) {
uart_tx_one_char(str);
}
After modification, UART and CDC can be opened at the same time by using the serial assistant.
but,use thonny opening any one, the other serial port can only output and can not input .
1. main.c
83 line
#if CONFIG_USB_ENABLED
usb_init();
#endif
uart_init();
2. mphalport.c
121 line
#if CONFIG_USB_ENABLED
usb_tx_strn(str, len);
#endif
for (uint32_t i = 0; i < len; ++i) {
uart_tx_one_char(str);
}
After modification, UART and CDC can be opened at the same time by using the serial assistant.
but,use thonny opening any one, the other serial port can only output and can not input .
Re: No REPL on ESP32-S2
I'm a beginner with this stuff and no programmer at all.
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: No REPL on ESP32-S2
According to the previous modification, if only UART is connected and USB is not connected, the repl speed of UART will be very slow and not practical
wangshujun@tom.com wrote: ↑Wed Jun 30, 2021 2:13 pmTry the following modifications to make USB and UART work at the same time:
1. main.c
83 line
#if CONFIG_USB_ENABLED
usb_init();
#endif
uart_init();
2. mphalport.c
121 line
#if CONFIG_USB_ENABLED
usb_tx_strn(str, len);
#endif
for (uint32_t i = 0; i < len; ++i) {
uart_tx_one_char(str);
}
After modification, UART and CDC can be opened at the same time by using the serial assistant.
but,use thonny opening any one, the other serial port can only output and can not input .
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: No REPL on ESP32-S2
Please try this firmware
esp12k is esp32s2 module
https://github.com/wangshujun-tj/mpy-Framebuf-boost
esp12k is esp32s2 module
https://github.com/wangshujun-tj/mpy-Framebuf-boost
Re: No REPL on ESP32-S2
Hello, I have this same issue .
firmware seems to load but I get the following message when I open terminal :
--> A fatal error occurred: This chip is ESP32-S2 not ESP32. Wrong --chip argument?
is it possible to run Micropython on esp32S2 model??
do I have to upgrade esptool, I have version 2.8?
Do I set the target somehow I thought that esptool automatically does this.
Thank you fro any suggestions.
Jeff
firmware seems to load but I get the following message when I open terminal :
--> A fatal error occurred: This chip is ESP32-S2 not ESP32. Wrong --chip argument?
is it possible to run Micropython on esp32S2 model??
do I have to upgrade esptool, I have version 2.8?
Do I set the target somehow I thought that esptool automatically does this.
Thank you fro any suggestions.
Jeff
Re: No REPL on ESP32-S2
Hi,
I am not sure, but your problem seems very similar to what I had (esp32-ca-mb with esp32S2)
Try the solution described below, and give feedback if it works:
viewtopic.php?f=18&t=10151&start=10#p61272
I am not sure, but your problem seems very similar to what I had (esp32-ca-mb with esp32S2)
Try the solution described below, and give feedback if it works:
viewtopic.php?f=18&t=10151&start=10#p61272
Re: No REPL on ESP32-S2
Thank you! This absolutely works on my board! Now I'd like to find out why my own build (from 1.17 master) does not.wangshujun@tom.com wrote: ↑Tue Jul 13, 2021 1:09 amPlease try this firmware
esp12k is esp32s2 module
https://github.com/wangshujun-tj/mpy-Framebuf-boost