ESP32: Add a new board

I’d like to figure out how to add support for the new Adafruit ESP32 Feather v2.

It is in this GitHub: GitHub - espressif/arduino-esp32: Arduino core for the ESP32 at: arduino-esp32/variants/adafruit_feather_esp32_v2 at master · espressif/arduino-esp32 · GitHub

I tried adding it to my .ini like this:

platform = espressif32
platform_packages = framework-arduinoespressif32 @
board = adafruit_feather_esp32_v2
upload_port = /dev/cu.SLAB_USBtoUART

But I obviously don’t know what I am doing :slight_smile:
Any help, and an explanation so I can learn more about this, would be appreciated.

The current platform is behind the current version (uses 1.0.6 instead of 2.0.2), and due to the war in Ukraine the developers can’t work on fixing that right now.

However, Jason2866 from Tasmota has created a fork which adds a lot of the needed support at GitHub - Jason2866/platform-espressif32: Tasmota Espressif 32: development platform for PlatformIO. You can use it with platform =

But that still doesn’t solve the problem that the board is not supported in the platform, for which it needs a board JSON file, such as adafruit_feather_esp32_v2.json. One of the files at can be used as templates though and then the file has to be edited with the correct information to make use of the adafruit_feather_esp32_v2 variant folder, in particular, at least the correct ESP32 core type (S2, C3 or whatever) and variant need to be used. This JSON file can then be saved in the boards folder of the project and can then be referred to under its filename (without file extension) in the boards = ... field.

I’m going to try to come up to speed on all this, and maybe I can add what is needed. I am still trying to figure out how all the pieces fit together.

Is there any documentation or a general map of where things are and who is responsible for each? Between Visual Studio Code, PlatformIO, ESP IDF, Arduino, Adafruit (it’s their board), I need to figure out who does what. Platform 2.0.2 seems to have the right entries to allow things to work in Arduino with this new Feather v2 board. So we basically need to move that over to where, PlatformIO or ESP IDF?

I’m a little confused here. Under the platforms supported I see:

I see two entries that are installed. One is for 2.0.2 and one for 3.5.0. You mention above how we need 2.0.2, so this confuses me. Is this a completely different thing? And why are there two?

The Espressif32 can be installed in different versions or even from different sources.The upper one 3.5.0 is the latest stable from GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO. The lower one is from GitHub - Jason2866/platform-espressif32: Tasmota Espressif 32: development platform for PlatformIO. This is correct.

Can you check whether GitHub - maxgerhardt/pio-feather-esp32-v2: Test project for Adafruit's Feather ESP32 V2 in PlatformIO works?

It works!

Is the trick to add the adafruit_feather_esp32_v2.json file to my project?

The entire platformio.ini and boards/ folder is important for that to work. Specifically, having a boards/ folder in the project with the adafruit_feather_esp32_v2.json file so that board = adafruit_feather_esp32_v2 becomes usable, as well as platform = and platform_packages = framework-arduinoespressif32@ is needed.

It is working in my project too. I had already tried adding

platform = 
platform_packages = framework-arduinoespressif32@

to my .ini. But your .json file (and the board folder) is what I needed. Thank you so very much!