Skip to content

Add s3 devkitc 1 n8 #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 10, 2025
Merged

Add s3 devkitc 1 n8 #763

merged 14 commits into from
Jul 10, 2025

Conversation

tyeth
Copy link
Member

@tyeth tyeth commented Jun 26, 2025

Adds No PSRAM variant of the esp32s3 official devkits. The Espressif ESP32-S3 DevkitC-1 N8.
Also includes provision for the psram version, just needs the option specified in arduino ide menu or pio.

Tested saw I2C sensors, via a PlatformIO local build (mentioned in commit title).

Updates build task to have different offsets but same build task as funhouse-noota builds (unnecessary non-harmful lvgl clone, but gets us the zip build + UF2 in one task).

I stuck the built assets (renamed) into the 103 release so I could test the web-native-usb installer for something non-funhouse. Installer now works on staging. I used web-native-usb so that we get the partition set correctly for mass storage and tinyUF2 installed too. It did not work, must have differences in the ci build flags/options.

@tyeth tyeth marked this pull request as ready for review July 7, 2025 23:59
@tyeth tyeth marked this pull request as draft July 8, 2025 10:39
@tyeth
Copy link
Member Author

tyeth commented Jul 8, 2025

I think I now fully understand the issue(s). I've updated the offset in the board def and file size to match the partition I'm using locally (https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/tinyuf2-partitions-8MB-noota.csv).
That partition scheme is not actually an option in the boards.txt from arduino for the devkit.

esp32s3 devkit available partitions (expand)

esp32s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32s3.menu.PartitionScheme.default.build.partitions=default
esp32s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
esp32s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32s3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32s3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32s3.menu.PartitionScheme.minimal.build.partitions=minimal
esp32s3.menu.PartitionScheme.no_fs=No FS 4MB (2MB APP x2)
esp32s3.menu.PartitionScheme.no_fs.build.partitions=no_fs
esp32s3.menu.PartitionScheme.no_fs.upload.maximum_size=2031616
esp32s3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
esp32s3.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32s3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32s3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
esp32s3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
esp32s3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
esp32s3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
esp32s3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
esp32s3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
esp32s3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
esp32s3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app
esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS)
esp32s3.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32s3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32s3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS)
esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
esp32s3.menu.PartitionScheme.rainmaker=RainMaker 4MB
esp32s3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
esp32s3.menu.PartitionScheme.rainmaker.upload.maximum_size=1966080
esp32s3.menu.PartitionScheme.rainmaker_4MB=RainMaker 4MB No OTA
esp32s3.menu.PartitionScheme.rainmaker_4MB.build.partitions=rainmaker_4MB_no_ota
esp32s3.menu.PartitionScheme.rainmaker_4MB.upload.maximum_size=4038656
esp32s3.menu.PartitionScheme.rainmaker_8MB=RainMaker 8MB
esp32s3.menu.PartitionScheme.rainmaker_8MB.build.partitions=rainmaker_8MB
esp32s3.menu.PartitionScheme.rainmaker_8MB.upload.maximum_size=4096000
esp32s3.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS)
esp32s3.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB
esp32s3.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592
esp32s3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS)
esp32s3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB
esp32s3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592
esp32s3.menu.PartitionScheme.app13M_data7M_32MB=32M Flash (13MB APP/6.75MB SPIFFS)
esp32s3.menu.PartitionScheme.app13M_data7M_32MB.build.partitions=default_32MB
esp32s3.menu.PartitionScheme.app13M_data7M_32MB.upload.maximum_size=13107200
esp32s3.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL)
esp32s3.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728
esp32s3.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin
esp32s3.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16
esp32s3.menu.PartitionScheme.zigbee_zczr=Zigbee ZCZR 4MB with spiffs
esp32s3.menu.PartitionScheme.zigbee_zczr.build.partitions=zigbee_zczr
esp32s3.menu.PartitionScheme.zigbee_zczr.upload.maximum_size=1310720
esp32s3.menu.PartitionScheme.zigbee_zczr_8MB=Zigbee ZCZR 8MB with spiffs
esp32s3.menu.PartitionScheme.zigbee_zczr_8MB.build.partitions=zigbee_zczr_8MB
esp32s3.menu.PartitionScheme.zigbee_zczr_8MB.upload.maximum_size=3407872
esp32s3.menu.PartitionScheme.custom=Custom
esp32s3.menu.PartitionScheme.custom.build.partitions=
esp32s3.menu.PartitionScheme.custom.upload.maximum_size=16777216

There is also no tinyuf2.bin for both this board and xiaoS3 in the ardu repo but they do exist.

My temptation is to add the tinyuf2.bin and bootloader-tinyuf2.bin to the boards variants folders, and add the new partitionscheme entries to boards.txt, then PR espressif (but with it in our adafruit repo, main and wipper branches).
I'll use the feathers3 nopsram with the 8mb no-ota partition scheme for tinyuf2:

adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.7MB FATFS)
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-8MB
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2_noota=TinyUF2 8MB No OTA (4MB APP/3.7MB FATFS)
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-8MB-noota
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=4194304
adafruit_feather_esp32s3_nopsram.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"

although it might be a good idea to add these 4mb sizes too as the board is a generic S3 dev module from 4-32mb.

adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FATFS)
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-4MB
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2_noota=TinyUF2 4MB No OTA (2.7MB APP/960KB FATFS)
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-4MB-noota
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=2883584
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"

@tyeth
Copy link
Member Author

tyeth commented Jul 8, 2025

the uf2 installation works (after manually installing tinyuf2), as does the platformIO upload. Flashing the bin at offset 0x0 does not, so I probably need to update the board def to match the non tinyuf2 partition offset/sizes rather than the tinyuf2 csv.
That shouldn't impact the uf2 as the app location should be the same.

@tyeth
Copy link
Member Author

tyeth commented Jul 8, 2025

I should probably migrate this to an issue, and leave it as UF2 only for now. With the instruction to install tinyuf2.
Anyhow, this needs to be saved here for posterity, the esptool usage for writing the partitions, and some later one from feather that includes the tinyuf2 bootloader and app correctly instead.

Details

//FIRST - no erase
// "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.0.dev1/esptool.exe" --chip esp32s3 --port "COM7"
//  --baud 921600  --before default-reset --after hard-reset write-flash  -z --flash-mode keep --flash-freq keep --flash-size keep 
//  0x0 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bootloader.bin" 
//  0x8000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.partitions.bin" 
//  0xe000 "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.1/tools/partitions/boot_app0.bin" 
//  0x10000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bin" 
//
/////
//
//second with erase:
//Global variables use 70892 bytes (21%) of dynamic memory, leaving 256788 bytes for local variables. Maximum is 327680 bytes.
//"C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3/esptool.exe" --chip esp32s3 --port "COM7" 
// --baud 921600  --before default_reset --after hard_reset write_flash -e -z --flash_mode keep --flash_freq keep --flash_size keep 
// 0x0 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bootloader.bin" 
// 0x8000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.partitions.bin" 
// 0xe000 "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3/tools/partitions/boot_app0.bin" 
// 0x10000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bin" 
//
//
//
/////
//
// feather s3 no psram, tinyuf2 8mb 
// FQBN: esp32:esp32:adafruit_feather_esp32s3_nopsram:PartitionScheme=tinyuf2_noota
// Using board 'adafruit_feather_esp32s3_nopsram' from platform in folder: C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3
// Using core 'esp32' from platform in folder: C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3
// cmd /c if exist "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\partitions.csv" COPY /y "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\partitions.csv" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\partitions.csv"
// cmd /c if not exist "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\partitions.csv" if exist "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\adafruit_feather_esp32s3_nopsram\\partitions.csv" COPY "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\adafruit_feather_esp32s3_nopsram\\partitions.csv" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\partitions.csv"
// cmd /c if not exist "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\partitions.csv" COPY "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\tools\\partitions\\tinyuf2-partitions-8MB-noota.csv" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\partitions.csv"
//         1 file(s) copied.
// cmd /c IF EXIST "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\bootloader.bin" ( COPY /y "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\bootloader.bin" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\Wippersnapper_demo.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\adafruit_feather_esp32s3_nopsram\\bootloader-tinyuf2.bin" ( COPY "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\adafruit_feather_esp32s3_nopsram\\bootloader-tinyuf2.bin" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\Wippersnapper_demo.ino.bootloader.bin" ) ELSE ( "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.9.dev3\\esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB -o "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\Wippersnapper_demo.ino.bootloader.bin" "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-489d7a2b-v1\\esp32s3\\bin\\bootloader_qio_80m.elf" ) )
//         1 file(s) copied.
// cmd /c if exist "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\build_opt.h" COPY /y "C:\\Users\\tyeth\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202568-32780-5iy3k3.47wx9\\Wippersnapper_demo\\build_opt.h" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\build_opt.h"
// cmd /c if not exist "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\build_opt.h" type nul > "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\build_opt.h"
// cmd /c type nul > "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48/file_opts"
// cmd /c COPY /y "C:\\Users\\tyeth\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-489d7a2b-v1\\esp32s3\\sdkconfig" "C:\\Users\\tyeth\\AppData\\Local\\arduino\\sketches\\3877E35B659EDD95A7CC52B41DF16F48\\sdkconfig"
//         1 file(s) copied.
// Detecting libraries used...
//No upload port found, using COM7 as fallback
// "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3/esptool.exe" --chip esp32s3 --port "COM7" --baud 921600 
//  --before default_reset --after hard_reset write_flash  -z --flash_mode keep --flash_freq keep --flash_size keep 
//  0x0 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bootloader.bin" 
//  0x8000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.partitions.bin"
//   0xe000 "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3/tools/partitions/boot_app0.bin" 
//   0x10000 "C:\Users\tyeth\AppData\Local\arduino\sketches\3877E35B659EDD95A7CC52B41DF16F48/Wippersnapper_demo.ino.bin" 
//   0x410000 "C:\Users\tyeth\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3/variants/adafruit_feather_esp32s3_nopsram/tinyuf2.bin"
//
```

</p>
</details> 

@tyeth
Copy link
Member Author

tyeth commented Jul 9, 2025

Seems resolved. The merge_bin step was using qio from our board defs, but wasn't acceptable. I copied the dio option from tinyuf2 and now the merge_bin asset seems to work. Tested it flashes to an erased board via IO web installer. did not test secret usage again but should be fine (yellow neopixel shown).

@tyeth tyeth marked this pull request as ready for review July 9, 2025 16:57
@tyeth tyeth requested a review from brentru July 9, 2025 16:58
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyeth approving with the condition that you gotta merge the board def and remove the commented step :)

@tyeth tyeth merged commit 13aa641 into main Jul 10, 2025
39 checks passed
@tyeth tyeth deleted the add-s3-devkitc-1-n8 branch July 11, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants