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

    Seeking PlatformIO Example for ESP-IDF on M5 PaperS3 (Non-Arduino)

    Scheduled Pinned Locked Moved PRODUCTS
    5 Posts 3 Posters 4.3k Views
    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.
    • S Offline
      sok
      last edited by

      Hi everyone,

      I’m trying to start a project using the M5 PaperS3 with ESP-IDF (without Arduino) in PlatformIO, but I’m struggling to set up the platformio.ini configuration correctly.

      Could anyone share a minimal test project or an example platformio.ini file for the M5 PaperS3 using ESP-IDF? I’ve reviewed PlatformIO’s documentation and existing examples, but they focused on Arduino project.

      1 Reply Last reply Reply Quote 0
      • P Offline
        peolsolutions
        last edited by

        To set up PlatformIO with ESP-IDF for M5 PaperS3, create a new project in PlatformIO, selecting ESP32 as the board and ESP-IDF as the framework. In platformio.ini, specify the M5 PaperS3 board. Install ESP-IDF if not already done. Write your application code in main.c or main.cpp to interact with the M5 PaperS3’s display or other features. Build and upload the code using PlatformIO’s interface for development.

        S 1 Reply Last reply Reply Quote -1
        • S Offline
          sok @peolsolutions
          last edited by sok

          @peolsolutions
          Thank you for your patience. Let me clarify the core issue to ensure we’re aligned:

          1. ESP32-S3 architecture(not generic ESP32),
          2. ESP-IDF framework (no Arduino framework),
          3. M5PaperS3 libraries from M5Paper S3 docs page

          What I’ve already try:

          • Followed M5Stack’s docs, but their examples for Arduino platform and lack S3-specific configurations.
          • Try combining board = esp32-s3-devkitc-1 (as in M5 Core S3 docs) with espidf and M5GFX & epdiy libraries in platformio.ini file.

          So:
          If anyone has successfully linked ESP-IDF, ESP32-S3, and M5PaperS3 libraries in PlatformIO, could you share:

          1. Your platformio.ini
          2. Any critical patches or forks of M5GFX/epdiy required for ESP-IDF compatibility.
          3. A minimal project (even just initializing the e-paper display) to start development under board.
          1 Reply Last reply Reply Quote 0
          • S Offline
            sok
            last edited by

            Hello everyone,

            I’ve narrowed down my compilation issue to the epdiy library when working with ESP-IDF on the M5PaperS3 (ESP32-S3). Here’s my setup and error details:

            Configuration Without epdiy (Compiles Successfully):

            [env:esp32-s3-devkitm-1]
            platform = espressif32
            board = esp32-s3-devkitm-1
            framework = espidf
            board_upload.flash_size = 16MB
            board_upload.maximum_size = 16777216
            board_build.arduino.memory_type = qio_opi
            build_flags = -DBOARD_HAS_PSRAM

            Add epdiy dep(Compilation fails):
            lib_deps =
            epdiy=https://github.com/vroland/epdiy.git

            Error:
            Multiple ways to build the same target were specified for: /epdiy/output_common/lut.o
            (from ['/epdiy/src/output_common/lut.S'] and from ['/epdiy/src/output_common/lut.c'])

            F 1 Reply Last reply Reply Quote 0
            • F Offline
              fonix232 @sok
              last edited by

              @sok Your config is mostly correct. However, due to some changes in EPDiy make it incompatible with regular library import - you need to add is as an ESP-IDF component to the project.

              This sadly at the moment isn't too straightforward to do - you need to manually clone the git repo into your project's components folder (and potentially create it if it doesn't exist, it's not a default folder created by the PIO init command), and add its path to the root CMakeLists.txt

              Here is an example repo and project. I recommend focusing on the aforementioned components folder and CMakeLists.txt (specifically the list(APPEND EXTRA_COMPONENT_DIRS part of the latter).

              Alternatively, you can use M5Unified as a lib_dep.

              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