ESP32S3 N16R8 TinyUSB Config problem for MIDI

Hi, i’m creating a USB MIDI Controller using an ESP32S3 N16R8.
I tried configuring my board using the Arduino IDE as this:

It’s working well when i upload the sketch to my board.
I’m trying to get it to work on Platform.IO but i don’t find any information on how to fix it. If i upload it using Platform.IO the board is not recognized as a MIDI USB.
I’m using MIDI-OX to verify if the board is detected, using Arduino IDE it’s detected but with platform IO no.

Here’s my platformio.ini content:
[env:adafruit_feather_esp32s3_tft]
platform = espressif32
board = adafruit_feather_esp32s3_tft
framework = arduino
monitor_speed = 115200
build_unflags =
-std=gnu++11
-D ARDUINO_USB_MODE=1
build_flags =
-std=gnu++17
-D USE_TINYUSB=1
-D ARDUINO_USB_MODE=0
-D ARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
adafruit/Adafruit SSD1306@^2.5.15
adafruit/Adafruit GFX Library@^1.12.4
tttapa/Control Surface@^2.1.0
fastled/FastLED@^3.10.3

i tried adding this line to the build flags found in another community post but not working either:
-D CFG_TUSB_CONFIG_FILE="${platformio.home_dir}/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/arduino_tinyusb/include/tusb_config.h"

While i’m at it, is there a documentation to know what build flags are available and what they exactly do ?

Have a great day ! Hope someone can help ^^

Use the newer pioarduino espressif32 platform. This brings you Espressif32 Arduino 3.x.
I’m not sure which board you’re using ESP32-S3-N16R8 or adafruit_feather_esp32s3_tft

Use one of the following platformio.ini’s:

[env:esp32-s3-devkitc1-n16r8]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.35/platform-espressif32.zip
board = esp32-s3-devkitc1-n16r8
framework = arduino
monitor_speed = 115200
build_flags = 
    -DARDUINO_USB_CDC_ON_BOOT=1
lib_deps = 
    adafruit/Adafruit SSD1306@^2.5.15
    adafruit/Adafruit GFX Library@^1.12.4
    tttapa/Control Surface@^2.1.0
    fastled/FastLED@^3.10.3
[env:adafruit_feather_esp32s3_tft]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.35/platform-espressif32.zip
board = adafruit_feather_esp32s3_tft
framework = arduino
monitor_speed = 115200
lib_deps = 
    adafruit/Adafruit SSD1306@^2.5.15
    adafruit/Adafruit GFX Library@^1.12.4
    tttapa/Control Surface@^2.1.0
    fastled/FastLED@^3.10.3
1 Like

It worked with the right board config, i’m using the n16r8. Got confused with the arduino ide when i couldn’t find the right board.

Time to make the midi controller work thank you !
Have a great day.