Metro ESP32-S2 circuitpython bin not loading

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

I have a Metro ESP32-S2 I'm trying to load circuit python on. I followed this https://learn.adafruit.com/adafruit-met ... bootloader and this https://learn.adafruit.com/adafruit-met ... cuitpython. I downloaded the circuitpython bin file, loaded up esptool.py and wrote it out, hit reset. The board doesn't show up as circuitpython and the `INFO_UF2.txt` still shows tinyusb. I'm not sure what I'm doing wrong, any help would be greatly appreciated. Thanks!

Code: Select all

drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 chip_id
esptool.py v3.1
Serial port /dev/cu.usbmodem01
Connecting...
Detecting chip type... ESP32-S2
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:06:92:a0
Uploading stub...
Running stub...
Stub running...
Warning: ESP32-S2 has no Chip ID. Reading MAC instead.
MAC: 7c:df:a1:06:92:a0
ERROR: ESP32-S2 chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this error, set --after option to 'no_reset'.
drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 --after=no_reset write_flash 0x0 adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.
adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.bin  adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.uf2
drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 --after=no_reset write_flash 0x0 adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.bin
esptool.py v3.1
Serial port /dev/cu.usbmodem01
Connecting...
Detecting chip type... ESP32-S2
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:06:92:a0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00151fff...
Compressed 1384352 bytes to 889976...
Wrote 1384352 bytes (889976 compressed) at 0x00000000 in 15.6 seconds (effective 709.4 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.
drizzt:Downloads shade$ cat /Volumes/
METROS2BOOT/ drizzt/
drizzt:Downloads shade$ cat /Volumes/METROS2BOOT/INFO_UF2.TXT
TinyUF2 Bootloader 0.5.2 - tinyusb (0.10.1-109-g9b3ec69b)
Model: Adafruit Metro ESP32-S2
Board-ID: ESP32S2-Metro-revC
Date: Sep  8 2021
drizzt:Downloads shade$

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

Are these the folders you get after hitting reset?

Code: Select all

    drizzt:Downloads shade$ cat /Volumes/
    METROS2BOOT/ drizzt/
    
    drizzt:Downloads shade$ cat /Volumes/METROS2BOOT/INFO_UF2.TXT
    TinyUF2 Bootloader 0.5.2 - tinyusb (0.10.1-109-g9b3ec69b)
    Model: Adafruit Metro ESP32-S2
    Board-ID: ESP32S2-Metro-revC
    Date: Sep  8 2021
You're getting METROS2BOOT again, and not CIRCUITPY?

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

Yeah, those are the contents of the board after reset. I figured it was me getting METROS2BOOT again but I don't know why its happening or how to fix it. Did I miss a step?

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

@adafruit_support_carter do you know if I'm missing a step or what I should do to fix this? Thanks!

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

Code: Select all

drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 --after=no_reset write_flash 0x0 adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.bin  adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.uf2
Try again, but only specify the .bin file. No need to specify the .uf2. See example here:
https://learn.adafruit.com/adafruit-met ... -3076823-5

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

Thank you for replying back. I tried again and got the same results.

Code: Select all

drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 chip_id
esptool.py v3.1
Serial port /dev/cu.usbmodem01
Connecting...
Detecting chip type... ESP32-S2
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:06:92:a0
Uploading stub...
Running stub...
Stub running...
Warning: ESP32-S2 has no Chip ID. Reading MAC instead.
MAC: 7c:df:a1:06:92:a0
ERROR: ESP32-S2 chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this error, set --after option to 'no_reset'.
drizzt:Downloads shade$ esptool.py --port /dev/cu.usbmodem01 --after=no_reset write_flash 0x0 adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.bin
esptool.py v3.1
Serial port /dev/cu.usbmodem01
Connecting...
Detecting chip type... ESP32-S2
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:06:92:a0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00151fff...
Compressed 1384352 bytes to 889976...
Wrote 1384352 bytes (889976 compressed) at 0x00000000 in 15.5 seconds (effective 715.0 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.
drizzt:Downloads shade$ cat /Volumes/METROS2BOOT/INFO_UF2.TXT
TinyUF2 Bootloader 0.5.2 - tinyusb (0.10.1-109-g9b3ec69b)
Model: Adafruit Metro ESP32-S2
Board-ID: ESP32S2-Metro-revC
Date: Sep  8 2021
drizzt:Downloads shade$ date
Sat Oct 23 09:04:08 EDT 2021
drizzt:Downloads shade$
Any other suggestions?

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

Let's try a different approach. Since you are getting the METROS2BOOT folder, we can try using the .uf2 file instead of the .bin file. Download that UF2 file from here:
https://circuitpython.org/board/adafruit_metro_esp32s2/
and then simply drag (copy) the UF2 file to the METROS2BOOT folder. No need to use esptool.py.

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

I tried that before but did it again and got the same results.

Code: Select all

drizzt:~ shade$ cp ~/Downloads/adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.uf2 /Volumes/METROS2BOOT/
drizzt:~ shade$ ls /Volumes/ 
METROS2BOOT/ Recovery/    drizzt/      
drizzt:~ shade$ ls /Volumes/ 
METROS2BOOT     Recovery        drizzt
drizzt:~ shade$ ls /Volumes/METROS2BOOT/
CURRENT.UF2     INDEX.HTM       INFO_UF2.TXT
drizzt:~ shade$ cat /Volumes/METROS2BOOT/INFO_UF2.TXT 
TinyUF2 Bootloader 0.5.2 - tinyusb (0.10.1-109-g9b3ec69b)
Model: Adafruit Metro ESP32-S2
Board-ID: ESP32S2-Metro-revC
Date: Sep  8 2021
drizzt:~ shade$ 
drizzt:~ shade$ 

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

What operating system are you using on the host PC?

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

I'm running OS X 10.14.6

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

It's a bit odd that it's going back into bootloader mode, but check here for some known issues with getting the CIRCUITPY folder to show up:
https://learn.adafruit.com/welcome-to-c ... leshooting

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

Hmm, I'm not using DriveDX and I didn't see anything else in the troubleshooting guide for me to check. Most was windows based. Though I am able to see circuit python on my funhouse and circuitplayground express. I'll try and see if I can plug it into a windows machine to test this. Other than that I'm out of ideas.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

Hmm. If a FunHouse is showing up, then probably not one of the known 3rd party interference things. The FunHouse also uses a ESP32-S2.

Let's go back to esptool and try an explicit flash erase prior to writing the .bin file. Try running these:

Code: Select all

esptool.py --port /dev/cu.usbmodem01 erase_flash
esptool.py --port /dev/cu.usbmodem01 --after=no_reset write_flash 0x0 adafruit-circuitpython-adafruit_metro_esp32s2-en_US-7.0.0.bin
first one does the erase, second one is same as before to write the .bin firmware file.

User avatar
Shade34321
 
Posts: 17
Joined: Tue Jun 20, 2017 9:54 am

Re: Metro ESP32-S2 circuitpython bin not loading

Post by Shade34321 »

I managed to get working today. I used my work windows computer and the web esp tool to flash the combined bin onto the board. Then I transferred the circuit python uf2 onto the board and it worked.

Before trying this I did try just copying the circuit python uf2 onto it and it did not work. Taking the aforementioned steps though did work. Thank you for all of your help!

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro ESP32-S2 circuitpython bin not loading

Post by adafruit_support_carter »

Cool, glad you got it working. Still a bit of mystery what was happening. It seems like the issues were specific to one PC though?

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”