Skip to content
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

feat: add support for ESP32-S3-WROOM-1-N16R8 #1383

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

BA7LYA
Copy link

@BA7LYA BA7LYA commented May 24, 2024

Add support for ESP32-S3-WROOM-1-N16R8 module.

datasheet

Signed-off-by: BA7LYA <1042140025@qq.com>
Copy link

@thijstriemstra thijstriemstra left a comment

Choose a reason for hiding this comment

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

works for me.

@naschpitz
Copy link

naschpitz commented Jun 2, 2024

Sorry for my ignorance, but why is the maximum_ram_size so large? Shoudn't it be just 512 KB? The other 8 MB aren't exatcly RAM, I guess, as it can't be used as stack memory, only as heap memory by calling ps_malloc().

There is already a file called 4d_systems_esp32s3_gen4_r8n16.json that seems to be very similar to the ESP32-S3-WROOM-1-N16R8 board, there the maximum_ram_size = 327680 (I believe some 192 KB are reserved to the system?).

@Bendikos
Copy link

Bendikos commented Jun 4, 2024

Development version model: ESP32-S3-WROOM-1-N16R8, platformio.ini configuration is as follows:

[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

]
],
"mcu": "esp32s3",
"variant": "esp32_s3_wroom_1_n16r8"

Choose a reason for hiding this comment

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

Using this board file in my own projects let #include <Arduino.h> lead to this error:
framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory.

If I replace the variant name esp32_s3_wroom_1_n16r8 by esp32s3, my projects compile!

Choose a reason for hiding this comment

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

Same behaviour here, trying to compile for Firebeetle2 N16R8; not sure if by setting it as esp32s3 we are "missing some cool optimization" or so

"-DBOARD_HAS_PSRAM",
"-DARDUINO_ESP32_S3_N16R8",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1",
Copy link

@chrBrd chrBrd Jun 28, 2024

Choose a reason for hiding this comment

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

-DARDUINO_USB_CDC_ON_BOOT=1 probably shouldn't be enabled at this level, but in platformio.ini if it's needed.

I'm using this chip on an ESP32-S3-DevKitC-1. If this flag is included then I have to hold down the 'Boot' button and press 'Reset' every time I want to reflash. If this flag is removed then I can just 'Upload and Monitor' as normal.

Choose a reason for hiding this comment

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

-DARDUINO_USB_CDC_ON_BOOT=1 probably shouldn't be enabled at this level, but in platform.io if it's needed.

Same for -DARDUINO_USB_MODE=1 !

"bluetooth",
"wifi"
],
"debug": {
Copy link

Choose a reason for hiding this comment

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

This section should include:

    "default_tool": "esp-builtin",
    "onboard_tools": [
      "esp-builtin"
    ],

to enable the built-in debugger.

"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 460800
Copy link

Choose a reason for hiding this comment

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

This can safely be set to 921600 bauds.

@trip5
Copy link

trip5 commented Oct 1, 2024

All these changes look good and I can get programs to compile and upload with all of the suggestions. What's the hold up on getting it approved? Is it because @BA7LYA hasn't been active since July?

BA7LYA added 2 commits October 8, 2024 19:58
Signed-off-by: BA7LYA <1042140025@qq.com>
@sivar2311
Copy link

If this gets merged, what about all the other available ESP32-S3 configurations?

I would recommend using the default ESP32-S3 DevKit C and make the necessary modifications in platformio.ini.

See https://github.com/sivar2311/ESP32-S3-PlatformIO-Flash-and-PSRAM-configurations

@trip5
Copy link

trip5 commented Dec 10, 2024

Oh wow. @sivar2311 your documentation has improved even more since last I checked. You've got them all!! ...and I only have the N16R8 but that still looks incredibly useful... This seems like a very good solution for everyone...!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants