Running an example with a prepared configuration

Document Scope

 

The driver deliveries by port GmbH usually contain additions to the examples of the base library. These additions are meant to provide an especially easy way to get these examples running on target hardware. A few steps need to be taken before that, described here.

 

The prepared examples are usually:

·         s1 to s3 for slave examples

·         s4 only for multiline capable drivers

·         m1 to m3 for master examples

Not all drivers contain configurations for all of these examples, certain OS drivers for example may come with less variants.

Driver Installation

 

Drivers come in their own delivery. These should be installed to the library so that the included drivers folder is placed beside the canopen and examples folders. This will ensure the folder structure that all the included examples expect. This will also ensure that any extra files for the examples are placed in the correct folders.



 

 

Activating a Configuration

 

The examples s1 to s3 and m1 to m3 are already contained in the base library delivery, but without an active hardware configuration. The drivers add configurations specific to the hardware into the examples folders. To activate such a configuration move the cal_conf.h.xxx to cal_conf.h (.xxx is a driver specific suffix). The example can now be build and be put on the hardware.

Using the prepared IDE Projects

 

Some examples were prepared in specific IDEs, usually the most commonly used IDE for the specific hardware. In these cases, the example directory will also contain an IDE project that can be imported into the IDE. This will provide the quickest way to get the examples running.

 

Note that the steps in 2) and 3) still have to be done manually to ensure fitting include paths and an active configuration.