No REPL on ESP32-S2

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
wangshujun@tom.com
Posts: 61
Joined: Fri Feb 15, 2019 9:22 am

Re: No REPL on ESP32-S2

Post by wangshujun@tom.com » Mon Oct 18, 2021 6:31 am

The USB compatible method should be integrated into the official firmware in the next version. My modification is after the release of 1.17. If you download the daily build, it may also be supported

leosok
Posts: 18
Joined: Sun May 02, 2021 10:10 pm

Re: No REPL on ESP32-S2

Post by leosok » Sun Jan 23, 2022 3:18 am

Unfortunately with v1.18_S2 I'm having the same problem: no REPL.
The reason I need to build the firmware myself is to include a fast driver for the st7789 display. Any advice would be highly appreciated!

p_j
Posts: 102
Joined: Mon Aug 23, 2021 1:08 pm
Location: Sydney

Re: No REPL on ESP32-S2

Post by p_j » Sun Jan 23, 2022 7:04 am

Are you compiling a custom version of micropython?
If yes then try turning off the tinyusb driver in menuconfig.
leosok wrote:
Sun Jan 23, 2022 3:18 am
Unfortunately with v1.18_S2 I'm having the same problem: no REPL.
The reason I need to build the firmware myself is to include a fast driver for the st7789 display. Any advice would be highly appreciated!

leosok
Posts: 18
Joined: Sun May 02, 2021 10:10 pm

Re: No REPL on ESP32-S2

Post by leosok » Mon Jan 24, 2022 12:20 am

The version I tried was pre-compiled, but I have the toolchain installed to compile my own version (which works for regular esp32). I have little experience in compiling. I managed to start "idf.py menuconfig" inside /ports/esp32 and found TinyUSB as an Item in Component Config. There were no settings to change though.

p_j
Posts: 102
Joined: Mon Aug 23, 2021 1:08 pm
Location: Sydney

Re: No REPL on ESP32-S2

Post by p_j » Mon Jan 24, 2022 12:32 am

You can completely disable it by pressing the spacebar on the top item

Image


leosok wrote:
Mon Jan 24, 2022 12:20 am
The version I tried was pre-compiled, but I have the toolchain installed to compile my own version (which works for regular esp32). I have little experience in compiling. I managed to start "idf.py menuconfig" inside /ports/esp32 and found TinyUSB as an Item in Component Config. There were no settings to change though.

leosok
Posts: 18
Joined: Sun May 02, 2021 10:10 pm

Re: No REPL on ESP32-S2

Post by leosok » Mon Jan 24, 2022 9:04 am

Unfortunately I don't have this option using ESP-IDF v4.3.1Image
p_j wrote:
Mon Jan 24, 2022 12:32 am
You can completely disable it by pressing the spacebar on the top item
Image

p_j
Posts: 102
Joined: Mon Aug 23, 2021 1:08 pm
Location: Sydney

Re: No REPL on ESP32-S2

Post by p_j » Tue Jan 25, 2022 8:10 am

That's strange that the item is missing.

Have you already compiled micropython in this directory? If not try compiling mp and then check if the item has returned.
leosok wrote:
Mon Jan 24, 2022 9:04 am
Unfortunately I don't have this option using ESP-IDF v4.3.1Image
p_j wrote:
Mon Jan 24, 2022 12:32 am
You can completely disable it by pressing the spacebar on the top item
Image

leosok
Posts: 18
Joined: Sun May 02, 2021 10:10 pm

Re: No REPL on ESP32-S2

Post by leosok » Tue Jan 25, 2022 2:21 pm

It did compile before. Also "make clean" and running menuconfig did not help either. FYI: I am doing this in a docker-container. It might be interesting, that I do not clone micropython from git, but download the source as tar.xz.

p_j
Posts: 102
Joined: Mon Aug 23, 2021 1:08 pm
Location: Sydney

Re: No REPL on ESP32-S2

Post by p_j » Tue Jan 25, 2022 2:29 pm

Yes maybe you should try from git.

Also maybe try running "idf.py set-target esp32s2" to see if it copies anything.

leosok
Posts: 18
Joined: Sun May 02, 2021 10:10 pm

Re: No REPL on ESP32-S2

Post by leosok » Wed Jan 26, 2022 11:23 pm

Your last reply helped me a lot. "idf.py set-target esp32s2" did copy stuff, and after I could see/turn off TinyUSB in "idf.py menuconfig" - which seems to be off by default. "make BOARD=GENERIC_S2" did build a micropython.bin, which I found out, I needed to flash with the code from provided by make/idf

Code: Select all

esptool.py -p COM11 -b 460800 --before default_reset --after hard_reset --chip esp32s2  write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x1000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 micropython.bin
This did work. But unfortunately again - no REPL.

I wonder if the board-definition BOARD=GENERIC_S2 turns on the TunyUSB again?

Post Reply