adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4k stars 1.18k forks source link

CircuitPython 8.x bootloops on ESP-C3-32S (2M) #7932

Open Schmeckinger opened 1 year ago

Schmeckinger commented 1 year ago

CircuitPython version

Broken:
CircuitPython 8.0.5, CircuitPython 8.1.0-beta.2 for ESP-C3-32S (2M)
Working:
Adafruit CircuitPython 7.3.3 on 2022-08-29; AITHinker ESP32-C3S_Kit_2M with ESP32-C3

Code/REPL

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5810,len:0x24
load:0x403cc710,len:0x668
load:0x403ce710,len:0x2218
entry 0x403cc710
Serial console setup
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403820a6
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5810,len:0x24
load:0x403cc710,len:0x668
load:0x403ce710,len:0x2218
entry 0x403cc710
Serial console setup
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403820a6
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd5810,len:0x24
load:0x403cc710,len:0x668
load:0x403ce710,len:0x2218
entry 0x403cc710
...

Behavior

8.x is bootlooping on my ESP-C3-32S (2M), while 7.3.3 runs fine:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd6100,len:0x1374
load:0x403ce000,len:0x8f0
load:0x403d0000,len:0x2c34
entry 0x403ce000
Serial debug setup
Adafruit CircuitPython 7.3.3 on 2022-08-29; AITHinker ESP32-C3S_Kit_2M with ESP32-C3
Board ID:ai_thinker_esp32-c3s-2m

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Hello World!

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Description

No response

Additional information

https://circuitpython.org/board/ai_thinker_esp32-c3s-2m/

Schmeckinger commented 1 year ago

2023_0505_151116_001 2023_0505_145043_001 My board looks a bit different from the one on the images.

dhalbert commented 1 year ago

Could you try erasing the flash completely and then reinstalling the UF2 bootloader and trying 8.0.x again?

Neradoc commented 1 year ago

Trying a full erase is a good idea, note that it's a C3, no uf2 bootloader. I believe it's also the only 2MB C3 we have apparently ? So maybe there's an issue with the 2MB partition ?

Schmeckinger commented 1 year ago

Trying a full erase is a good idea, note that it's a C3, no uf2 bootloader. I believe it's also the only 2MB C3 we have apparently ? So maybe there's an issue with the 2MB partition ?

I always full erased before flashing. I also tried multiple times with different settings, speeds etc. I even tried the web flash.

tannewt commented 1 year ago

Moved to long term because none of us Adafruit-funded folks have this board. QTPy C3 doesn't boot loop.

bill88t commented 1 year ago

Perhaps as a hack we could try flashing a 2mb partition table on a 4mb board. That should work.

parsa222 commented 1 year ago

i have the same problem i works fine on 7.3.3 but the versions afer 8.0.0 makes it stuck in bootloop ( the same board)

dhalbert commented 1 year ago

I cannot find this to buy; it appears to be discontinued. If you have a US-purchase link, could you post it?

I looked through the changes between 7.3.3 and 8.2.0 and I don't see what would cause this. There are changes which partition table file are used, but those changes just seem to be renamings.

If anyone feels like doing a bisect, that would be great. Maybe start with 8.0.0-alpha.1 and see if that fails, and then bisect main vs that. But it requires an experienced builder. An alternative is to try all the 8.0.0 alpha and beta versions, and see which one is the first to cause a failure.

I have a vague memory which may be wrong of some revisions of these AI-Thinker boards happening under the same part number.

parsa222 commented 1 year ago

Thanks for the support I’ll check all the versions (alpha and beta) And find which version it fails I’ll let you know -parsa

On Jul 12, 2023, at 4:49 PM, Dan Halbert @.***> wrote:

 I cannot find this to buy; it appears to be discontinued. If you have a US-purchase link, could you post it?

I looked through the changes between 7.3.3 and 8.2.0 and I don't see what would cause this. There are changes which partition table file are used, but those changes just seem to be renamings.

If anyone feels like doing a bisect, that would be great. Maybe start with 8.0.0-alpha.1 and see if that fails, and then bisect main vs that. But it requires an experienced builder. An alternative is to try all the 8.0.0 alpha and beta versions, and see which one is the first to cause a failure.

I have a vague memory which may be wrong of some revisions of these AI-Thinker boards happening under the same part number.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

parsa222 commented 1 year ago

Hello again, The problem occurs on 8.0.0-beta2

It woks fine on 8.0.0-beta1 and previous versions Thanks -parsa

On Jul 12, 2023, at 4:49 PM, Dan Halbert @.***> wrote:

 I cannot find this to buy; it appears to be discontinued. If you have a US-purchase link, could you post it?

I looked through the changes between 7.3.3 and 8.2.0 and I don't see what would cause this. There are changes which partition table file are used, but those changes just seem to be renamings.

If anyone feels like doing a bisect, that would be great. Maybe start with 8.0.0-alpha.1 and see if that fails, and then bisect main vs that. But it requires an experienced builder. An alternative is to try all the 8.0.0 alpha and beta versions, and see which one is the first to cause a failure.

I have a vague memory which may be wrong of some revisions of these AI-Thinker boards happening under the same part number.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

jepler commented 1 year ago

@microdev1 is there a possibility you can investigate this? I noticed that the addition of "storage extension" occurred between 8.0.0-beta1 and beta2. This particular board, with 2MB flash, has no OTA partition.