Skip to content

PlatformIOArduinoQuickStart

Rob Dobson edited this page May 3, 2026 · 3 revisions

PlatformIO / Arduino Quick Start

Note — The recommended way to build a Raft application is with the Raft CLI, which uses ESP IDF directly and gives access to the full Raft build pipeline (SysTypes, file-system images, OTA partitions, WebUI build, etc). The PlatformIO + Arduino path described below is supported as a lightweight option for using parts of RaftCore as a library inside an existing PlatformIO project, but does not provide the full SysType/build-process functionality of the IDF-based flow.

Using RaftCore as a PlatformIO library

Add RaftCore to your platformio.ini lib_deps:

lib_deps =
    https://github.com/robdobsn/RaftCore

To pin to a specific release, append the Git tag:

lib_deps =
    https://github.com/robdobsn/RaftCore#v1.44.1

The other Raft libraries can be added in the same way:

lib_deps =
    https://github.com/robdobsn/RaftCore
    https://github.com/robdobsn/RaftSysMods
    https://github.com/robdobsn/RaftI2C
    https://github.com/robdobsn/RaftWebServer

Toolchain

Raft tracks recent ESP IDF releases (currently ESP IDF v5.5.x). When using PlatformIO with the Arduino framework, choose an arduino-esp32 release that is built against an ESP IDF version compatible with the version of Raft you are using. Consult the arduino-esp32 release notes for the corresponding IDF version.

A typical PlatformIO configuration looks like:

[env:esp32s3]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
lib_deps =
    https://github.com/robdobsn/RaftCore

If you need a specific arduino-esp32 (and therefore IDF) version, follow the PlatformIO documentation for overriding the framework.

Limitations of the PlatformIO/Arduino path

The full Raft build pipeline (described in Raft Build Process) provides several features that are not available when building under PlatformIO/Arduino:

  • SysType resolution and features.cmake library selection
  • Automatic merging of JSON config and generation of headers
  • WebUI build integration
  • Custom partition tables and file-system image generation
  • OTA partition layout

For a full Raft application, use Raft CLI and ESP IDF instead. See Quick Start.

Recommended next steps

  • New to Raft? Start with Quick Start.
  • Want to use RaftCore helper classes (RaftJson, RingBuffer, etc.) inside an existing project? The PlatformIO setup above is sufficient.
  • Need full SysMod / SysManager / publishing / REST API functionality? Use the IDF-based Raft CLI flow.

Clone this wiki locally