forte4esp32 is an ESP32-S3 adaptation of Eclipse 4diac FORTE based on ESP-IDF v6.0.
It provides a usable baseline for running FORTE on ESP32-S3 with 4diac IDE 3.1, including deploy/monitor workflow, GPIO-backed stdfblib/io support, and boot-file persistence through SPIFFS.
This repository keeps the upstream 4diac-forte submodule unmodified and limits the validated baseline to ESP32-S3.
The intended workflow for a developer is:
- install ESP-IDF
v6.0with Espressif IDF Manager - clone this repository with submodules
- open the repository root in VS Code
- install and configure the ESP-IDF VS Code extension
- select the ESP-IDF
v6.0environment for this workspace - build, flash, and monitor from VS Code
- adjust runtime settings through
menuconfigwhen needed
Typical clone command:
git clone --recurse-submodules git@github.com:skawu/forte4esp32.git
The current main branch has been verified to:
- build and flash on ESP32-S3 with ESP-IDF v6.0
- bring up Wi-Fi station mode and acquire an IP address
- start a FORTE runtime instance on the ESP32
- listen for 4diac IDE management connections on
0.0.0.0:61499 - deploy 4diac IDE demo projects
- exchange runtime data through multicast and unicast demo variants
- run GPIO loopback validation through
stdfblib/ioIX/IE/QX - expose GPIO-backed
IB/QB/IW/QW/ID/QD/IL/QLprocess interfaces for multi-bit digital IO - optionally autoload a pre-provisioned FORTE boot file from SPIFFS on startup
- automatically restart the FORTE runtime if it is remotely stopped
Release intent for v1.0.0:
- freeze the current ESP32-S3 + ESP-IDF
v6.0baseline - keep the upstream
4diac-fortesubmodule unmodified - ship the currently verified
stdfblib/events,stdfblib/net, and GPIO-backedstdfblib/iosubset - document current limits explicitly instead of expanding scope further before release
components/forte/ESP32 integration layer and FORTE component wrappercomponents/forte/third_party/4diac-forte/upstream 4diac FORTE submodulecomponents/forte/platform/esp32/esp32_forte_sources.cmakesource manifest for the ESP32 buildmain/application entry point and optional Wi-Fi bring-uppartitions.csvcustom partition table sized for the current FORTE imagesdkconfig.defaultsdefault flash and partition settingsexamples/committed 4diac IDE demo projectsdocs/detailed 4diac IDE workflow and integration notes including adaptation status, release notes, and engineering-readiness planning
This repository is licensed under Apache-2.0 for the code and documentation maintained in this repository.
The upstream submodule at
components/forte/third_party/4diac-forte/ keeps its own upstream license and
is not relicensed by this repository.
- target board: ESP32-S3
- flash size: 16MB
- partition table: custom
partitions.csv - validated ESP-IDF version:
v6.0
This repository is intended to work directly from VS Code after the ESP-IDF
extension is installed and bound to ESP-IDF v6.0.
Typical VS Code flow:
ESP-IDF: Select PortESP-IDF: Set Espressif Device Target->esp32s3ESP-IDF: SDK Configuration Editor (Menuconfig)ESP-IDF: Build your projectESP-IDF: Flash your projectESP-IDF: Monitor your device
The validated defaults are already carried in:
sdkconfig.defaultssdkconfig.release.defaultspartitions.csv
Use sdkconfig.defaults as the development baseline.
Use sdkconfig.release.defaults as an overlay when evaluating a tighter
release-oriented build profile, for example:
idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults" build
For a first successful run on a fresh machine:
- clone the repository with submodules
- open the repository in VS Code
- make sure the ESP-IDF extension is using ESP-IDF
v6.0 - select target
esp32s3 - select the serial port of the board
- open
menuconfig - if Wi-Fi startup is needed, fill in the Wi-Fi settings under
WiFi Configuration - build
- flash
- open the serial monitor
Typical success indicators:
Wi-Fi connected, got IP: ...FORTE global initialization completeFORTE instance started on 0.0.0.0:61499CBSDSocketInterface: Opening TCP-Server connection at: 0.0.0.0:61499
If Wi-Fi is disabled, the Wi-Fi log line is absent, but the FORTE startup lines should still appear.
Wi-Fi station startup is controlled through menuconfig.
Path:
WiFi Configuration
Required settings:
Enable Wi-Fi station bring-up before starting FORTEWi-Fi SSIDWi-Fi password
Optional diagnostics:
Enable verbose Wi-Fi diagnostics
Keep verbose Wi-Fi diagnostics disabled for normal use. Enable it only for troubleshooting.
The repository includes complete 4diac IDE projects here:
examples/DistributedBlink/DistributedBlink.sysexamples/IOByteLoopback/IOByteLoopback.sysexamples/IOEventInput/IOEventInput.sysexamples/IODigitalLoopback/IODigitalLoopback.sysexamples/SingleDeviceBlink/SingleDeviceBlink.sysexamples/UnicastBlink/UnicastBlink.sysexamples/DistributedBlink/README.mdexamples/DistributedBlink/README_CN.mdexamples/IOByteLoopback/README.mdexamples/IOByteLoopback/README_CN.mdexamples/IOEventInput/README.mdexamples/IOEventInput/README_CN.mdexamples/IODigitalLoopback/README.mdexamples/IODigitalLoopback/README_CN.mdexamples/SingleDeviceBlink/README.mdexamples/SingleDeviceBlink/README_CN.mdexamples/UnicastBlink/README.mdexamples/UnicastBlink/README_CN.md
Detailed 4diac IDE workflow documents:
docs/README.mddocs/cn/README.mddocs/getting_started.mddocs/cn/getting_started.mddocs/esp32_4diac_v31_tutorial.mddocs/cn/esp32_4diac_v31_tutorial.mddocs/4diac_ide_workflow.mddocs/cn/4diac_ide_workflow.mddocs/boot_file_autoload.mddocs/cn/boot_file_autoload.mddocs/custom_fb_workflow.mddocs/cn/custom_fb_workflow.mddocs/port_status.mddocs/cn/port_status.mddocs/known_limitations.mddocs/cn/known_limitations.mddocs/release_checklist.mddocs/cn/release_checklist.mddocs/release_notes_v1.0.0.mddocs/cn/release_notes_v1.0.0.md
Preferred demos:
DistributedBlinktwo runtimes, multicast transport,PUBLISH_1 / SUBSCRIBE_1IOByteLoopbackone runtime,QB/IBbyte-wide GPIO loopback validationIOEventInputone runtime,IE.INDinput-event validation through GPIO loopbackIODigitalLoopbackone runtime, GPIO loopback validation witheclipse4diac::io::QXandIXSingleDeviceBlinkone runtime, no inter-device communicationUnicastBlinktwo runtimes, TCP point-to-point transport,SEND_RECV_1_1
Naming note:
- repository examples use functional names without the Test suffix
This ESP32 port currently supports a GPIO-backed subset of
stdfblib/io:
eclipse4diac::io::IXeclipse4diac::io::IEeclipse4diac::io::QXeclipse4diac::io::IBeclipse4diac::io::QBeclipse4diac::io::IWeclipse4diac::io::QWeclipse4diac::io::IDeclipse4diac::io::QDeclipse4diac::io::ILeclipse4diac::io::QL
Supported PARAMS formats:
'<gpio_num>''GPIO_NUM=<gpio_num>'- optional flags:
'INVERT=1','PULLUP=1','PULLDOWN=1' 'GPIO_NUMS=<gpio0>|<gpio1>|...|<gpioN>''GPIO_BASE=<gpio_start>,WIDTH=<bit_width>'
Current width expectations:
IX/IE/QXuse exactly 1 GPIOIB/QBuse exactly 8 GPIOsIW/QWuse exactly 16 GPIOsID/QDuse exactly 32 GPIOsIL/QLuse exactly 64 GPIOs
Bit ordering is LSB-first:
- the first configured GPIO maps to bit 0
- the second configured GPIO maps to bit 1
- and so on
Current input-event behavior:
IX/IB/IW/ID/ILupdate theirINoutputs onREQIX/IB/IW/ID/IL/IEalso emitINDon detected input changes- GPIO-backed input change detection is currently poll-based, not hardware-interrupt-based
The runtime implementation is board-agnostic. The validated board-level
loopback demo in this repository currently uses ESP32-S3-DevKitM-1 with:
QX.PARAMS = 'GPIO_NUM=35'IX.PARAMS = 'GPIO_NUM=36,PULLUP=1'
According to the official 4diac FBDK/IP documentation:
PUBLISH_1 / SUBSCRIBE_1use UDP multicast- the ID should be a multicast address such as
239.0.0.1:61000
Sources:
- https://eclipse.dev/4diac/doc/communication/fbdkip.html
- https://eclipse.dev/4diac/doc/tutorials/distribute4diac.html
Practical implication:
DistributedBlinkstays multicast-basedUnicastBlinkexists as a separate topology-friendly alternative
The ESP32 FORTE task runs under a simple supervisor loop.
If a remote management action stops the runtime:
- the current FORTE status is logged
- the task waits 1 second
- the runtime is started again
- 4diac IDE deploy and monitoring work against the validated runtime
- the remote runtime may still be explicitly stopped by management-side actions
- the ESP32 automatically recovers by restarting FORTE
- multicast behavior depends on the network topology
- 4diac IDE deploy is session-based and is not persisted across power cycles unless boot-file autoload is explicitly enabled and a boot file has been provisioned into SPIFFS
- the current validated image fully occupies IRAM under ESP-IDF
v6.0; this is a release risk and should be treated as a hard limit forv1.0.0
The minimum validation target for v1.0.0 is:
- clean build on ESP-IDF
v6.0 - flash and runtime startup on ESP32-S3
- 4diac IDE deploy using
SingleDeviceBlink - 4diac IDE monitor using
SingleDeviceBlink - GPIO loopback validation using
IODigitalLoopback - boot-file export and boot-file autoload validation
This repository now includes a phase-1 persistent startup path for FORTE:
- optional SPIFFS-backed boot-file autoload on startup
- default boot-file path:
/spiffs/forte.fboot - provisioning source directory:
components/forte/bootfs/
Scope:
- supported: autoloading a pre-provisioned boot file during startup
- supported: optional HTTP upload of a generated
.fbootinto SPIFFS - not yet supported: automatically converting a live 4diac IDE deploy into a boot file and saving it back into Flash
See:
docs/boot_file_autoload.mddocs/cn/boot_file_autoload.md