#ESP32 S3 setup issues
1 messages · Page 1 of 1 (latest)
Information so far:
- bought this thing: https://es.aliexpress.com/item/1005005592730189.html
- as far as i could see, it came compeltely blank
- experimental browser installer seems to have flashed a working tinyuf2 on it -- update: replugged USB wire (1st time after flashing the bootloader) and cant see the bootloader storage anymore
- neither of these worked (last one goes back to bootloader after flashing):
time for me to go bed, will probably be back at experimenting in ~15h, thanks in advance for any feedback :)
I left myself some easy to follow instructions on setting up a board using ESPtool from windows CLI. Maybe it'll help. https://github.com/DJDevon3/My_Circuit_Python_Projects/tree/main/Circuit Python Snippets#esptoolpy-for-circuit-python-boards
The issue will be getting a correct fw so it runs on my hardware, not the flashing itself, i believe
Will try some stuff to at least see if i can fully identify the chip tho
elpekenin on Tuesday at 5:10 PM 0.093s RAM: 7/16GB
{ D:易Coding } esptool --chip esp32s3 chip_id
esptool.py v4.6.2
Found 2 serial ports
Serial port COM10
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: -- snip --
Uploading stub...
Running stub...
Stub running...
Warning: ESP32-S3 has no Chip ID. Reading MAC instead.
MAC: -- snip --
Hard resetting via RTS pin...
should i worry about the no Chip ID?
this didnt work at all either, even tho my product's listing also states "N16R8"... https://circuitpython.org/board/yd_esp32_s3_n16r8/
open to ideas, or shall i just check out the labels on MCU, PSRAM and Flash and make some adjustments to compile a custom bin?
I did setup WSL yesterday, took a very very quick look at the build-control files and saw a couple options like "has SPI ram" and whatnot, would i only need to play around with those or perhaps write some actual code too?
okay, compared my pinout with the files for the YD board on the link right above, its almost a 1:1 match, so im hoping the PSRAM and flash also match
updated pins.c and mpconfigboard.h with the suble pin changes and the name of the board
im not too sure what i should do about mpconfigboard.mk and/or sdkconfig
would it even boot if i configure it as "i have no PSRAM"? would at least get one element out of the problem.. for now
what i managed to read:
MCU: ESP32-S3 / S12022 (batch?) / several chars (some serial number?)
Flash: Winbond 25Q128JVSQ
PSRAM: WCH CH340K (i believe, very small text)
The CH340k chip is a USB-serial chip for converting debug UART communication to USB
oops, wrong one then
there's also this big AMS1117 component, but that looks like a voltage regulator to me (and very low pin count to be a PSRAM afaik)
so the two 8-pin chips are as above?
the chip between the two buttons is the CH340K?
yes
is there any chip on the bottom of the board
ok, so I don't think this board has any PSRAM, despite the product listing
seems like so, yeah
If you look on an UnexpectedMaker ESP32-S3 board, it has chips for flash and PSRAM.
This board is a lie, you can spend time getting it to work, but how much is your time worth?
who knows what else might be flaky about it?
better to buy a name-brand board
it's a $5 board, you have spent many hours on this already
oscillator has T400 U15U or something like that... im guessing that means 40MHz, and wouldnt need any changes
yeah, a proper one would be easier and probably not too expensive, but i dont mind fiddling as long as i learn something in the process
may as well just throw it out the window if i get frustrated lol
set CONFIG_ESP32S3_SPIRAM_SUPPORT=n in sdkconfig and comment out or delete all the other SPIRAM and PSRAM lines
in mpconfigboard.mk, the of course set FLASH_SIZE to 16MB, try changing FLASH_FREQ to 40m, and try qio instead of dio. CIRCUITPY_ESP_FLASH_* constants I think are used only for makefile targets. If that is not true,But as I said, I'm not sure these matter for the actual build
CIRCUITPY_ESP_FLASH_SIZE does matter, set that to 16MB. MODE and FREQ are only used as args to esptool flash commands in the Makefile
i just flashed the bootloader produced by this last compilation, how is it supposed to go in bootmode?
tried hold and then connect USB, double tap and pressing reset while holding boot
none of those work?
nop, some misconfig i guess
esptool was cool with it ```
esptool --port COM10 write_flash -z 0x0 ..\bootloader.bin
esptool.py v4.6.2
Serial port COM10
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: ec:da:3b:66:78:20
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00002fff...
Compressed 12208 bytes to 8555...
Wrote 12208 bytes (8555 compressed) at 0x00000000 in 0.2 seconds (effective 420.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
you can forget about the bootloader for now. Just load the circuitpython .bin with something like esptool.py -p /dev/ttyACM0 -b 921600 --before=default_reset --after=no_reset write_flash 0x0000
the bootloader built by the board build is NOT the UF2 bootloader
oh, ok
that is in a separate repo: TinyUF2
thought it was a submodule and the compilation was doing "magic"
allright, "trash" bootloader file that is
yes, do a full erase to get rid of the partition table
in the build directory, try loading firmware.bin. Do not load circuitpython-firmware.bin.
ok
firmware.bin is a combo bin that contains the second stage bootloader and circuitpython, so it can start up. circuitpython-firmware.bin is bare circuitpython
ports/espressif/build-*
that's what i thought but...
elpekenin@elPeCenin:~/micropython/ports/espressif$ ls build-peke_esp32_s3/
autogen_display_resources-en_US.c bindings build-peke_esp32_s3 esp-idf frozen_mpy lib peripherals shared shared-module
autogen_web_workflow_static.c boards common-hal extmod genhdr manifest.py py shared-bindings supervisor
are you building micropython or circuitpython?
circuit, but as i already had a fork of micro, i added a remote and checked out
i have to leave now, will continue messing things up tomorrow, thanks for the help so far ❤️
so did you do ports/espressif/esp-idf/export.sh, and then remove the build directory, and then do make BOARD=.... sure, ttyl 👋
i didnt remove it manually but ran make BOARD=... clean
perhaps that's wrong 😛
fixed it, leaving now (for real this time)
will flash later
Had to change CIRCUITPY_ESPCAMERA from "no" to "0" on mk
that is OK 🙂
on the right path to a custom build. 👍
yay, got a drive to show with boot_out.txt file containing: ```
Adafruit CircuitPython 8.2.0-25-ga2002e364 on 2023-07-19; WeAct ESP32S3-B-N16R8 with ESP32S3
Board ID:peke_esp32_s3
UID:...
there's no "CIRCUITPY" drive at all, tho
did you try the other USB port?
what does RGB flashing yellow on start mean?
let me try
other USB (labeled as UART) doesnt report any MSC
it flashes yellow for 700ms: if you click during that time it will restart into safe mode. It is not an error, just a window of opportunity
ok, didn't know the ports were labeled
if you do import os; os.listdir() does it show any files?
like, on the computer? or connecting to (if it shows up) the REPL
let me try
is there any software/command to connect without having the drive showing?
the VSCode extension i usually use, relies on drive name to get active
on Windows?
LED is flashing green every now and then, good sign?
I like Tera Term: https://ttssh2.osdn.jp/index.html.en
Mu looks for a serial port identifying as a certain name
when the board starts up does a new COM port appear in Device Manager->Ports?
there's a COM10. indeed
so connect to that with Tera Term
Tera Term is nice because it reconnects after a disconnect
if the page decides to (down)load that is
Adafruit CircuitPython 8.2.0-25-ga2002e364 on 2023-07-19; WeAct ESP32S3-B-N16R8 with ESP32S3
>>> import os
>>> os.listdir()
['boot_out.txt', 'System Volume Information']
``` (partial) success
try import storage; storage.erase_filesystem(). It will reboot. It's fishy there is not code.py, etc.
😭 you da best
do you guys have somewhere to donate (other than Github :P) or just through products? being from Spain the page is like 1/4 of the price product(s) and 3/4 shipping 😐
i buy from a spanish retailer every now and then tho
Best way to support Adafruit is by purchasing products from their website.
Contributing your build for the WeAct ESP32-B-N16R8 is also just as appreciated.
Digi-Key and Mouser also stock our products -- maybe a little easier for shipping
it's not actually an R8, mislabeled, I would not encourage purchase of this board
does "R8" have something to do with the metallic enclosing on the MCU? i can see a good old black chip on mine
no idea what the correct name for it is...
Ah another one of those mislabeled clones?
Good news, weact contacted me after posting a review, apparently the chip has 8MB embeded PSRAM, will try compiling with the config they've told me later today
i've been told: "When build the CircuitPython firmware, you may need to change the psram mode to OTC, and then try it out."
but can't find anything about "OTC" on the ports/espressif folder
maybe "octal"?
See the settings for espressif_esp32s3_devkitc_1_n32r8
sdkconfig, like CONFIG_SPIRAM_MODE_OCT=y
I thought OTC meant "on the chip" based on what they told md
i think you might not have to set up
try what they gave youl I don't see an sdkconfig param with "OTC" in the name
They dont give anything
what is the part number on the chip?
based on some comments in a couple of places, I think this will use the octal connect PSRAM. I am looking in the esp-idf repo issues, etc.
I don't think there's a separate setting for "embedded" vs not, but instead it is how it is connected
so the N32R8 example above would be the closest
is there something i can use to see available RAM/check if it is connected?
tbh i dont even knowthe diff between PSRAM and a "regular" RAM
You could try to create a large array or similar. When PSRAM is available the heap is in PSRAM, so create like a 4MB array or bytestring or something
maybe try that on another known-working board with PSRAM too to make sure it will work
asked then on aliexpress messages, lets see if they can provide some information
I flashed another thing (dont recall exact config, and just left home) and could connect through Mu, but drive didnt show after the storage.erase
Saw a table on ESP32S3's datasheet about pins used for SPI into embeded flash/ram and it didnt match what all the configs that i've checked use
Configs use pins 26+30 but table had another values
edit: NVM, pin number vs pin name
PEBCAK most likely, though
The custom firmware i had on it could only bytearray(1024 * 1024 // 4), or was it // 8?....Definitely not 8MB anyway
🥳
Sounds about right 😎 ```py
MB_8TH = 1024 * 1024 // 8
for i in range(8 * 8):
size = int(MB_8TH * i)
try:
foo = bytearray(size)
print(f"Allocated an array of {i/8} MB")
del foo
except:
print(f"Could not allocate {i/8} MB")
break
-- Removed --
Allocated an array of 6.75 MB
Allocated an array of 6.875 MB
Allocated an array of 7.0 MB
Allocated an array of 7.125 MB
Allocated an array of 7.25 MB
Allocated an array of 7.375 MB
Could not allocate 7.5 MB
should i PR files for the board, or rather not? https://github.com/elpekenin/micropython/commit/d4e0919857720da13288c5638460f372e1b05057
I'm not sure about how popular these are: that's my main question. If https://www.digikey.com/en/products/detail/espressif-systems/ESP32-S3-DEVKITC-1-N32R8V/15970965 would be the same for everything but the name, I might want to stick with that board. Maybe I should get one of those and see if your build works.
there are hundreds of clones on AliExpress, and having a bunch of duplicate boards increases our build times without adding a lot -- I'd rather point to an identical build that works.
but if it's different, it could be ok. Let's hold off until maybe we test the Epressif board
32 vs 16 mb flash
But yeah, having a ton of duplication + slowing things down is not the best idea ever, thus the question