Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CANoopEn — CANopen Stack C++/OOP

CANoopEn Samples

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.git

New 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.

Samples

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 in Eds/), platform layer, drivers
  • VSCode/ — CMSIS solution project (*.csolution.yml) for VS Code with the Arm Keil Studio extensions; tools are provisioned automatically via vcpkg-configuration.json
  • the Linux samples instead ship a Make/ build and a .devcontainer/

Hardware

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.

Documentation

The full documentation lives at CANoopEn.net:

Releases

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.

License

Apache License, Version 2.0 — see the CANoopEn repository. The FreeRTOS sources vendored in the FreeRTOS samples are MIT-licensed (see their LICENSE.md).

Releases

Packages

Contributors