Yacubane / esp32-arduino-matter

Matter IoT protocol library for ESP32 working on Arduino framework
Apache License 2.0
298 stars 29 forks source link

Explain how to configure PlatformIO in more detail #31

Closed richievos closed 1 year ago

richievos commented 1 year ago

Supporting PlatformIO is great, but the current instructions aren't super clear on what you're supposed to do. In general a full example project would be super helpful, and/or a platformio.ini example.

Some specifics:

  1. Use espressif32 platform at version v6.1.0
    • would be great to show how to pin that
  2. Turn on C++17 support, by setting build_unflags=-std=gnu++11 and build_flags=-std=gnu++17
    • relatively straightforward
  3. Download and put library into lib folder of project (⚠️ you cannot use lib_deps in platformio.ini, because this repository does not contain binaries due to too big size)
    • it's not clear what you're supposed to put in the lib folder. Eg do you put the entire contents of the folder, or just the src folder, or ...
    • I'm 90% sure it's the entire folder
  4. Choose larger partition scheme, for example board_build.partitions=min_spiffs.csv
    • would be helpful to know what that config does, and where someone finds various csv options, and if that file is actually needed to exist on the filesystem or if it's a magic string
  5. Run example sketch
    • straightforward

I'll volunteer to document that once I figure it out, but I'm currently not super clear what the steps are supposed to be, and I'm not clear if my setup is causing #29 or if I'm setting it up properly.

Yacubane commented 1 year ago

Hey, thank you for valuable feedback. I'm at progress of updating all dependencies and recompiling library so maybe it would be a good opportunity to refactor readme ;)

richievos commented 1 year ago

For the next person, in the meantime:

[env:esp32devarduino]
platform = espressif32@6.1.0
board = esp32dev
framework = arduino

board_build.partitions=min_spiffs.csv

build_unflags =
    '-std=gnu++11'

build_flags =
    '-std=gnu++17'
Yacubane commented 1 year ago

I added more info about platformio setup in readme.md