eFlow — Visual Programming
Build Firmware
Without Writing Code
eFlow is EmbeddedOS's visual block programming environment. Drag GPIO, timer, AI, and protocol blocks onto a canvas, connect them with wires, and eFlow generates production-ready C code that runs on any EoS-supported board.
What is eFlow?
Block-Based
Every hardware capability is a block: GPIO, UART, I²C, SPI, ADC, PWM, timers, AI inference, PID controllers, filters. Drag them onto the canvas.
Wire-Connected
Draw wires between output ports and input ports. eFlow validates type compatibility in real time — you cannot connect incompatible blocks.
Generates Real C
Click Generate and eFlow produces readable, HAL-idiomatic C code. No obfuscated output — you can read, modify, and extend the generated code.
Example: Temperature Sensor → UART Output
- Periodic Timer1000ms
- I²C ReadBME280 0x76
- Kalman Filternoise reduction
- Threshold> 30°C alert
- UART Write115200 baud
↓ eFlow generates this C code ↓
void sensor_task(void *arg) {
eos_i2c_init(I2C1, 400000);
eos_kalman_t kf = eos_kalman_init(0.1f, 1.0f);
while (1) {
float raw = bme280_read_temp(I2C1, 0x76);
float filtered = eos_kalman_update(&kf, raw);
if (filtered > 30.0f) {
eos_uart_printf(UART1, "[ALERT] Temp=%.1f°C\n", filtered);
} else {
eos_uart_printf(UART1, "Temp=%.1f°C\n", filtered);
}
eos_task_delay_ms(1000);
}
}The 8-Step eFlow Pipeline
- 01
Design
Open eFlow in your browser or via ebuild eflow open. Drag blocks from the palette onto the canvas.
- 02
Connect
Draw wires between block output ports and input ports. eFlow validates type compatibility in real time.
- 03
Configure
Click any block to set its parameters: pin numbers, baud rates, thresholds, model paths, timer intervals.
- 04
Simulate
Click Run in eFlow to simulate the block diagram in-browser. Virtual GPIO pins respond, UART output appears in the console.
- 05
Generate
Click Generate Code. eFlow produces a complete, readable C source file that uses the EoS HAL — no magic, no black box.
- 06
Build
ebuild build compiles the generated code. The output is a standard .elf / .bin firmware image.
- 07
Validate
ebuild analyze runs stack depth analysis, MISRA checks, and memory overlap detection on the generated firmware.
- 08
Deploy
ebuild flash writes the firmware to your board via JTAG, SWD, or USB bootloader. ebuild monitor shows live output.
Block Library
GPIO Output
Drive a pin HIGH or LOW. Connects to Timer or Logic blocks.
eos_gpio_write(GPIO_PA5, HIGH);
GPIO Input
Read a pin state. Outputs 0 or 1 to downstream blocks.
uint8_t v = eos_gpio_read(GPIO_PC13);
UART Write
Send a string or formatted value over UART.
eos_uart_printf(UART1, "val=%d\n", x);
ADC Read
Sample an analog pin in millivolts (0–3300mV).
uint32_t mv = eos_adc_read_mv(ADC1_CH0);
PWM Output
Set duty cycle (0–100%) on a PWM channel.
eos_pwm_set_duty(PWM_CH0, duty);
Periodic Timer
Fires an output signal at a fixed interval (ms). Drives loops.
eos_task_delay_ms(500);
One-Shot Timer
Fires once after a delay, then stops.
eos_timer_once(1000, callback);
Watchdog
Resets the device if not kicked within the timeout period.
eos_wdt_kick();
If / Else
Branches the data flow based on a condition.
if (condition) { ... } else { ... }Counter
Increments on each input pulse. Resets at a configurable limit.
static uint32_t count = 0; count++;
Threshold
Outputs 1 when input exceeds a value, 0 otherwise.
output = (input > threshold) ? 1 : 0;
Map / Scale
Linearly maps an input range to an output range.
out = (in - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
I²C Read
Read N bytes from a device register over I²C.
eos_i2c_read(I2C1, addr, reg, buf, len);
I²C Write
Write bytes to a device register over I²C.
eos_i2c_write(I2C1, addr, reg, data, len);
SPI Transfer
Full-duplex SPI transaction.
eos_spi_transfer(SPI1, tx, rx, len);
CAN Frame
Send or receive a CAN bus frame.
eos_can_send(CAN1, id, data, dlc);
TFLite Infer
Run a TFLite model on input tensor. Outputs classification or regression result.
eai_infer(model, input_tensor, output_tensor);
FFT
Fast Fourier Transform on a float array. Outputs frequency spectrum.
eos_fft(samples, N, output_spectrum);
PID Controller
Classic PID loop with configurable Kp, Ki, Kd.
float out = eos_pid_update(&pid, setpoint, measured);
Kalman Filter
1D Kalman filter for sensor fusion and noise reduction.
float est = eos_kalman_update(&kf, measurement);
Real-World Use Cases
Sensor Data Pipeline
Read a BME280 temperature sensor over I²C every 1 second, apply a Kalman filter, and send the result over UART. No manual register manipulation needed.
- Periodic Timer (1000ms)
- I²C Read (BME280, 0x76)
- Kalman Filter
- UART Write
Motor Speed Controller
Read encoder pulses on a GPIO interrupt, compute RPM, run a PID loop against a setpoint, and output the corrected duty cycle to a PWM channel.
- GPIO Input (encoder)
- Counter
- Map / Scale
- PID Controller
- PWM Output
Edge AI Classifier
Sample an ADC microphone at 16kHz, run FFT to extract frequency features, feed into a TFLite keyword-spotting model, and toggle a GPIO on detection.
- ADC Read (16kHz)
- FFT (512 samples)
- TFLite Infer
- Threshold
- GPIO Output
CAN Bus Gateway
Receive CAN frames from a vehicle bus, parse the payload, apply a threshold check, and relay filtered data over UART to a host computer.
- CAN Frame (receive)
- If / Else
- Threshold
- UART Write
eFlow vs Writing C Directly
| Aspect | eFlow (Visual) | Manual C |
|---|---|---|
| Learning curve | Visual — no embedded C knowledge needed to start | Requires understanding of MCU datasheets, HAL APIs, and RTOS concepts |
| Best for | Prototyping, teaching, standard I/O patterns, sensor pipelines | Custom drivers, performance-critical code, complex state machines |
| Code quality | Generated code is readable, HAL-idiomatic C — same quality as hand-written | Full control over every line |
| Debugging | Visual simulation in-browser before flashing | GDB + hardware debugger |
| Extensibility | Custom blocks can be written in C and imported into eFlow | Unlimited — write anything |
| CAD integration | Pin names auto-populated from BSP / KiCad schematic | Manual pin assignment from datasheet |
Tip: Start with eFlow to prototype quickly, then use "Export to C" to get the generated code and extend it manually for performance-critical sections.
CAD + eFlow Integration
- 1
Import Schematic
Run ebuild cad analyze my-board.kicad_sch. ebuild reads your KiCad schematic and extracts all MCU pin assignments.
- 2
Auto-Populated Blocks
Open eFlow. Every GPIO, UART, SPI, and I²C block is pre-configured with the correct pin names from your schematic (e.g. UART_TX = PA9).
- 3
Simulate Your Real Board
Run the simulation. Virtual peripherals match your actual schematic — the BME280 on I²C1 address 0x76 responds exactly as it will on real hardware.
Ready to Try eFlow?
Open the interactive simulator and run an eFlow block diagram in your browser — no install required.