Mike's advice can resolve MN demo App( only 'Link to App' and 'Linux Userspace Daemon') running erro's problem on ZYNQ.
root@rootfs-zynq:/home/openPOWERLINK/bin/linux/armv7l/demo_mn_console/direct_app# ./demo_mn_console
----------------------------------------------------
openPOWERLINK console MN DEMO application
Using openPOWERLINK stack: V2.5.0
----------------------------------------------------
1970/01/01-08:35:24 INFO GENERIC demo_mn_console: Stack version:V2.5.0 Stack configuration:0x0000001B
1970/01/01-08:35:24 INFO GENERIC Using CDC file: mnobd.cdc
Initializing openPOWERLINK stack...
1970/01/01-08:35:24 INFO CONTROL Initializing openPOWERLINK stack
1970/01/01-08:35:24 INFO GENERIC Using libpcap for network access
--------------------------------------------------
List of Ethernet cards found in this system:
--------------------------------------------------
1. eth0
2. Pseudo-device that captures on all interfaces
any
3. lo
--------------------------------------------------
Select the interface to be used for POWERLINK (1-3):1
--------------------------------------------------
Initializing process image...
Size of process image: Input = 4 Output = 4
1970/01/01-08:35:26 INFO GENERIC Allocating process image: Input:4 Output:4
1970/01/01-08:35:26 EVENT STATE_CHANGE NmtGsOff->NmtGsInitializing Originating event:NmtEventSwReset
Stack entered state: NmtGsInitializing
1970/01/01-08:35:26 EVENT STATE_CHANGE NmtGsInitializing->NmtGsResetApplication Originating event:NmtEventEnterResetApp
Stack entered state: NmtGsResetApplication
-------------------------------
Press Esc to leave the program
Press r to reset the node
-------------------------------
1970/01/01-08:35:26 EVENT STATE_CHANGE NmtGsResetApplication->NmtGsResetCommunication Originating event:NmtEventEnterResetCom
1970/01/01-08:35:26 EVENT PDO_CHANGE RPDO = 0x1600 to node 1 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1600/1 Mapped object 0xA4C0/ 1
1970/01/01-08:35:26 EVENT PDO_CHANGE RPDO = 0x1601 to node 32 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1601/1 Mapped object 0xA4C0/ 2
1970/01/01-08:35:26 EVENT PDO_CHANGE RPDO = 0x1602 to node 110 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1602/1 Mapped object 0xA4C0/ 3
1970/01/01-08:35:26 EVENT PDO_CHANGE TPDO = 0x1A00 to node 1 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1a00/1 Mapped object 0xA040/ 1
1970/01/01-08:35:26 EVENT PDO_CHANGE TPDO = 0x1A01 to node 32 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1a01/1 Mapped object 0xA040/ 2
1970/01/01-08:35:26 EVENT PDO_CHANGE TPDO = 0x1A02 to node 110 with 1 objects activated
1970/01/01-08:35:26 INFO PDOMAP 0x1a02/1 Mapped object 0xA040/ 3
1970/01/01-08:35:27 EVENT STATE_CHANGE NmtGsResetCommunication->NmtGsResetConfiguration Originating event:NmtEventEnterResetConfig
1970/01/01-08:35:27 EVENT STATE_CHANGE NmtGsResetConfiguration->NmtMsNotActive Originating event:NmtEventEnterMsNotActive
Stack entered state: NmtMsNotActive
1970/01/01-08:35:28 EVENT STATE_CHANGE NmtMsNotActive->NmtMsPreOperational1 Originating event:NmtEventTimerMsPreOp1
Stack entered state: NmtMsPreOperational1
1970/01/01-08:35:28 EVENT STATE_CHANGE NmtMsPreOperational1->NmtMsPreOperational2 Originating event:NmtEventTimerMsPreOp2
Stack entered state: NmtMsPreOperational2
1970/01/01-08:35:29 EVENT STATE_CHANGE NmtMsPreOperational2->NmtMsReadyToOperate Originating event:NmtEventEnterReadyToOperate
Stack entered state: NmtMsReadyToOperate
1970/01/01-08:35:29 EVENT STATE_CHANGE NmtMsReadyToOperate->NmtMsOperational Originating event:NmtEventEnterMsOperational
Stack entered state: NmtMsOperational
1970/01/01-08:35:29 EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsPreOperational2
Node 1 entered state NmtCsPreOperational2
1970/01/01-08:35:29 EVENT NODE Node= 1, NmtNodeEventFound State:NmtCsPreOperational2
Stack found node 1
1970/01/01-08:35:29 EVENT NODE Node= 1, NmtNodeEventCheckConf State:NmtCsPreOperational2
1970/01/01-08:35:29 EVENT CFM_PROGRESS Node= 1, Object 0x1011/001, 8/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_EXIST(0x06020000), Error=0x0000
1970/01/01-08:35:30 EVENT CFM_PROGRESS Node= 1, Object 0x1600/000, 16/ 162 Bytes
1970/01/01-08:35:30 EVENT CFM_PROGRESS Node= 1, Object 0x1A00/000, 24/ 162 Bytes
1970/01/01-08:35:30 EVENT CFM_PROGRESS Node= 1, Object 0x1006/000, 35/ 162 Bytes
1970/01/01-08:35:31 EVENT CFM_PROGRESS Node= 1, Object 0x1020/001, 46/ 162 Bytes
1970/01/01-08:35:31 EVENT CFM_PROGRESS Node= 1, Object 0x1020/002, 57/ 162 Bytes
1970/01/01-08:35:31 EVENT CFM_PROGRESS Node= 1, Object 0x1C0B/003, 68/ 162 Bytes
1970/01/01-08:35:32 EVENT CFM_PROGRESS Node= 1, Object 0x1C0D/003, 79/ 162 Bytes
1970/01/01-08:35:32 EVENT CFM_PROGRESS Node= 1, Object 0x1C14/000, 90/ 162 Bytes
1970/01/01-08:35:32 EVENT CFM_PROGRESS Node= 1, Object 0x1F98/004, 99/ 162 Bytes
1970/01/01-08:35:33 EVENT CFM_PROGRESS Node= 1, Object 0x1F98/005, 108/ 162 Bytes
1970/01/01-08:35:33 EVENT CFM_PROGRESS Node= 1, Object 0x1600/001, 123/ 162 Bytes
1970/01/01-08:35:33 EVENT CFM_PROGRESS Node= 1, Object 0x1A00/001, 138/ 162 Bytes
1970/01/01-08:35:33 EVENT CFM_PROGRESS Node= 1, Object 0x1600/000, 146/ 162 Bytes
1970/01/01-08:35:34 EVENT CFM_PROGRESS Node= 1, Object 0x1A00/000, 154/ 162 Bytes
1970/01/01-08:35:34 EVENT CFM_PROGRESS Node= 1, Object 0x1010/001, 158/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_EXIST(0x06020000), Error=0x0000
1970/01/01-08:35:34 EVENT CFM_PROGRESS Node= 1, Object 0x1006/000, 162/ 162 Bytes
1970/01/01-08:35:34 EVENT CFM_RESULT Node= 1, NmtNodeCommandConfReset
1970/01/01-08:35:35 EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsNotActive
Node 1 entered state NmtCsNotActive
1970/01/01-08:35:35 EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsPreOperational2
Node 1 entered state NmtCsPreOperational2
1970/01/01-08:35:35 EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsReadyToOperate
Node 1 entered state NmtCsReadyToOperate
1970/01/01-08:35:36 EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsOperational
Node 1 entered state NmtCsOperational
Select network device support -> Universal TUN/TAP device driver at rebuilding kernel. RBPi3 can try it.
But the demo_mn_console based on option CFG_BUILD_KERNEL_STACK with Linux Kernel Module run error.
My building process is as follows:
(1) Building a linux edrv kernel driver
cmake -DCFG_OPLK_MN=TRUE -DCFG_POWERLINK_EDRV_EMACPS=TRUE -DCFG_KERNEL_DIR=~/build/linux-xlnx/ -DCMAKE_TOOLCHAIN_FILE=../toolchain-xilinx-vivado-arm-linux-eabi-gnu.cmake ..
I modified the toolchain-xilinx-vivado-arm-linux-eabi-gnu.cmake file and reassigned the compiler.
(2) Building linux demo app
cmake ../.. -i
CFG_BUILD_KERNEL_STACK select "Linux Kernel Module".
Variable Name: OPLKLIB
Description: Path to a library.
Current Value: /home/openPOWERLINK/stack/lib/linux/armv7l/liboplkmnapp-kernelintf.a
New Value (Enter to keep current value):
Please wait while cmake processes CMakeLists.txt files....
CMake complete, run make to build project.
root@rootfs-zynq:/home/openPOWERLINK/apps/demo_mn_console/build/linux# make
-- Configuring demo_mn_console
-- CMAKE_SYSTEM_NAME is Linux
-- CMAKE_SYSTEM_PROCESSOR is armv7l
-- Searching for LIBRARY oplkmnapp-kernelintf in /home/openPOWERLINK/apps/demo_mn_console/../../stack/lib/linux/armv7l
-- Configuring done
-- Generating done
-- Build files have been written to: /home/openPOWERLINK/apps/demo_mn_console/build/linux
make[2]: Warning: File `../../../common/openCONFIGURATOR_projects/Demo_3CN/output/mnobd.cdc' has modification time 1.5e+09 s in the future
[ 7%] Generating mnobd.cdc
Scanning dependencies of target demo_mn_console
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Warning: File `../../src/main.c' has modification time 1.5e+09 s in the future
[ 15%] Building C object CMakeFiles/demo_mn_console.dir/src/main.c.o
[ 23%] Building C object CMakeFiles/demo_mn_console.dir/src/app.c.o
[ 30%] Building C object CMakeFiles/demo_mn_console.dir/src/event.c.o
[ 38%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/apps/common/src/obdcreate/obdcreate.c.o
[ 46%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/apps/common/objdicts/CiA302-4_MN/obdpi.c.o
[ 53%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/apps/common/src/eventlog/eventlog.c.o
[ 61%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/apps/common/src/eventlog/eventlogstring.c.o
[ 69%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/contrib/console/printlog.c.o
[ 76%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/contrib/getopt/getopt.c.o
[ 84%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/apps/common/src/system/system-linux.c.o
[ 92%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/contrib/console/console-linux.c.o
[100%] Building C object CMakeFiles/demo_mn_console.dir/home/openPOWERLINK/contrib/trace/trace-printf.c.o
Linking C executable demo_mn_console
make[2]: warning: Clock skew detected. Your build may be incomplete.
[100%] Built target demo_mn_console
(3) copy oplkemacpsmn.ko to zynq and insmod
insmod oplkemacpsmn.ko
root@rootfs-zynq:/tmp# insmod oplkemacpsmn.ko
(4) run demo app
./demo_mn_console
root@rootfs-zynq:/home/openPOWERLINK/bin/linux/armv7l/demo_mn_console/kernel_module# ./demo_mn_console
----------------------------------------------------
openPOWERLINK console MN DEMO application
Using openPOWERLINK stack: V2.5.0
----------------------------------------------------
1970/01/01-08:05:14 INFO GENERIC demo_mn_console: Stack version:V2.5.0 Stack configuration:0x0000001B
1970/01/01-08:05:14 INFO GENERIC Using CDC file: mnobd.cdc
Initializing openPOWERLINK stack...
1970/01/01-08:05:14 INFO CONTROL Initializing openPOWERLINK stack
Initializing process image...
Size of process image: Input = 4 Output = 4
1970/01/01-08:05:14 INFO GENERIC Allocating process image: Input:4 Output:4
-------------------------------
Press Esc to leave the program
Press r to reset the node
-------------------------------
Synchronous data thread is starting...
1970/01/01-08:05:14 EVENT STATE_CHANGE NmtGsOff->NmtGsInitializing Originating event:NmtEventSwReset
Stack entered state: NmtGsInitializing
1970/01/01-08:05:14 EVENT STATE_CHANGE NmtGsInitializing->NmtGsResetApplication Originating event:NmtEventEnterResetApp
Stack entered state: NmtGsResetApplication
1970/01/01-08:05:14 EVENT STATE_CHANGE NmtGsResetApplication->NmtGsResetCommunication Originating event:NmtEventEnterResetCom
SIOCSIFFLAGS: Cannot assign requested address
1970/01/01-08:05:14 EVENT PDO_CHANGE RPDO = 0x1600 to node 1 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1600/1 Mapped object 0xA4C0/ 1
1970/01/01-08:05:14 EVENT PDO_CHANGE RPDO = 0x1601 to node 32 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1601/1 Mapped object 0xA4C0/ 2
1970/01/01-08:05:14 EVENT PDO_CHANGE RPDO = 0x1602 to node 110 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1602/1 Mapped object 0xA4C0/ 3
1970/01/01-08:05:14 EVENT PDO_CHANGE TPDO = 0x1A00 to node 1 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1a00/1 Mapped object 0xA040/ 1
1970/01/01-08:05:14 EVENT PDO_CHANGE TPDO = 0x1A01 to node 32 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1a01/1 Mapped object 0xA040/ 2
1970/01/01-08:05:14 EVENT PDO_CHANGE TPDO = 0x1A02 to node 110 with 1 objects activated
1970/01/01-08:05:14 INFO PDOMAP 0x1a02/1 Mapped object 0xA040/ 3
1970/01/01-08:05:14 EVENT STATE_CHANGE NmtGsResetCommunication->NmtGsResetConfiguration Originating event:NmtEventEnterResetConfig
1970/01/01-08:05:
There was a bug with the emacps edrv in the previous openPOWERLINK version.
Can you try with the current version of the stack and let us know, if it's working now?
Thanks,
Wolfgang
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for reply. Instead of V2.5.1, MN demo seems to be running, but it is still not connected to the CN demo. Wireshark can not catch any powerlink package. Do you have any further suggestions?
From the logs posted, we see that the MN is not operational. Could you make sure that the native drivers are disabled in the kernel configuration when building the kernel image. Please provide more information regarding the sequence followed when running the MN.
Regards,
Powerlink-Team-Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Kalycito,
Mike's advice can resolve MN demo App( only 'Link to App' and 'Linux Userspace Daemon') running erro's problem on ZYNQ.
Select network device support -> Universal TUN/TAP device driver at rebuilding kernel. RBPi3 can try it.
But the demo_mn_console based on option CFG_BUILD_KERNEL_STACK with Linux Kernel Module run error.
My building process is as follows:
(1) Building a linux edrv kernel driver
cmake -DCFG_OPLK_MN=TRUE -DCFG_POWERLINK_EDRV_EMACPS=TRUE -DCFG_KERNEL_DIR=~/build/linux-xlnx/ -DCMAKE_TOOLCHAIN_FILE=../toolchain-xilinx-vivado-arm-linux-eabi-gnu.cmake ..
I modified the toolchain-xilinx-vivado-arm-linux-eabi-gnu.cmake file and reassigned the compiler.
(2) Building linux demo app
cmake ../.. -i
CFG_BUILD_KERNEL_STACK select "Linux Kernel Module".
(3) copy oplkemacpsmn.ko to zynq and insmod
(4) run demo app
./demo_mn_console
(5) debug console output message
MN not running correctly and no connection with CN. Please help me resolve this problem, thank you!
Best Regards,
taiw
Last edit: taiw 2017-02-23
Hello taiw,
There was a bug with the emacps edrv in the previous openPOWERLINK version.
Can you try with the current version of the stack and let us know, if it's working now?
Thanks,
Wolfgang
Hello Wolfgang,
Thank you for reply. Instead of V2.5.1, MN demo seems to be running, but it is still not connected to the CN demo. Wireshark can not catch any powerlink package. Do you have any further suggestions?
Best Regards,
taiw
Last edit: taiw 2017-03-25
Last edit: taiw 2017-03-25
Last edit: taiw 2017-03-25
Hello Taiw,
From the logs posted, we see that the MN is not operational. Could you make sure that the native drivers are disabled in the kernel configuration when building the kernel image. Please provide more information regarding the sequence followed when running the MN.
Regards,
Powerlink-Team-Kalycito