Skip to content

arc/soc/esp32s31.hpp ​

Experimental ESP32-S31 target facts.

Fit ​

  • Use it when code needs compile-time target facts, SDK naming boundaries, or public naming rules.
  • Do not start here when runtime board wiring or product policy can express the decision more clearly.
  • Verification focus: keep ESP32-S3 as the stable default and gate ESP32-S31 paths through Arc target selection only.

Arc Contract ​

  • Header: arc/soc/esp32s31.hpp
  • Module group: Target And Naming Contract
  • CMake feature: core
  • Closest example: examples/esp32s31/ptp

Declare arc_requires(main_requires core) in the component that includes this header.

CMake And Include ​

cmake
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/arc-deps.cmake)

arc_requires(main_requires core)

idf_component_register(
    SRCS "app_main.cpp"
    REQUIRES ${main_requires}
)
cpp
#include "arc/soc/esp32s31.hpp"

Source Landmarks ​

Source landmarks: Esp32S31, Api, Arch.

Start From Zero ​

  • Start from the closest example or the root project listed below.
  • Set ARC_IDF_PATH to an ESP32-S31 preview ESP-IDF checkout, run the S31 readiness preflight, then use tools/s31-build.py for the selected Korvo example.
  • Add the include and CMake feature only in the component that owns this lane.
  • Keep board topology, buffers, and ownership in one visible owner type.
  • Move from build proof to hardware proof only after the wiring or runtime dependency is known.

Owner Skeleton ​

cpp
namespace app {
void boot()
{
    // Put board policy, buffer ownership, and failure handling here.
    // Keep Core 1 hot work separate from Core 0 service work.
}
}

extern "C" void app_main()
{
    app::boot();
}

Step-By-Step Check ​

  1. Decide whether this module owns silicon, memory, protocol bytes, or policy only.
  2. Name the owner type once, close to the board topology.
  3. Allocate any DMA or shared buffers before the hardware starts.
  4. Initialize with the recoverable path while bringing up the board.
  5. Switch to the fail-fast path only after the topology is treated as fixed.
  6. Log from Core 0 after the hot path has handed off a compact event or snapshot.

Build Or Example ​

The closest shipped example is examples/esp32s31/ptp.

sh
export ARC_IDF_PATH=/path/to/preview-esp-idf
python3 tools/s31-readiness.py --idf-path "$ARC_IDF_PATH" --require-sdk --format report
python3 tools/s31-build.py --idf-path "$ARC_IDF_PATH" --example ptp --dry-run
python3 tools/s31-build.py --idf-path "$ARC_IDF_PATH" --example ptp
python3 tools/s31-build.py --idf-path "$ARC_IDF_PATH" --example ptp --auto-port --monitor --dry-run
python3 tools/s31-build.py --idf-path "$ARC_IDF_PATH" --example ptp --auto-port --monitor

Runtime Check ​

The build command proves the dependency path. Runtime proof still needs the actual board condition that matches this module: attached device, loopback, radio peer, flash partition, sleep wake source, or captured serial/network output. Do not turn the example command into a performance or hardware claim without that evidence.

Next Reading ​

ESP32-S3 first. ESP-IDF native. Static ownership by default.