🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    PlatformIO + pioarduino + M5StickC Plus2: Cannot compile due to I2S v2 API incompatibility

    Scheduled Pinned Locked Moved General
    1 Posts 1 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pmolsen
      last edited by

      I’m using an M5StickC Plus2 and the M5Stack SPK2 Hat (I2S speaker).
      In the Arduino IDE, everything works perfectly using ESP32-audioI2S with Arduino core 3.x.
      Now I’m trying to use PlatformIO with pioarduino (ESP32 core 3.x fork) to get the same audio playback working.

      ❌ Problem
      Compilation fails due to:

      error: 'i2s_chan_handle_t' does not name a type
      This comes from code that uses the new I2S v2 API (i2s_std_config_t, i2s_chan_handle_t, etc.).

      This seems related to PlatformIO’s use of its own build system and lack of ESP-IDF header propagation or mismatched SDKs.

      ⚙️ My Setup
      PlatformIO platformio.ini:
      platform = https://github.com/pioarduino/platform-espressif32.git
      board = m5stick-c
      framework = arduino
      monitor_speed = 115200
      lib_deps =
      https://github.com/m5stack/M5Unified.git#8b25496
      https://github.com/m5stack/M5GFX.git#develop
      arduino-libraries/Arduino_BMI270_BMM150
      paulstoffregen/Mahony
      adafruit/Adafruit Unified Sensor
      adafruit/Adafruit BusIO
      adafruit/Adafruit BMP280 Library
      arduino-libraries/WiFi
      schreibfaul1/ESP32-audioI2S
      m5stack/M5Unified
      🔍 What I've Tried
      Works in Arduino IDE with Arduino core 3.0.0

      Fails in PlatformIO (even with pioarduino)

      Tried modifying library includes to manually pull in ESP-IDF 5 headers — no success
      Tried every other audio library I could find but all fail, both on espressif32 and pioarduino
      💡 Feature Request
      Could you provide:

      Either a backwards-compatible version using the I2S v1 API (e.g., i2s_config_t)

      Or guidance for PlatformIO+pioarduino users to get this compiling?

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post