Ready-to-build sample projects for CANoopEn, the CANopen stack in modern, object-oriented C++ by Xyntos GmbH. The stack is included as a git submodule — clone recursively:
git clone --recurse-submodules https://github.com/xyntos-ch/canoopendemo.gitNew to CANoopEn? Start with the Quick Start Guide — from clone to a live CANopen node on an ST NUCLEO-C092RC board in about half an hour.
| Sample | Role | Profile | Platform | Target |
|---|---|---|---|---|
Samples/CanOpenClient/CiA401/BareMetal |
Slave (generic I/O) | CiA 401 | Bare-metal main loop | NUCLEO-C092RC |
Samples/CanOpenClient/CiA401/FreeRTOS |
Slave (generic I/O) | CiA 401 | FreeRTOS | NUCLEO-C092RC |
Samples/CanOpenClient/CiA401/Linux |
Slave (generic I/O) | CiA 401 | Linux / SocketCAN | Any Linux machine |
Samples/CanOpenClient/CiA417/BareMetal |
Slave (lift call panel) | CiA 417 | Bare-metal main loop | NUCLEO-C092RC |
Samples/CanOpenClient/CiA417/FreeRTOS |
Slave (lift call panel) | CiA 417 | FreeRTOS | NUCLEO-C092RC |
Samples/CanOpenClient/CiA417/Linux |
Slave (lift call panel) | CiA 417 | Linux / SocketCAN | Any Linux machine |
Samples/CanOpenMaster/CiA401/FreeRTOS |
Master (CiA 302-2 boot process) | CiA 401 | FreeRTOS | NUCLEO-C092RC |
Samples/CanOpenMaster/CiA401/Linux |
Master (CiA 302-2 boot process) | CiA 401 | Linux / SocketCAN | Any Linux machine |
Samples/CanOpenMaster/CiA417/FreeRTOS |
Master (lift call controller) | CiA 417 | FreeRTOS | NUCLEO-C092RC |
Samples/CanOpenMaster/CiA417/Linux |
Master (lift call controller) | CiA 417 | Linux / SocketCAN | Any Linux machine |
The slave samples implement a generic I/O node following the CiA 401 device profile: the board's user button is published as digital input (6000h) via TPDO 1, digital outputs (6200h) arrive via RPDO 1, and a demo object (2000h) is accessible via SDO. The master samples boot, configure and monitor a slave following the CiA 302-2 boot NMT slave process. The CiA 417 samples implement a lift call panel using the profile's virtual I/O mapping.
Each sample directory contains:
Source/— the application: device class, object dictionary (generated from the EDS inEds/), platform layer, driversVSCode/— CMSIS solution project (*.csolution.yml) for VS Code with the Arm Keil Studio extensions; tools are provisioned automatically viavcpkg-configuration.json- the Linux samples instead ship a
Make/build and a.devcontainer/
The STM32 samples target the ST NUCLEO-C092RC evaluation board (STM32C092RC, Cortex-M0+) with on-board ST-LINK and on-board CAN FD transceiver — no shield required. Bus speed: 250 kbit/s.
The Linux samples run against any SocketCAN interface, including a virtual vcan0. The masters default to can0, the slaves to can1, so a complete master/slave pair runs on a single machine with two connected CAN interfaces — for example a Raspberry Pi with a dual-channel CAN HAT.
The full documentation lives at CANoopEn.net:
- Quick Start Guide
- Architecture
- API reference: CoSlave · CoMaster · Listeners · Object dictionary · Configuration & porting
This repository is tagged together with the stack and the unit tests; in a tagged state the CANoopEn submodule always points at the stack commit of that release. See the changelog.
Apache License, Version 2.0 — see the CANoopEn repository. The FreeRTOS sources vendored in the FreeRTOS samples are MIT-licensed (see their LICENSE.md).
