Installation of the CANopen Library

Document Scope

 

Due to a switch in development practice, version control and delivery processes, CANopen deliveries from port GmbH are now single product deliveries and come in either executable or zip file format. This document shows the expected directory structure when combining several such products.

 

Note: The executable installer is only available in Windows, but the expected folder structure is the same as in Linux.

 

Note: As before, recommended usage of the combined deliveries is adding a local copy to the user project and source control.

Library Installation via Zip File

 

Since patch 4.5.11 the library is delivered as a zip file containing source code. This zip file will expand to build the usual folder structure of the library as described in the manual and shown in Figure 1. It will not be automatically put into a ‘port’ folder however, but stay wherever the zip file was unpacked.


Grafik fehlt



The library itself does not come with a drivers folder as it does not contain any specific hardware components but just the general interface. This folder is later added by any driver delivery.

 

All library deliveries now contain all source files. This means that updating a library installation can be done by simply overwriting all files. Generally a library installation should also be added to a projects source control, so it can be recovered in case of problems.

Installation of Extra Packages

 

All extra packages to the CANopen library were updated with the 4.5.12 patch and are now available as zip files. These zip files will expand into the same folder structure as the base library. As such, installation is done simply by unpacking the zip file to the same base folder as the library.

 

The extra packages deliveries do not contain any files already found in the library delivery which prevents any conflicts. Instead they usually just add additional files to the canopen/source and canopen/include folders.

Driver Installation via ZipFile

 

Starting with 4.5.11 all new drivers are only available as zip files. Again, these should be unpacked to the same base folder as 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.

Driver Installation via Executable

 

Older drivers, developed before the library 4.5.11 patch, are usually still available as Windows installer executables. These installers will ask for an installation directory or propose C:\port\ as a default.

 

The proper folder structure will build if the installer is aimed at the top level of the unpacked library location. In other words at the folder level above the canopen folder.

 

Otherwise it is again possible to manually move the extracted driver files to the library location, so that the drivers folder rests beside the canopen folder.

Driver Conflicts

 

When using more than one driver, it is possible to run into a situation where multiple driver packages contain the same file but in different versions. Copying all drivers to the same library installation will create conflicts.

 

In this case, there is no simple solution. However, most applications use only a single driver. Recommended practice in this case is putting the library into the applications workspace and adding just the one needed driver installation. For another project repeat this process. Each project should then contain only the library and the single needed driver, each being conflict free and cleanly separated.