---
title: "Real-Time CNC Control with Remora-Core [remora-cnc]"
url: "https://maker.wiznet.io/josephsr/projects/real-time-cnc-control-with-remora-core-remora-cnc/"
markdown_url: "https://maker.wiznet.io/josephsr/projects/real-time-cnc-control-with-remora-core-remora-cnc/md"
type: "UCC: User Created Content"
author: "scottalford75"
author_url: "https://github.com/remora-cnc/remora-core"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "scottalford75"
original_url: "https://github.com/remora-cnc/remora-core"
license: "GNU General Public License, version 3 or later (GPL3+)"
published: "2025-08-27"
language: "en"
hardware: ["WIZnet W5500"]
likes: 0
views: 2786
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Real-Time CNC Control with Remora-Core [remora-cnc]

> Open-source C++ firmware ‘remora‑core’ by remora‑cnc: real‑time control core for custom CNC setups using STM32 or similar microcontrollers.

Original author: scottalford75 (source: https://github.com/remora-cnc/remora-core)

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Documents and links

- [remora-core](https://github.com/remora-cnc/remora-core) (code)

## Article

## Project Introduction: Real-Time CNC Control with Remora Core

### 1. Introduction

CNC control is a core technology in manufacturing and industrial automation.
This project demonstrates how to implement a real-time CNC control environment using an **STM32 microcontroller** and **Remora Core firmware** in an open-source approach.

---

### 2. From NC to CNC

Originally, **Numerical Control (NC)** machines in the 1940s–50s operated from punched tape instructions, moving tools automatically without manual levers. However, modifying or reprogramming was inconvenient.

![Punched tape - Wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Creed_model_6S-2_paper_tape_reader.jpg/250px-Creed_model_6S-2_paper_tape_reader.jpg)

With the rise of computers, NC evolved into **Computer Numerical Control (CNC)**. CAD/CAM software generates G-code programs that CNC controllers interpret, enabling machines to perform precise and complex operations. This evolution dramatically improved **productivity, accuracy, and flexibility**.

![](https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/CNC_machine.jpg/250px-CNC_machine.jpg) ![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Wheel_Machining.jpg/250px-Wheel_Machining.jpg)

---

### 3. CNC Basics

CNC machines move tools across **X, Y, and Z axes** to cut or shape a workpiece.
Stepper or servo motors drive the axes precisely, while the controller interprets G-code commands to generate pulses and manage motion.
In short: **“Computer interprets → Tool moves → Material is shaped.”**

[CNC code example](https://en.wikipedia.org/wiki/Computer_numerical_control#Example)

---

### 4. Project Overview: Remora Core

**Remora** is an open-source CNC firmware enabling **real-time control on low-cost STM32 MCUs**.
It originated as a complement to LinuxCNC for PC-based control, with two goals:

**Deterministic real-time behaviorModular design**

---

### 5. Key Differentiator: Abstraction Layer

The major innovation in **Remora Core** is the introduction of an **abstraction layer**.

**Traditional approach**: Previous Remora firmware implementations were board-specific, with step generators, PWM drivers, and sensors hardcoded for each MCU. This made porting or extending hardware difficult.

**Core approach**: Remora Core separates **what to control** from **how to control it**.

Shared abstract interfaces handle generic logic.

Hardware-specific drivers implement the details.

**Benefits:Reusability** – Core logic can be reused across multiple MCU families.

**Flexibility** – JSON configuration allows modules to be reassigned to threads without recompiling.

**Maintainability** – Hardware changes only require updating the driver layer, not the Core.

Thus, Remora Core evolves from “board-specific firmware” into a **platform with scalability and portability**.

---

### 6. Remora Core Structure

At the heart of the project is **remora.cpp**, which orchestrates the system lifecycle:

Loads JSON configuration and creates modules.

Registers modules to real-time threads.

Initializes interrupts and communication interfaces.

Runs a main loop for host communication and status management.

**Pseudocode overview of the core logic:**

```plaintext
int main() {
  boardInit();    // Initialize board: clock, GPIO, timers, peripherals

  loadConfiguration();    // Load JSON config (modules, parameters, thread assignments)

  for (auto m : ModulesJson) {
    auto mod = createModuleFromJson(m);  // Create module (StepGen, PWM, Encoder, etc.)
    bindToThread(mod, m.Thread);         // Attach module to the specified real-time thread
  }

  initInterrupts();   // Setup hardware interrupts
  initComms();        // Initialize communication channel (SPI, UART, Ethernet, etc.)
  startThreads();     // Launch deterministic real-time threads (servo loop, base loop)

  while (true) {
    serviceComms();   // Handle host communication (e.g., LinuxCNC commands)
    updateStatus();   // Update runtime status flags, feed watchdog
    // Other non-real-time maintenance tasks can go here
  }
}
```

This structure provides clear control of the entire firmware lifecycle:
**Configuration → Module Creation → Threads & Interrupts → Main Loop**.

---

### 7. Achievements, Limitations, and Future Work

**Achievements**

Interrupt-driven design ensures deterministic execution.

Modular structure scales from small DIY CNC setups to multi-axis machinery.

Active GitHub development ensures ongoing improvements.

**Limitations**

Lack of formal performance benchmarks and comprehensive build guides.

Broader MCU support and richer documentation are needed.

**Future Potential**

Related projects like **Remora-NVEM** demonstrated Ethernet-based CNC control using a WIZnet W5500 module, pointing toward distributed, network-enabled CNC systems.

---

### 7.1 SPE Applicability Check

#### Existing CNC Communication (by use case)

**Traditional** → RS-232 / RS-485

Stable but low bandwidth; used mainly for G-code transfer and status reporting.

**Real-time bus** → CAN / CANopen

Reliable for motor drivers and sensors, but bandwidth limited (~1 Mbps).

**High-speed precision** → EtherCAT / Profinet / Modbus-TCP

Industrial Ethernet standards, dominant for multi-axis precision CNC.

**Wireless (auxiliary)** → Wi-Fi, Bluetooth

Rarely used for core control; mostly for monitoring or sensors.

#### SPE Evaluation

**Advantages**

Single pair cable delivers **data + power (PoDL)**.

Higher bandwidth than RS-485/CAN, direct Ethernet compatibility.

Simplified cabling, reduced installation and maintenance costs.

**Limitations**

Lacks proven **hard real-time determinism** compared to EtherCAT/Profinet.

Currently more suitable for **sensors and I/O networks** than core axis control.

✅ **Conclusion**
SPE can effectively replace RS-485 or CAN for **sensor and peripheral networks**, simplifying CNC wiring.
However, for **hard real-time axis control**, **EtherCAT/Profinet remain superior**, while SPE is better viewed as a complementary technology with future growth potential.

---

### 8. Conclusion

**Remora Core is a next-generation CNC control platform built on an abstraction layer.**
It combines low-cost MCU hardware with real-time capability, scalability, and open-source flexibility.
With Ethernet extensions (e.g., W5500) and emerging technologies such as SPE, it shows potential for broader adoption in **smart manufacturing, automation research, and educational CNC systems**.

---

### Author’s Other Repositories & Project Tendencies

The **remora-cnc GitHub organization** currently manages two public repositories:

**remora-core** (C++, GPL-3.0) – actively maintained, last update: **August 23, 2025**.

**Remora-STM32H7xx-PIO** (C language) – last update: **August 10, 2025**.

This activity highlights an ongoing focus on **STM32-based CNC platforms** with modular firmware design, real-time determinism, and GPL-licensed open-source development.

---

### Related Maker Project

A related project on **WIZnet Maker** is titled:
**“Remora – Ethernet NVEM CNC Board / Remora-NVEM”**

Extends Remora firmware to support **Ethernet-based CNC control**.

Uses the **WIZnet W5500** interface on an STM32F207 NVEM board.

Serves as a proof-of-concept for integrating **networked CNC operations** into the Remora framework.

---

### References

GitHub – **Remora-Core repository** (C++, GPL-3.0)
<https://github.com/scottalford75/Remora>

GitHub – **Remora-STM32H7xx-PIO** (C firmware)
<https://github.com/scottalford75/Remora-STM32H7xx-PIO>

WIZnet Maker – **Remora STM32F4xx PIO Port project**
<https://maker.wiznet.io/matthew/projects/remora-stm32f4xx-pio-port/>

WIZnet Maker – **Remora NVEM Ethernet CNC project**
https://maker.wiznet.io/matthew/projects/remora-ethernet-nvem-cnc-board/

CNC Control background – LinuxCNC documentation (Remora plugin context)
http://linuxcnc.org/

---

Source: https://maker.wiznet.io/josephsr/projects/real-time-cnc-control-with-remora-core-remora-cnc/
