CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
Getting started

Template code example

The source files tests the correct integration of the API (Compile and Build Process). The build file can be executed, but without any feedback.

Prerequisites

In order to build the examples the following programs are required:

  • C compiler supporting the C99 standard
  • Installation of CMake when using the corresponding project files (recommended)

Building template code

An example which runs on every target system is located inside the directory source/application/template-cos. This example uses a CANpie FD dummy driver (located in the directory source/application/template-device). Perform the following steps to build this example:

cd source/application/template-cos/
mkdir build
cd build
cmake ..
cmake --build .

Executing template code

./cos-template-301
*******************************************************************************
*
* CANopen Slave Protocol Stack template application
*
*******************************************************************************
COS stack version: '6.16'
CANpie FD version: '3.10'
--- COS user parameter of device application ---
Device name : 'CANopen Stack template'
Hardware version: '1.00'
Software version: '1.00'