# Running EcMasterDemo
The EcMasterDemo is available “out of the box” for different operating systems. It is an EC-Master example application that handles the following tasks:
- Showing basic EtherCAT® communication
- MainDevice stack initialization into OPERATIONAL state
- Process Data operations for e.g. Beckhoff EL2004, EL1004 and EL4132
- Periodic diagnosis task
- Periodic Job Task in polling mode
- Logging
Start the EcMasterDemo from the command line to put the EtherCAT® network into operation. At least a Real-time Ethernet Driver must be specified.
```doscon
> EcMasterDemo -ndis 192.168.157.2 1 -f eni.xml -t 0 -v 3
```
#### SEE ALSO
- [Example application](software-integration_example-application.html.md#example-application) for detailed explanation
## Command line parameters
### EcMasterDemo [-f ENI-FileName] [-t time] [-b cycle time] [-a affinity] [-v level] [-perf [level]] [-log prefix [msg cnt]] [-lic key] [-oem key] [-fingerprint method] [-maxbusslaves cnt] [-flash address] [-sp [port]] [-rec [prefix [frame cnt]]] [-junctionred]
The parameters are as follows:
### -f
Path to ENI file
### -t
Running duration [ms]. When the time expires the demo application exits completely.
* **:**
Time [ms], 0 = forever (default = 120000)
### -b
Specifies the bus cycle time. Defaults to 1000 µs (1 ms).
* **:**
Bus cycle time in µsec
### -a
The CPU affinity specifies which CPU the demo application ought to use.
* **:**
0 = first CPU, 1 = second, …
### -v
The verbosity level specifies how much console output messages will be generated by the demo application. A high verbosity level leads to more messages.
* **:**
Verbosity level: 0=off (default), 1..n=more messages
### -perf []
Enable max. and average time measurement in µs for all EtherCAT® jobs (e.g. ProcessAllRxFrames).
* **:**
Depending on level the performance histogram can be activated as well.
### -log []
Use given file name prefix for log files.
* **:**
* **:**
Messages count for log buffer allocation
### -lic
Set License key.
* **:**
License key string
### -oem
Use OEM key
* **:**
64 bit OEM key.
### -fingerprint
Read license fingerprint
* **:**
Fingerprint method
### -junctionred
Enable junction redundancy (automatic mode)
### -flash
Flash outputs
* **:**
0=all, >0 = SubDevice station address
### -sp []
If platform has support for IP Sockets, this command-line option enables the Remote API Server to be started. The Remote API Server is going to listen on TCP Port 6000 (or port parameter if given) and is available for connecting Remote API Clients.
* **:**
RAS server port
### -rec [ [ ]]
Packet capture file recording
* **:**
File name prefix
* ** :**
Frame count for log buffer allocation
### Link Layer
Using one of the following demo application Link Layer options, the EC-Master will dynamically load the network driver for the specified network adapter card and use the appropriate network driver to access the Ethernet adapter for EtherCAT®.
`ShowSyntaxLinkLayer()` in [`Common/EcSelectLinkLayer.cpp`](_downloads/bf62c71a4a7e317930818b9da4a9815c/EcSelectLinkLayer.cpp) is called automatically if the Demo application is started without parameters and lists the possibilities.
#### NOTE
Not all link layers are available on all operating systems or architectures. A detailed view in the form of a matrix can be found in the [developer center](https://developer.acontis.com/).
### -alteratse
* **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -antaios
Device instance fixed to 2
Mode fixed to 1 = Polling mode
### -bcmgenet
Hardware: Broadcom BcmGenet
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -bcmnetxtreme
Hardware: Broadcom NetXtreme
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -bpf []
Hardware: Berkeley Packet Filter, Hardware independent
: * **:**
BPF instance (0=first), results to e.g. /dev/bpf0
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
Name of Ethernet Interface, e.g. wm0
Optional:
: * **:**
Prefix of the BPF instance path, e.g. /alt
### -ccat
Hardware: Beckhoff CCAT
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -cpsw
Hardware: TI CPSW
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode, 1 = Polling mode
* **:**
Low priority (0) or high priority (1)
* **:**
(m) Master (Initialize Switch), (s) Slave
* **:**
bone | am3359-icev2 | am437x-idk | am572x-idk | 387X_evm | custom | osdriver
If custom:
: * **:**
am33XX | am437X | am57X | am387X
* **:**
0 … 31
* **:**
rmii | gmii | rgmii | osdriver
* **:**
0 = FALSE | 1 = TRUE
### -dpdk
Hardware: Hardware independent, only available for Linux.
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode (not implemented), 1 = Polling mode
* **:**
DPDK port ID, e.g. 0
This option supports a large variety of NICs. Whether a NIC is supported depends on its network driver. For a list of supported network drivers see [https://www.dpdk.org](https://www.dpdk.org).
### -dpdkenetc4
Hardware: NXP iMX95 ENETC4, only available for Linux.
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode (not implemented), 1 = Polling mode
* **:**
DPDK port ID, e.g. 0
### -dw3504
Hardware: Synopsys DesignWare 3504-0 Universal 10/100/1000 Ethernet MAC (DW3504)
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
Reference Board: intel_atom | lces1 | rd55up06 | r12ccpu | rzn1 | socrates | stm32mp157a-dk1 | custom
If custom:
: * **:**
intel_atom | cycloneV | lces1 | stm32mp157a-dk1
* **:**
fixed | mii | rmii | gmii | sgmii | rgmii | osdriver
* **:**
0 … 31 (don’t use if osdriver)
### -dwxgmac
Hardware: Synopsys DesignWare Cores XGMAC 10G/25G Ethernet MAC
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
Reference Board: jetson-agx-orin | jetson-agx-thor | custom
If custom:
: * **:**
jetson-agx-orin | jetson-agx-thor
* **:**
fixed | osdriver | 10gbaser
* **:**
0 … 31, default 0 (don’t use if osdriver)
### -eg20t
Hardware: Intel EG20T Gigabit Ethernet Controller
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -emac
Hardware: Xilinx LogiCORE IP XPS EMAC
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
MC2002E | custom
If custom:
: * **:**
Register base address as hex value
* **:**
Register length as hex value
* **:**
0 = FALSE | 1 = TRUE
### -fslenetc
Hardware: NXP ENETC4 (NETC, i.MX95)
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
1 = Polling mode
* **:**
verdin-imx95 | custom
If custom:
: * **:**
imx95
* **:**
fixed | osdriver
* **:**
0 … 31 (ignored if osdriver)
### -fsletsec
Hardware: Freescale TSEC / eTSEC V1 / eTSEC V2 (VeTSEC)
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
p2020rdb | twrp1025 | istmpc8548 | xj_epu20c | twrls1021a | tqmls_ls102xa | custom
If custom:
: * **:**
0 … 31
* **:**
Default depending on ETSEC type
* **:**
0 = FALSE | 1 = TRUE
### -fslfec [--nopinmuxing] [--nomacaddr]
Hardware: Freescale FEC/ENET
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
mars | sabrelite | sabresd | imx28evk | topaz | imxceetul2 | mimxrt1064-evk | imx93evk | custom
If custom:
: * **:**
imx25 | imx28 | imx53 | imx6 | vf6 | imx7 | imx8 | imx8m | imxrt1064 | imx9
* **:**
fixed | mii | rmii | rmii50Mhz | gmii | sgmii | rgmii | osdriver
* **:**
0 … 31, default 0 (don’t use if osdriver)
Optional:
: * **--nopinmuxing:**
No pin muxing
Optional:
: * **--nomacaddr:**
Don’t read MAC address
### -gem [--osdriver] [--clkdivtype_k26] [--nopinmuxing]
Hardware: Cadence GEM/MACB
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
zc702 | zedboard | microzed | zcu102 | zcu104 | KR260 | rpi5 | polarfire | custom
If custom:
: * **:**
0 … 31
* **:**
MIO (0) or EMIO (1)
* **:**
Use Xilinx GmiiToRgmii converter TRUE (1) or FALSE (0)
* **:**
GmiiToRgmii converter PHY address 0 … 31
* **:**
zynq7000 | ultrascale | bcm2712 | polarfire
Optional:
: * **--osdriver:**
PhyInterface osdriver
Optional:
: * **--clkdivtype_k26:**
Clock divisor
Optional:
: * **--nopinmuxing:**
Don’t use pin muxing
### -intelgbe [--tts |--tmr] [--nophyctrlonconnect]
Hardware: Intel Pro/1000 network adapter card
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
Optional:
: * **--tts:**
Enable Real-time Ethernet Driver Time Triggered Send (TTS)
* **:**
TTS cyclic frame send offset from cycle start (usec)
* **or:**
* **--tmr:**
Enable Real-time Ethernet Driver Timer
Optional:
: * **--nophyctrlonconnect:**
Disable PHY control (e.g. PHY reset, PHY PM settings, Gbits Ctrl) on link connection detected
### -i8255x
Hardware: Intel Pro/100 network adapter card
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -icss [--mii |--osdriver] [--nophyreset] [--tts ]
Hardware: Texas Instruments Board with PRUSS
: * **:**
ICSS Port (100 Mbit/s) 1 … 4
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
(m) Master (Initialize board, mdio, both phy) or (s) Slave
* **:**
am572x-idk | am571x-idk | am3359-icev2 | am574x
Optional:
: * **--mii:**
PhyInterface mii
* **:**
0 … 31
* **or:**
* **--osdriver:**
PhyInterface osdriver
Optional:
: * **--nophyreset:**
No PHY Reset
Optional:
: * **--tts:**
Enables Real-time Ethernet Driver Time Triggered Send (TTS)
* **:**
TTS cyclic frame send offset from cycle start [us]
### -icssg
Hardware: Texas Instruments AARCH64 Board with Gigabit PRUSS
: * **:**
ICSSG Port 1 … 6
* **:**
0 = Interrupt mode | 1 = Polling mode
* **:**
(m) Master (Initialize board, mdio, both phy) or (s) Slave
* **:**
am654x-idk
### -l9218i
Hardware: SMSC LAN9218i/LAN9221
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -lan743x
Hardware: Microchip LAN743x
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
1 = Polling mode
### -ndis [--name ] [--disablepromiscuousmode] [--disableforcebroadcast]
Hardware: Hardware independent, only available for Windows.
: * **:**
IP address of network adapter card, e.g. 192.168.157.2 or 0.0.0.0 if name given
* **:**
0 = Interrupt mode | 1 = Polling mode
Optional:
: * **--name:**
Select network adapter by name
* **:**
Service name from HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards
Optional:
: * **--disablepromiscuousmode:**
Disable promiscuous mode
Optional:
: * **--disableforcebroadcast:**
Disable force broadcast
### -multiplier [--type ] --port --link
Hardware: Beckhoff CUxxxx Ethernet-Port-Multiplier
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode, for now only polling mode is supported
* **--port:**
Multiplier port in use
* **:**
0 = X1, 1 = X2, …
* **--link:**
Link parameters of network adapter connected to the uplink port
* ** :**
e.g. -intelgbe …
Optional:
: * **--type:**
Multiplier type
* **:**
cu2508 = CU2508 Ethernet-Port-Multiplier | et2000 = ET2000 Multichannel Ethernet-Probe
### -remote [--mac ] [--rxbuffercnt ]
Hardware: Hardware independent. Tunnels EtherCAT frames through a TCP socket
> * **:**
> Device instance 1 = first, 2 = second, …
> * **:**
> 1 = Polling mode
> * **:**
> Source adapter IP address (listen)
> * **:**
> Source port number (listen)
> * **:**
> Destination adapter IP address (connect)
> * **:**
> Destination port number (connect)
Optional:
: * **--mac:**
MAC Address
* **:**
formatted as xx:xx:xx:xx:xx:xx or xx-xx-xx-xx-xx-xx
Optional:
: * **--rxbuffercnt:**
Frame buffer count for interrupt service thread (IST)
* **:**
Buffer count
### -r6040
Hardware: RDC R6040
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
1 = Polling mode
### -rtl8139
Hardware: Realtek RTL8139
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -rtl8169
Hardware: Realtek RTL8168 / RTL8169 / RTL8111
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
0 = Interrupt mode | 1 = Polling mode
### -rzt1
Hardware: Renesas RZ/T1
: * **:**
Device instance 1 = Port 0 | 2 = Port 1
### -sheth
Hardware: Renesas RZG1 or Armadillo-800 EVA or MYIR Remi Pi (Renesas RZ/G2L) or Renesas RX72N Envision Kit
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
1 = Polling mode
* **:**
rzg1e | a800eva | rzg2l | rx72n
### -snarf
Hardware: Hardware independent, only available for VxWorks
: * **:**
Adapter name, e.g. fei0
### -sockraw [] [--nommaprx] [--promiscuousmode]
Hardware: Hardware independent, only available for Linux.
: * **:**
Network adapter, e.g. eth1
Optional:
: * **:**
0 = Interrupt mode | 1 = Polling mode
Optional:
: * **--nommaprx:**
Disable PACKET_MMAP for receive
Optional:
: * **--promiscuousmode:**
Enable promiscuous mode
### -sockxdp [--queue ] [--xdpmode ]
Hardware: Hardware independent, only available for Linux.
: * **:**
Network adapter, e.g. eth1
* **:**
0 = Interrupt mode | 1 = Polling mode
Optional:
: * **--queue:**
Set Queue Id
* **:**
Queue Id, e.g. 0, 1, … (Default 0)
Optional:
: * **--xdpmode:**
XDP Mode
* **:**
SKB(1), DRV(2), HW(3) or DRV_ZEROCOPY(4). Default is SKB(1)
### -stm32eth
Hardware: STM32H7 Ethernet
: * **:**
Device instance 1 = first, 2 = second, …
* **:**
1 = Polling mode
### -tap