circuitpython: bootloader problems when porting new ESP32S3 board to CP

We’ve been porting a new board to CP following these instructions: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython

We rebuilt and flashed CP for an existing board (the ESP32S3 Feather with 4mb flash 2mb psram) and verified that it worked fine, but now that we’re porting to our own board (that uses ESP32S3 8mb flash / 8mb psram) we’re seeing a bootloop early in the boot process, e.g.:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378054
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fce3808,len:0x68
load:0x403c9700,len:0x980
load:0x403cc700,len:0x25a0
entry 0x403c98a4
ESP-ROM:esp32s3-20210327
... (loops) ...

We also tried porting tinyuf2 from https://github.com/adafruit/tinyuf2 but this time we don’t get as far as presenting as a USB device, e.g.:

[Jan 9 11:57] usb 1-2.1.4: USB disconnect, device number 35
[ +0.649994] usb 1-2.1.4: new full-speed USB device number 36 using xhci_hcd
[ +0.288069] usb 1-2.1.4: device descriptor read/64, error -32
[ +0.396033] usb 1-2.1.4: device descriptor read/64, error -32
[ +0.415971] usb 1-2.1.4: new full-speed USB device number 37 using xhci_hcd
[ +0.568096] usb 1-2.1.4: device descriptor read/64, error -32
[ +0.415989] usb 1-2.1.4: device descriptor read/64, error -32
[ +0.108353] usb 1-2.1-port4: attempt power cycle
[ +0.607433] usb 1-2.1.4: new full-speed USB device number 38 using xhci_hcd
... (repeats) ...

We’ve tried to verify config by copying from other boards with similar setup, and tried various config options, but no luck…

Any ideas about what to try next?

Thanks for all the great docs! A couple of suggestions for https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython

Thanks! Hamish

PS Our fork is here: https://github.com/hamishcunningham/circuitpython and the diffs to main are here: https://github.com/adafruit/circuitpython/compare/main...hamishcunningham:circuitpython:unphone

PPS Our board is described here:

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (3 by maintainers)

Most upvoted comments

Aha, I tweaked some more pindefs and now it works! Whahey! Adafruit CircuitPython 8.0.0-beta.6-38-gfd7f36ee69-dirty on 2023-01-15; unPhone with ESP32S3 THanks for your help, much appreciated 😃

Given that I’ve done a “make all” and a .uf2 has been generated and then (I think) combined with the (first stage?) bootloader.bin, does that mean I’m now running UF2, or is that another step?

Thanks again!