platformio / platform-espressif32

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

Add board ESP32-S3 PowerFeather #1344

Closed powerfeatherdev closed 2 months ago

powerfeatherdev commented 2 months ago

Adds support for ESP32-S3 PowerFeather (https://powerfeather.dev/). Board uses an 8MB flash, 2MB PSRAM ESP32-S3 module.

Board is supported since Arduino ESP32 2.0.15 release, see merged PRs https://github.com/espressif/arduino-esp32/pull/9325 and https://github.com/espressif/arduino-esp32/pull/9398. Support PR's for the 3.x series has also been merged in https://github.com/espressif/arduino-esp32/pull/8889, https://github.com/espressif/arduino-esp32/pull/9052 and https://github.com/espressif/arduino-esp32/pull/9431 and should be in the next release.

Arduino variant is esp32s3_powerfeather with board name ESP32S3_POWERFEATHER (see https://github.com/espressif/arduino-esp32/blob/master/boards.txt#L35200-L35201)

ESP-IDF is also supported, but pin definitions are in the accompaniment library, powerfeather-sdk.

powerfeatherdev commented 2 months ago

Hi @Jason2866 thank you for the input, as I am unfamiliar with adding new board support for PlatformIO. Is there a guide somewhere (also for adding support for a library: https://github.com/PowerFeather/powerfeather-sdk)?

Jason2866 commented 2 months ago

@powerfeatherdev Just add a library.json and/or library.properties in the repo and it can be used as lib with Platformio.

powerfeatherdev commented 2 months ago

@Jason2866 For the library.properties, is it the same one as the Arduino library specification?

If so, my library already has one when I added Arduino support - but in that case I had to submit it to the Arduino library registry repo. Does that mean all arduino libraries are discoverable by PlatformIO automatically?

Jason2866 commented 2 months ago

No, it is not accessing Arduino registry. But Platformio can use a github repo as lib source. Uploading to Platformio registry is not needed to have access to the library. It can be uploaded to load the lib from the Platformio registry. In this case a library.json has to be added to the package. https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_pack.html

powerfeatherdev commented 2 months ago

@Jason2866 I think I will submit the library to the PlatformIO registry - just makes it easier for the board's users.

Anyways, I resolved your initial comment and also filled in the PR description. PTAL. Thanks for answering my questions!

powerfeatherdev commented 2 months ago

Oh, and one more question @Jason2866, is there a way to specify a board support dependence on a library? I know for libraries you can do that through the library.json file, but for a board support json like this one, is there such a thing?

Jason2866 commented 2 months ago

@powerfeatherdev Not tried, nor does iknow if something like this exists. If you add an entry after URL / Vendor? I added entrys in local boards.json for my use cases and it does not conflict.

powerfeatherdev commented 2 months ago

Hi @Jason2866, that's fine if there's not. Just wondering if there was something like that.

powerfeatherdev commented 2 months ago

@valeros PTAL as well.

powerfeatherdev commented 2 months ago

@valeros, I assume this is waiting until https://registry.platformio.org/tools/platformio/framework-arduinoespressif32 gets updated to 2.0.15+?

valeros commented 2 months ago

@powerfeatherdev That's right.

powerfeatherdev commented 2 months ago

Hi @valeros, I see. Is there a timeline for updating it to 2.0.15+?

valeros commented 2 months ago

Hi @valeros, I see. Is there a timeline for updating it to 2.0.15+?

This or next week should be available in the dev branch.

valeros commented 2 months ago

Hi @powerfeatherdev

I noticed that you enabled the use_1200bps_touch option in the board manifest, while in the boards.txt it's not set. Does this board need that touch procedure?

There is also a discrepancy in PSRAM settings, by default it's disabled in the original Arduino config, but in this PR you added the BOARD_HAS_PSRAM macro.

Which settings are correct?

powerfeatherdev commented 2 months ago

Hi @valeros, I copied the settings from Adafruit ESP32S3 Feather without double checking. Will fix this.

Update: Removed, PTAL.

Jason2866 commented 2 months ago

Just my 2 cents. Before it was correct. Board has PSRAM. Arduino setup is wrong.

powerfeatherdev commented 2 months ago

It seems the definition BOARD_HAS_PSRAM is assosciated with QSPI or OPI PSRAM being selected. Even though board has PSRAM, as I prefer to build without this by default - I'll leave it removed for now. @valeros @Jason2866

valeros commented 2 months ago

Thanks for the PR, merged.