platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
881 stars 592 forks source link

Add other variants of the ESP32-S3 DevKitC (with more flash and with PSRAM) #989

Open EraYaN opened 1 year ago

EraYaN commented 1 year ago

I own a N16R8 version for example

; change flashsize
board_upload.flash_size = 16MB
board_build.partitions = default_16MB.csv

It seems to work. Although pio seems to think that the amount of RAM is 320 KB while the datasheet specifies 512 KB.

And for the PSRAM enabled boards.

build_flags=    
    -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi ; NEEDED FOR PSRAM also dio_qspi/qsi_qspi for other configs

maybe they still need -mfix-esp32-psram-cache-issue but I believe that is ESP32 Rev.0 and Rev.1 only?

All orderable boards seem to be listed here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html#ordering-information

And then https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf lists a few more devices (some of those you might find on third-party versions of the DevKitC like the N16R8 I own (compared to the N16R8V Espressif provides).

Jason2866 commented 1 year ago

IMHO trying too add all available boards and variants is nearly impossible since there already a lot and there will be in near future many many more S3 boards. It would make more sense to add a Board Configurator where to select the options and store this configuration for use. @valeros What are you thinking about?

We had a similar "issue" for project Tasmota, provide support for all devices where Tasmota can run and needs individual configuration. We solved it with a community driven Device Template platform where working configs can be uploaded. By doing this we can provide configs for over 2500 devices. Link to Tasmota template site

valeros commented 1 year ago

@Jason2866 Unfortunately there is no ETA, but quite similar functionality is already in the works. It will allow developers to configure their custom boards from the ground up via some sort of a user-friendly configuration wizard.

EraYaN commented 1 year ago

Have some of the configs pre-filled would be very helpful for beginners/advanced user I feel, before I noticed I needed to set the board_build.arduino.memory_type = qio_op variable I lost about 1 day of my life. So even if we can all design our boards from the ground up, having some pre determined list with everything "just working" would be very helpful.

Jason2866 commented 1 year ago

@EraYaN I do understand this

via some sort of a user-friendly configuration wizard.

is doing exactly that.

codewitch-honey-crisis commented 1 year ago

I don't think you need a wizard, and you still don't have one. What you need are basic board profiles like ESP32-S3 N16R8 vs ESP32-S3 N8R4 etc. It's easy to decode the model number to get the flash size (first number) and PSRAM size (second number, if present). Just make the darn board profiles. If you don't want to do it, then I'll do it, just tell me where to submit the pull request.

A wizard is going to make people madder than your IDE already does, like when it makes you wait forever without telling you what it's doing. We don't need more automagic nonsense that doesn't work half the time, and is black boxed. We need you to update your configuration files.

valeros commented 1 year ago

@codewitch-honey-crisis Feel free to submit a PR directly to this repo.

OmerFarukOruc commented 1 year ago

Have some of the configs pre-filled would be very helpful for beginners/advanced user I feel, before I noticed I needed to set the board_build.arduino.memory_type = qio_op variable I lost about 1 day of my life.

Here I exactly experienced same thing while setting up n32r8 variant. So it would be a cool idea to have a user-friendly config.

thijstriemstra commented 7 months ago

Feel free to submit a PR directly to this repo.

see #1270 for YD-ESP32-S3 board.

Bendikos commented 2 months ago

The model of my development board is "ESP32-S3-WROOM-1-N16R8", which is set as follows in Platformio:

[env:esp32s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
; 指定为16MB的FLASH分区表
board_build.arduino.partitions = default_16MB.csv
; 指定FLASH和PSRAM的运行模式
board_build.arduino.memory_type = qio_opi
; 预定义宏,启用PSRAM
build_flags = -DBOARD_HAS_PSRAM
; 指定FLASH容量为16MB
board_upload.flash_size = 16MB

Reference link: Reference link

Bendikos commented 2 months ago

OmerFarukOruc 板子选择 Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD,No PSRAM) ,再到platformio.ini文件下修改配置。配置如下:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
;lib_ldf_mode = deep+   #在搜索库依赖关系时使用 "深度+" 模式
board_build.arduino.partitions = default_16MB.csv   
board_build.arduino.memory_type = opi_opi   #8MB PSRAM的运行模式
build_flags = -DBOARD_HAS_PSRAM     #用于指示编译器当前的目标设备是否具有 PSRAM
    -mfix-esp32-psram-cache-issue #用于修复 ESP32 上的 PSRAM 缓存一致性问题的编译选项
board_upload.flash_size = 32MB #FLASH大小
#添加的库
; lib_deps = 
;   bblanchon/ArduinoJson@^6.21.2
;   lvgl/lvgl@^8.3.7
;   bodmer/TFT_eSPI@^2.5.30
;   lorol/LittleFS_esp32@^1.0.6     

其中最主要的就是“board_build.arduino.memory_type = opi_opi”,查看官方文档可以发现ESP32的PSRAM的运行模式是有Quad SPI和Octal SPI的区别的,而8M的PSRAM使用的是Octal SPI,默认的Quad SPI是运行不了的。 原文链接:https://blog.csdn.net/kzc1209/article/details/131111920