A summary of supported platforms by sample implementations is given below. Please note that, supported Ethernet adapters vary depending on the implementation.
| Platform | Ethernet Device Driver - User Space | Ethernet Device Driver - Kernel Space | Supported Ethernet Adapters |
|---|---|---|---|
| PC with Linux | EDDS | Any driver | Standard Ethernet Adapters |
| PC with Windows 10 | EDDS | Any driver | Standard Ethernet Adapters |
| PC with Linux and PCIe connection to CP1625 board running embedded Linux | EDDI | PNDevDriver | Integrated LAN on CP1625 |
Note
Linux OS refers to Debian with real-time (RT) patched Linux kernel for sample PN Driver implementations.
This document focuses on porting PN Driver to the target platform. Please refer to Quick Start document for the information regarding performance and functionality differences between sample PN Driver implementations.
PN Driver console test application running on a Linux PC with a Standard NIC
The following figure shows the system setup for PN Driver console test application on Linux using a standard NIC. In this setup, any driver supported by the Linux kernel can be used to establish a PROFINET network communication.
PN Driver console test application running on a Windows 10 PC
The following figure shows the system setup for PN Driver console test application on Windows 10 using a standard NIC. The EDDS uses the Packet32 lower layer provided by the PROFINET stack. This lower layer uses Npcap to establish a network connection via the standard ethernet adapter.
PN Driver console test application running on a Linux PC with CP1625
The following figures show the system setup for PN Driver console test application on Linux for the CP1625 Host variant. For this use case the CP1625 board is plugged in a PC. PN Driver console test application, PN Driver and a part of EPS run on the host. The other EPS part running on the SOC1 ASIC of the CP1625 board contains the PROFINET stack. If Linux IP stack is used, then a part of the PROFINET stack runs on the host by EPS. Both EPS instances are interconnected with PNDevDriver. The communication processor on the CP1625 board is used to establish a PROFINET network connection. The EDDI is used by the PROFINET stack to send and receive frames on the CP1625.
Overview of the porting of PN Driver
A systems integrator may want to port PN Driver to another OS such as VxWorks or to an embedded system with a proprietary OS. As it is not feasible to describe the porting to each and every OS, the following paragraphs will provide an overview of how PN Driver has to be adapted.
When you port PN Driver to a new OS, the main task is to port EPS. The architecture of EPS makes the porting task easier. Since PN Driver uses EPS to make calls to the OS or the hardware, PN Driver can be ported to other systems by adapting EPS.
The architecture of EPS is described in the following sections. Also, hints are provided for the systems integrator for porting PN Driver/EPS to another system or adding additional Ethernet adapters to EPS.
Depending on the target platform, OS and used Ethernet adapter, the number of porting steps may vary.
Overview of how to port PN Driver to other operating systems
PN Driver interfaces with EPS which itself is based on the POSIX API; see section POSIX API/Macro IF (OS abstraction).
-
If the desired OS includes an implementation of the POSIX API, you will be able to adapt PN Driver to that OS by following the description in this manual.
-
If you want to use an OS other than Windows 10 or a Linux distribution other than Debian, you can use the native OS interface. Its native implementation must be mapped to the POSIX macros defined in section POSIX API/Macro IF (OS abstraction).
See, for example, the implementation for the Windows OS that PN Driver offers. Please observe the Windows example in section POSIX API/Macro IF (OS abstraction) as well as the porting instructions in section Porting instructions.
Overview of how to port PN Driver to platforms with a custom Linux kernel
PN Driver V3.0 Linux Native and CP1625 Host variants are tested with a Debian 11 PC that has Linux kernel version 5.10 including RT patch. If you run PN Driver Linux Native and CP1625 Host variants on a platform with a custom Linux kernel, please make sure that you set the following kernel configuration parameters:
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_MATCHALL=y
Note
These configuration parameters are introduced with the Linux kernel version 4.8; therefore, kernel version 4.8 or a higher version needs to be used.
Overview of how to port PN Driver to other platforms
-
If you want to use another embedded platform which is not supported natively by PN Driver, e. g. a customer specific embedded system, the platform abstraction of EPS (EPS PLF) must be adapted. Please refer to the porting instructions in section EPS PLF (hardware abstraction).
-
Besides these adaptations, changes to the configuration of EPS are also necessary. The changes are described in section EPS APP (application abstraction).
Overview of Ethernet adapter integration
For the EDDS-based variants of PN Driver you can use PN Driver:
-
on Windows 10 with any Ethernet adapter via Npcap. This is a demo application and not suitable for production use as the real-time capability necessary for the PROFINET use is missing.
-
on Linux using RT patch with any standard Ethernet adapter via AF_PACKET interface for Linux Native variant.
If you want to use a driver different than those listed above, this can be done by providing a lower layer implementation to EDDS as described in section Integration of an EDDS lower layer implementation into PN Device Driver.
Note
PN Driver, EPS and the PROFINET stack must be compiled as a 32-bit library or application. All components included in PN Driver are supported only for little endian systems.
PNDevDriver must be compiled as a 32- or 64-bit kernel module driver depending on the OS.