Code Monkey home page Code Monkey logo

openautomationtechnologies / openpowerlink_v2 Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 93.0 35.47 MB

Release 2 of the openPOWERLINK protocol stack

License: Other

CMake 5.54% C# 0.02% C 74.03% Shell 0.58% C++ 3.17% Perl 0.24% Assembly 0.40% CartoCSS 0.11% Makefile 0.62% VHDL 10.19% Tcl 4.59% Batchfile 0.01% SystemVerilog 0.34% Verilog 0.02% Mathematica 0.01% NSIS 0.12%
canopen ethernetpowerlink industrial-automation powerlink-protocol realtime

openpowerlink_v2's People

Contributors

avicreats avatar banickn avatar br-ww avatar brunnera avatar ceisserer avatar danielglau avatar gauravks avatar jbaumgar avatar kishorekumarkavuri avatar lemersberger avatar mairt avatar melvin-francis avatar mhogger avatar moserf avatar opcua-tsn-team-kalycito avatar profeltf avatar ritisharamesh avatar romainnaour avatar sebhub avatar seissw avatar sudharsansudhan avatar swetha112 avatar sylvainlesne avatar systec-dk avatar testrunner123 avatar varunrajendran avatar w-wallner avatar zelenkaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openpowerlink_v2's Issues

Windows compiler warnings for stack build

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Compile test
Managing Node : Windows (demo_mn_console)

Bug summary:

Compiler warnings are displayed for stack build.

Steps to reproduce:

  1. Build and compile the stack in both debug and release mode.

Error log:

..\..\..\..\..\src\user\pdo\pdou.c(1992): warning C4267: 'return' : conversion from 'size_t' to 'UINT', possible loss of data

..\..\..\..\..\src\user\pdo\pdoucal.c(206): warning C4267: '=' : conversion from 'size_t' to 'UINT32', possible loss of data
..\..\..\..\..\src\user\pdo\pdoucal.c(207): warning C4267: '=' : conversion from 'size_t' to 'UINT32', possible loss of data

..\..\..\..\..\src\user\sdo\sdotest-seq.c(401): warning C4267: 'function' : conversion from 'size_t' to 'UINT32', possible loss of data

..\..\..\..\..\src\user\obd\obdcdc.c(530): warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss of data

..\..\..\..\..\src\user\event\eventucalintf-circbuf.c(292): warning C4267: '=' : conversion from 'size_t' to 'UINT', possible loss of data

..\..\..\..\..\src\common\circbuf\circbuffer.c(154): warning C4267: '=' : conversion from 'size_t' to 'UINT32', possible loss of data

PFA, for the complete build log in debug and release mode.

Windows-compiler-warnings.txt

MN demo application compilation on 32 bit Windows with NDIS drivers

Kalycito bug Id: 2571
Issue Type:ENHANCEMENT
Design: Windows Terasic De2i-150
Target Release: NA

The MN demo application (demo_mn_console) fails to compile on a 32 bit Windows system while using the Kernel stack on PCIe card or Windows Kernel Module stack libraries with following error

> error LNK1120: 1 unresolved externals
> error LNK2019: unresolved external symbol _CancelIoEx referenced in function _system_stopSyncThread
> (apps\demo_mn_console\build\windows\system-windows.obj) demo_mn_console
> warning C4013: CancelIoEx undefined; assuming extern returning int (apps\common\src\system\system-windows.c) demo_mn_console

The error is produced due to missing compiler options to specify the required 32 bit version of the system library.

Zynq emacPS MN fails to reach Operational state with higher PDO configuration

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : Performance test
Managing Node : xilinx-z702 (Emacps-edrv)
Controlled Node: Bus controllers

Configuration :
1. Motion application test with 36TPDO/24RPDO/250us/400us/1000us
2. IO application test with 64TPDO/64RPDO/250us/400us/1000us

Bug summary:
The Linux openPOWERLINK MN using edrv-emacps on Zynq fails to run with above configuration, resulting in following error.

Console log:
EVENT NODE Node= 15, NmtNodeEventCheckChrestimer callb!onf State:NmtCsPreOperational1
hrestimer callback: Continuous timer (handle 0x10000001) had to skip 5 interval!
hrestimer callback: Continuous timer (handle 0x10000001) had to skip 4 interval!
hrestimer callback: Continuous timer (handle 0x10000001) had to skip 3 interval!

Data integrity test fails for Zynq hybrid MN

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : Data integrity test
Managing Node : Zynq hybrid MN(mn-dual-shmem-gpio)
Controlled Node: Bus controllers
Cycle time : Demo_3CN with 400us/1TPDO/1RPDO

Steps to reproduce:
On MN,

  1. Modify the application to perform data integrity test (Increment them PReq data to be received by CN)
  2. Re-build and run the application

On CN,

  1. Use X20 Bus Controllers, loop back the DO module outputs to DI module input using wires.

Observation:

  1. CN reaches operational state
  2. From the network traces, PReq data changes every 12 seconds (around 2,00,000 cycles delay)
  3. Counter data received in PReq is not contiguous ie. There is loss of PDO data from MN

#2754: CMake warning issue on altera-c5soc design

Stack version : 2.4.1-rc1
SHA : 4ab489e
Test case : Compile test
Managing Node : altera-c5soc (mn-soc-shmem-gpio)

When compiling the demo application for altera-c5soc design, some CMake warnings messages are displayed:

Following warning messages are appeared in the SoC EDS 14.0 Command Shell log:
_CMake Warning (dev) at <openPOWERLINK_Dir>/cmake/geneclipselibrarylist.cma
ke:64 (SET):
Policy CMP0053 is not set: Simplify variable reference and escape sequence
evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

For input:

'bsp-@FRAG_BOARD_NAME@-@CFG_DEMO_NAME@-@CFG_CPU_NAME@'

the old evaluation rules produce:

'bsp-c5soc-mn-soc-shmem-gpio-host_0_hps_0'

but the new evaluation rules produce:

'bsp-@FRAG_BOARD_NAME@-@CFG_DEMO_NAME@-@CFG_CPU_NAME@'

Using the old result for compatibility since the policy is not set.
Call Stack (most recent call first):
<openPOWERLINK_Dir>/cmake/c5socarmapppostactions.cmake:122 (GEN_ECLIPSE_
LIBRARY_LIST)
CMakeLists.txt:123 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at <openPOWERLINK_Dir>/cmake/geneclipselibrarylist.cma
ke:52 (SET):
Policy CMP0053 is not set: Simplify variable reference and escape sequence
evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

For input:

'${LIB}-@FRAG_BOARD_NAME@_@DEMO_NAME@'

the old evaluation rules produce:

'dualprocshm-host-c5soc_mn_soc_shmem_gpio'

but the new evaluation rules produce:

'dualprocshm-host-@FRAG_BOARD_NAME@_@DEMO_NAME@'

Using the old result for compatibility since the policy is not set.
Call Stack (most recent call first):
<openPOWERLINK_Dir>/cmake/c5socarmapppostactions.cmake:122 (GEN_ECLIPSE_
LIBRARY_LIST)
CMakeLists.txt:123 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it._

PCP crash on APC2100 with higher PDO size

Kalycito bug Id: 2696
Bug Type: PERFORMANCE optimization
Design:Windows/Linux PCIe
Target Release: v2.4.1
Status: IN-PROGRESS

Configuration:

MN CN CDC
demo_mn_console Bus coupler 30/252TPDO/104RPDO/2ms/5ms/10ms

When run with the above configuration, the PCP stops with no errors reported. The log for the failure case is as below:

Error Log:
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/20 Mapped object 0xA1C3/ 18
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/21 Mapped object 0xA1C3/ 19
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/22 Mapped object 0xA1C3/ 20
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/23 Mapped object 0xA1C3/ 21
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/24 Mapped object 0xA1C3/ 22
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/25 Mapped object 0xA1C3/ 23
2016/05/27-15:53:01 INFO     PDOMAP           0x1a11/26 Mapped object 0xA1C3/ 24
2016/05/27-15:53:01 EVENT    STATE_CHANGE   NmtGsResetCommunication->NmtGsResetConfiguration Originating event:NmtEventEnterResetConfig
Kernel stack has gone! Exiting...
2016/05/27-15:53:02 FATAL    CONTROL        Kernel stack has gone! Exiting...
Press Enter to quit!
Stack is in state off ... Shutdown
2016/05/27-15:53:40 INFO     CONTROL        Stack is in state off ... Shutdown openPOWERLINK
Exiting Sync Thread

Driver prints for Zynq emacPS are displayed in the console

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : Basic run test
Managing Node : Zynq emacPs
Controlled Node: Bus controllers
Configuration : Demo_3CN with 50ms/1TPDO/1RPDO

Steps to reproduce:

  1. Build the stack, driver and demo application
  2. Run the demo_mn_console application

Observation:
Following prints are displayed, while running the demo_mn_console application
"SendAsyncFrame()Received frame size:xx" . (Even though the driver is built in the release mode.)

emacps-sendasyncframe-prints

#2570: CMake v3.3.0 warning issues

Steps to reproduce:

  1. Use Cmake GUI (v3.3.0) to build the binaries of stack and application directories in the openPOWERLINK stack
  2. Click "Configure" and "Generate" button.

Following warning message is appeared in the CMake console log:
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS
properties.
Run "cmake --help-policy CMP0043" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it._

Zynq emacPs kernel panic

Kalycito bug Id: 1809
Issue Type: BUG
Design: Linux emacps (Xilinx z702)
Target Release: v2.5.0-rc1

openPOWERLINK kernel module results in kernel panic when the application is restarted.

Error log:
Code: e0844183 12433001 03a0307f e5853480 (e5943000) 
---[ end trace 823ae75fddd8c58c ]---
Kernel panic - not syncing: Fatal exception in interrupt

Issue also reported in the sourceforge forum at : https://sourceforge.net/p/openpowerlink/discussion/newbie/thread/d2abd70e/

#2753: Warning issue on Linux 8255x edrv

Stack version : 2.4.1-rc1
SHA : 4ab489e
Test case : Compile test
Managing Node : Linux edrv โ€“ 8255x

When compiling the driver for Linux edrv (8255x), some warnings are raised:

Following warning message has appeared in the console log:
<openPOWERLINK_dir>/drivers/linux/drv_kernelmod_edrv/build/src/edrv-8255x.c: In function โ€˜edrvIrqHandlerโ€™:
<openPOWERLINK_dir>/drivers/linux/drv_kernelmod_edrv/build/src/edrv-8255x.c:924:38: warning: cast from pointer to integer of different size -Wpointer-to-int-castpDmaBuffer,
^
<openPOWERLINK_dir>/drivers/linux/drv_kernelmod_edrv/build/src/edrv-8255x.c: At top level:
cc1: warning: unrecognized command line option "-Wno-date-time" [enabled by default]

#2455: Terasic DE2-115 MN fails to reach operational with process application configuration

Configuration:
MN Configuration: mn-dual-hostif-gpio
CN Configuration: X20 bus couplers
Configuration used: 30Cns/252TPDO/104RPDO with 2ms/5ms/10ms cycle time

Steps to reproduce:

  1. Configure the process application scenario with the 5ms cycle time and build the application.
  2. Clean the generated files using "make clean" from the command line
  3. With 10ms cycle time, rebuild the application using "./create-this-app" from the command line

Issue:

  1. "make clean" command doesn't clean the configurations

SDO segmented data transfer issue

Test configuration:

Managing Node: Linux 8255x edrv
Controlled Node: Linux 8111 edrv
CDC configuration: Demo_3CN

Following steps were carried out to perform the test:

  • Change the MN application (/stack/src/user/cfmu.c) to transfer data(Using .srec file) from MN to CN

  • Change the following files in CN application (/apps/demo_cn_console/src) to receive the data from MN

    1. <openPOWERLINK-dir>/apps/demo_cn_console/src/event.c 
    2. <openPOWERLINK-dir>/apps/demo_cn_console/src/main.c
    3. Add fwupdate.c and fwupdate.h files in <openPOWERLINK-dir>/apps/demo_cn_console/src folder
    
  • Run both MN and CN application

  • Compare SDO data in both the .srec file of MN and the received .txt file of CN.

Observations:

  • Linux Edrv design: (tested with 5ms cycle time)

    1. Mismatch of SDO data transfer from MN to CN        
    2. Instead of SDO data, 0's are transferred (Verified using network trace)
    3. Loss of SDO data (Verified from received file and network trace)
    
  • Linux PCAP design:

    1. Segmented data transfer is not supported with 50ms cycle time  
    

Following test files are attached for references(circbuff-files.zip)

circbuff-files.zip

  • Source files for Segmented data transfer test(Both MN and CN)
  • Transferred data file and received data file
  • Network trace

#2756: Warning issue on Zynq on Linux

Stack version : 2.4.1-rc1
SHA : 4ab489e
Test case : Compile test
Managing Node : Zynq on Linux

When compiling the stack for Zynq on Linux, some warnings are raised:

Following warning message is appeared in the console log:
/stack/src/user/event/eventu.c: In function 'eventu_process':
/stack/src/user/event/eventu.c:347:5: warning: 'eventSource' may be used uninitialized in this function [-Wmaybe-uninitialized]
/stack/src/user/event/eventu.c:190:29: note: 'eventSource' was declared here

hrtimer with preempt-rt

Hello !

We have a bug on our installation with openPowerlink. We are using openPowerlink v2.3.2 and the Linux kernel 4.1.23 with preempt-rt 23.
When a node is CN, we have a Kernel panic randomly:

[   94.407318] ------------[ cut here ]------------
[   94.407318] Kernel BUG at c00829ec [verbose debug info unavailable]
[   94.407348] Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
[...]
[   94.407684] Backtrace: 
[   94.407714] [<c008283c>] (run_hrtimer_softirq) from [<c0045b74>] (do_current_softirqs+0x1ec/0x2a4)
[   94.407745]  r10:00000020 r9:c08086c0 r8:c07c2c38 r7:00000000 r6:04208140 r5:00000008
[   94.407745]  r4:c07c2d40 r3:c07c5178
[   94.407745] [<c0045988>] (do_current_softirqs) from [<c0046170>] (run_ksoftirqd+0x30/0x64)
[   94.407775]  r10:00000000 r9:00000002 r8:c07c2dec r7:00000001 r6:00000000 r5:dd814a00
[   94.407775]  r4:dd86a000
[   94.407806] [<c0046140>] (run_ksoftirqd) from [<c005f420>] (smpboot_thread_fn+0x160/0x290)
[   94.407836] [<c005f2c0>] (smpboot_thread_fn) from [<c005c11c>] (kthread+0xcc/0xe4)
[   94.407836]  r10:00000000 r9:00000000 r8:00000000 r7:c005f2c0 r6:dd814a00 r5:dd814a80
[   94.407867]  r4:00000000 r3:dd8592c0
[   94.407867] [<c005c050>] (kthread) from [<c0015d68>] (ret_from_fork+0x14/0x2c)
[   94.407897]  r7:00000000 r6:00000000 r5:c005c050 r4:dd814a80
[   94.407897] Code: e3130008 0affffb7 eb13d445 eaffffb5 (e7f001f2) 
[   94.715637] ---[ end trace 0000000000000002 ]---
[   94.715637] Kernel panic - not syncing: Fatal exception

After analyse, the bug is on kernel/time/hrtimer.c:hrtimer_rt_reprogram
This function tries to restart the timer but it is already active => Kernel Panic.
The callback hrtimer-linuxkernel.c:timerCallback provides The "restart" information.

Our correction is to check the state of the timer with hrtimer_active(pTimer_p) on hrtimer-linuxkernel.c:timerCallback

Index: src/kernel/timer/hrestimer-linuxkernel.c
===================================================================
--- src/kernel/timer/hrestimer-linuxkernel.c    (rรฉvision 193705)
+++ src/kernel/timer/hrestimer-linuxkernel.c    (copie de travail)
@@ -473,6 +473,12 @@
             goto Exit;
         }

+        if(hrtimer_active(pTimer_p)) {
+           printk("hrtimer_active !!!\n");
+            /* modified timer has already been restarted */
+            goto Exit;
+        }
+
 #ifdef PROVE_OVERRUN
         now      = ktime_get();
         interval = ktime_add_ns(ktime_set(0, 0), pTimerInfo->period);

Do you think our correction is correct ?

We have found another small problem:

Index: src/kernel/timer/hrestimer-linuxkernel.c
===================================================================
--- src/kernel/timer/hrestimer-linuxkernel.c    (rรฉvision 189443)
+++ src/kernel/timer/hrestimer-linuxkernel.c    (rรฉvision 189444)
@@ -212,7 +212,7 @@

     for (index = 0; index < TIMER_COUNT; index++)
     {
-        pTimerInfo = &hresTimerInstance_l.aTimerInfo[0];
+        pTimerInfo = &hresTimerInstance_l.aTimerInfo[index];
         pTimerInfo->pfnCallback = NULL;
         pTimerInfo->eventArg.timerHdl = 0;
         /* In this case we can not just try to cancel the timer.

Linux PCIe CPU load

Kalycito bug Id: 2412
Bug Type: PERFORMANCE optimization
Design: Linux Terasic DE2i-150
Target Release: v2.5.0-rc1

Test Configuration:
TerasicDE2i-150 MN mn-single-pcie-drv

CN Configuration:
X20 bus couplers

High CPU load could be caused because of low POWERLINK cycle times and high PDO sizes which causes the console logs of the demo to hang without affecting the POWERLINK operations.

The bug is planned to be fixed as part of dualprocshm optimization.

Unable to configure openpowerlink on externel PCIe

Unable to run the demo application when the kernel part of the openPOWERLINK stack is located on an external PCIe device. I am getting the following error. Could somebody help me with this?

Thanks

Error:

system_init() couldn't set nice value! (Operation not permitted)
system_init() couldn't set thread scheduling parameters! 20
2016/10/21-13:00:06 INFO GENERIC demo_mn_console: Stack Version:V2.4.1 Stack Configuration:0x0000002B
2016/10/21-13:00:06 INFO GENERIC Using CDC file: mnobd.cdc
2016/10/21-13:00:06 INFO CONTROL Initializing openPOWERLINK stack
ctrlucal_init() open return error -1 (Unknown error -1)
Could not initialize ctrlucal
oplk_initialize() failed with "Resource could not be created (Windows, PxROS, ...)" (0x0008)
2016/10/21-13:00:06 FATAL CONTROL oplk_init() failed with "Resource could not be created (Windows, PxROS, ...)" (0x0008)

oplk_freeProcessImage() failed with "API called but stack is not initialized/running" (0x014e)
oplk_execNmtCommand() failed with "API called but stack is not initialized/running" (0x014e)
2016/10/21-13:00:06 INFO CONTROL Stack is in state off ... Shutdown openPOWERLINK
eventu_postEvent() Eventu module is not initialized
eventu_postEvent() Eventu module is not initialized
eventu_postEvent() Eventu module is not initialized
eventu_postEvent() Eventu module is not initialized
eventu_postEvent() Eventu module is not initialized
ctrlucal_executeCmd() ioctl error -1
Stack is in state off ... Shutdown`

User mapping test fails for Linux edrv (8139 & 8255x)

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : User mapping test
Managing Node : Linux 8139 & 8255x edrv
Controlled Node: Bus Controllers
Cycle time : 10ms

Bug summary:

CN's reached operational state but the mapped data is not received by the CN.

Steps to reproduce:

  1. Build the stack, driver and application
  2. Edit the application to perform user mapping test
  3. Rebuild and run the application

Number prints are displayed in the console log

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : Basic run test
Managing Node : Hybrid Zynq MN (Linux on ARM + Microblaze)
Controlled Node: Bus controllers
Configuration : Demo_3CN with 50ms/1TPDO/1RPDO

Bug summary:
Once the PDO Configuration is downloaded, number "2222222" is displayed in console log.

Steps to reproduce:

  1. Build the stack, driver and demo application to perform the basic run test
  2. Run the demo_mn_console application

Console log:
2016/06/09-16:37:14 INFO PDOMAP 0x1601/16 Mapped object 0xA4C0/ 52
2016/06/09-16:37:14 INFO PDOMAP 0x2222222222222222222222222222222222222222222222

Screenshot:
hybrid-zynq-mn-number-issue

Error initializing powerlink stack after application crashes

I am getting the following error when I try to call the function oplk_init() if my application does not close properly, and I try to run it again.

"Resource could not be created (Windows, PxROS, ...)"

It there anyway to reset the stack before starting the application in case of incorrect closure of application? I am using the 3.12.26-rt40 linux kernel and openPOWERLINK-V2.0.1. I also get the same error with V2.3.1.

Basic run test fails for Altera Terasic De2-115 (mn-single-hostif-gpio,mn-single-hostif-drv)

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Basic run test
Managing Node : Terasic de2-115 (mn-single-hostif-gpio,mn-single-hostif-drv)
Controlled Node : Bus Controllers
Cycle time : 50ms

Bug summary:

MN does not initialize and fails to reach operational state.

Test to reproduce:

  1. Build the hardware, stack, driver and application.
  2. Run the application with the above mentioned configuration.

PC reboots while running Application Demo using Linux Edrv Kernel Driver.

I have followed the instructions to configure openPowerlink stack using Linux Edrv Kernel Driver. However when I run the demo application the computer reboots. There is no error message.

I am using Powerlink v 2.4.1
Kernel version 3.10.0-327.28.3.el7.x86_64
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)

--Trying to use 03:00.0 Ethernet controller.

Document test fails for Altera C5-SoC design

Bug description:

Command to prepare SD card for altera c5-soc (mn-soc-shmem-gpio)is incorrect in source forge link:

http://openpowerlink.sourceforge.net/doc/2.5/2.5.0/page_platform_altera-soc.html

Command in source-forge:

  1. dd if=<Altera_installation_dir>/embedded/embeddedsw/socfpga/prebuilt_images/sd_card_linux_boot_image.img of=/dev/<sd_card_drive>
  2. alt-boot-disk-util -p preloader-mkpimage.bin -a write -d <sd_card_path> bs=1M

Actual command to be added:

  1. dd if=${SOCEDS_DEST_ROOT}/embeddedsw/socfpga/prebuilt_images/sd_card_linux_boot_image.img of=/dev/<sd_card_drive> bs=1M
  2. alt-boot-disk-util -p preloader-mkpimage.bin -a write -d <sd_card_path>

Argument "bs=1M" should be added in the first command and removed in second command

MAC address for Zynq hybrid MN is displayed as 0

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : API test - oplk_getEthMacAddr ( )
Managing Node : Zynq hybrid MN(mn-dual-shmem-gpio)
Controlled Node: Bus controllers
Cycle time : Demo_3Cn (50ms/1TPDO/1RPDO)

Bug summary:
MAC address for Zynq hybrid MN is displayed as (0: 0: 0: 0: 0: 0).

Steps to reproduce:

  1. Modify the application to perform the oplk_getEthMacAddr ( ) test case.
  2. Re-build and run the demo_mn_console application

Console Log:

2016/06/09-16:34:56 INFO GENERIC demo_mn_console: Stack version:V2.5.0-rc2 Stack configuration:0x0000000B
2016/06/09-16:34:56 INFO GENERIC Using CDC file: mnobd.cdc
Initializing openPOWERLINK stack...
2016/06/09-16:34:56 INFO CONTROL Initializing openPOWERLINK stack

Ethernet Interface MAC address : 0: 0: 0: 0: 0: 0
Initializing process image...

SDO over Udp test fails for Linux and Windows design

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : SDO over UDP test
Managing Node : Linux edrv/Windows
Controlled Node: Bus Controllers
Cycle time : 10ms

Bug summary:

SDO over Udp test fails for Linux/Windows designs.

Steps to reproduce:

  1. Build the stack, driver and application.
  2. Change the application to perform SDO over Udp test.
  3. Rebuild and run the application

Observation:
Udp frames are not received while running the application

MN fails to reach Operational state with higher PDO configuration on Zynq emacPS

Kalycito bug Id: 2679
IssueType: BUG
Design: Linux Emacps (xilinx-z702)
Target Release: v2.5.0-rc1

Configuration:

MN CN CDC
demo-mn-console Bus couplers 30CN/252TPDO/104RPDO/10ms

The Linux openPOWERLINK MN using edrv-emacps on Zynq fails to run with above configuration resulting in following error

EVENT HISTORY Source = EventSourceEventk (0x06) OplkError = No free entry in internal buffer table for Tx frames (0x014) OrgSource = EventSourceNmtk 0x02
EVENT STATE_CHANGE   NmtMsNotActive->NmtGsOff Originating event:NmtEventCriticalError

Windows PCIe queue corruption with virtual Ethernet

Kalycito bug Id: 2749
Issue Type: Bug
Design: Windows PCIe
Target Release: v2.4.1

The openPOWERLINK solution using Windows PCIe design with virtual Ethernet interface enabled, may lead to issues with the queue corruption. The queue corruption is noticed when there is excessive non-POWERLINK communication through the virtual Ethernet interface.

Zynq hybrid: Microblaze BSP build fails due to missing openmac_cfg.h

Building the Microblaze BSP for the Zynq hybrid design fails due to missing openmac_cfg.h file.

Log:

[ 22%] Generating bsppcp/pcp/lib/libxil.a
Starting SDK. This could take few seconds... done
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
CRITICAL WARNING: [Hsi 55-1608] VERSION option is not used in file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_openmac_v1_02_a/data/axi_openmac_v2_1_0.mdd. Use 'OPTION VERSION = <>;' && 'OPTION NAME = <>;' in MDD.
CRITICAL WARNING: [Hsi 55-1608] VERSION option is not used in file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_hostinterface_v1_02_a/data/axi_hostinterface_v2_1_0.mdd. Use 'OPTION VERSION = <>;' && 'OPTION NAME = <>;' in MDD.
CRITICAL WARNING: [Hsi 55-1608] VERSION option is not used in file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_openmac_v1_02_a/data/axi_openmac_v2_1_0.mdd. Use 'OPTION VERSION = <>;' && 'OPTION NAME = <>;' in MDD.
CRITICAL WARNING: [Hsi 55-1608] VERSION option is not used in file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_hostinterface_v1_02_a/data/axi_hostinterface_v2_1_0.mdd. Use 'OPTION VERSION = <>;' && 'OPTION NAME = <>;' in MDD.
Hardware platform project 'hw_platform' created successfully.
/opt/toolchains/xilinx/SDK/2016.2/gnu/microblaze/lin
CRITICAL WARNING: [Hsi 55-1564] TCL file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_openmac_v1_02_a/data/openmac.tcl doesn't exist for driver openmac
CRITICAL WARNING: [Hsi 55-1564] TCL file /somewhere/hardware/ipcore/xilinx/components/pcores/axi_openmac_v1_02_a/data/openmac.tcl doesn't exist for driver openmac
BSP project 'bsppcp' created successfully.
Running Make include in pcp/libsrc/bram_v4_1/src
Running Make include in pcp/libsrc/cpu_v2_5/src
Running Make include in pcp/libsrc/ddrps_v1_0/src
Running Make include in pcp/libsrc/gpio_v4_1/src
Running Make include in pcp/libsrc/intc_v3_5/src
Running Make include in pcp/libsrc/standalone_v5_5/src
Running Make include in pcp/libsrc/uartlite_v3_2/src
Running Make include in pcp/libsrc/uartps_v3_1/src
Running Make libs in pcp/libsrc/bram_v4_1/src
Compiling bram
mb-ar: creating ../../../lib/libxil.a
Running Make libs in pcp/libsrc/cpu_v2_5/src
Compiling cpu
Running Make libs in pcp/libsrc/ddrps_v1_0/src
Compiling ddrps
Running Make libs in pcp/libsrc/gpio_v4_1/src
Compiling gpio
Running Make libs in pcp/libsrc/intc_v3_5/src
Compiling intc
Running Make libs in pcp/libsrc/standalone_v5_5/src
Compiling standalone
Running Make libs in pcp/libsrc/uartlite_v3_2/src
Compiling uartlite
Running Make libs in pcp/libsrc/uartps_v3_1/src
Compiling uartps
Finished building libraries
...
In file included from /somewhere/stack/src/kernel/edrv/edrv-openmac.c:49:0:
/somewhere/stack/include/target/openmac.h:45:25: fatal error: openmac_cfg.h: No such file or directory
compilation terminated.
gmake[2]: *** [proj/generic/liboplkmndrv-dualprocshm/CMakeFiles/oplkmndrv-dualprocshm.dir/__/__/__/src/kernel/edrv/edrv-openmac.c.obj] Error 1
gmake[1]: *** [proj/generic/liboplkmndrv-dualprocshm/CMakeFiles/oplkmndrv-dualprocshm.dir/all] Error 2
gmake: *** [all] Error 2

Workaround:
Vivado selects the ISE compatible ipcore of openMAC, thus, removing it before building works as a temporary workaround.

rm -rf hardware/ipcore/xilinx/components/pcores

Max PDO test fails for Windows PCIe Terasic DE2i-150

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Max PDO test
Managing Node : Windows PCIe Terasic DE2i-150
Controlled Node: Altera Terasic de2-115 Max PDO CN
Cycle time : 10ms

Bug summary:

CN doesn't reach operational state and fails to receive Max payload data.

Test to reproduce:

  1. Build the stack, driver and application.
  2. Change the application to perform Max PDO test.
  3. Rebuild and run the application.

Error log:

EVENT CFM_PROGRESS Node= 1, Object 0x1600/001, 123/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_MAPPABLE(0x06040041), Error=0x0000
EVENT CFM_RESULT Node= 1, NmtNodeCommandConfErr
EVENT NODE Node= 1, NmtNodeEventError State:NmtCsNotActive
EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsNotActive
Node 1 entered state NmtCsNotActive
EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsPreOperational2
Node 1 entered state NmtCsPreOperational2
EVENT NODE Node= 1, NmtNodeEventFound State:NmtCsPreOperational2
Stack found node 1
VENT NODE Node= 1, NmtNodeEventCheckConf State:NmtCsPreOperational2
EVENT CFM_PROGRESS Node= 1, Object 0x1011/001, 8/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_EXIST(0x06020000), Error=0x0000

Performance degradation issue for Zynq hybrid design

Bug description:

Stack version : 2.5.0-rc2
SHA : 03d3974
Test case : Performance test (Motion application)
Managing Node : Zynq hybrid MN(mn-dual-shmem-gpio)
Controlled Node: Bus controllers
Cycle Time: 250us
Configuration : 10 CN's/36TPDO/24RPDO/

Bug summary:

Performance dip observed in Zynq hybrid MN between pull request > #168

baseline being (a4a80f7) and v2.5.0-rc2 (03d3974).

Performance in > #168

Cycle time 250 usec - 5 CN's were operational (around 1hr test)

Performance in 2.5.0-rc2:

Cycle time 250 usec - only 2 CN's came operational, but they reset after few minutes and MN reaches shutdown state.

Steps to reproduce:

  1. Build the hardware, stack, driver and application
  2. Run the application with above mentioned configuration

PRes Chaining fails to work with Demo_3Cn configuration

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : PResChaining test
Platform : All platform
Controlled Node: Bus controllers
Configuration : Demo_3CN with 10ms/Chained station(NodeID-1,32,110)/1TPDO/1RPDO.

Bug summary:
Controlled Nodes continuously resets without reaching operational state.

Steps to reproduce:

  1. Build the stack, driver and demo application to perform PRes Chaining test
  2. Run the MN application with the above mentioned configuration.

Max PDO test fails for Linux 8111 edrv

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Max PDO test
Managing Node : Linux 8111 edrv
Controlled Node: Altera Terasic de2-115 Max PDO CN
Cycle time : 10ms

Bug summary:

CN doesn't reach operational state and fails to receive Max payload.

Test to reproduce:

  1. Build the stack, driver and application.
  2. Change the application to perform Max PDO test.
  3. Rebuild and run the application.

Error log:

EVENT CFM_PROGRESS Node= 1, Object 0x1600/001, 123/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_MAPPABLE(0x06040041), Error=0x0000
EVENT CFM_RESULT Node= 1, NmtNodeCommandConfErr
EVENT NODE Node= 1, NmtNodeEventError State:NmtCsNotActive
EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsNotActive
Node 1 entered state NmtCsNotActive
EVENT NODE Node= 1, NmtNodeEventNmtState State:NmtCsPreOperational2
Node 1 entered state NmtCsPreOperational2
EVENT NODE Node= 1, NmtNodeEventFound State:NmtCsPreOperational2
Stack found node 1
VENT NODE Node= 1, NmtNodeEventCheckConf State:NmtCsPreOperational2
EVENT CFM_PROGRESS Node= 1, Object 0x1011/001, 8/ 162 Bytes -> SDO Abort=SDO_AC_OBJECT_NOT_EXIST(0x06020000), Error=0x0000

linux build, documentation and .gitignore

I tested the openPOWERLINK User Stack on BeagleBone Black
and here are some things I noticed.

build openPOWERLINK Stack Libraries with

cd ~/openPOWERLINK/stack/build/linux
cmake -DCMAKE_BUILD_TYPE=Debug ../..
make
make install

doesn't work

build openPOWERLINK Stack Libraries with

cd ~/openPOWERLINK/stack
cmake -DCMAKE_BUILD_TYPE=Debug
make
make install

does work, but the build files "Makefile, cmake_install.cmake, *.a"
not in ~/openPOWERLINK/stack/build/linux
and produce a lot of Untracked files in git.

internal links in the documentation doesn't work
why "\ref page_platforms" and not "platforms" in the md-files.

Best regards,
Ewald

NIOS2 build issue when NIOS2_EIC_PRESENT is defined.

The NIOS2 oplk CN drv doesn't build on NIOS2 system if one or more EIC (Extended Interrupt Controller) are present.

In commit 55959ef alt_irq_pending() is used directly by
OPENMAC_GETPENDINGIRQ() macro but alt_irq_pending() is not always defined.

See sys/alt_irq.h:
/*

  • alt_irq_pending() returns a bit list of the current pending interrupts.

  • This is used by alt_irq_handler() to determine which registered interrupt

  • handlers should be called.
    *

  • This routine is only available for the Nios II internal interrupt

  • controller.
    */

    ifndef NIOS2_EIC_PRESENT

    static ALT_INLINE alt_u32 ALT_ALWAYS_INLINE alt_irq_pending (void)
    {
    alt_u32 active;

    NIOS2_READ_IPENDING (active);

    return active;
    }

I'm not sure if this is safe to do this in openmac-nios2.h:

ifndef NIOS2_EIC_PRESENT

define OPENMAC_GETPENDINGIRQ() alt_irq_pending()

else

define OPENMAC_GETPENDINGIRQ() 0

endif

Thoughts ?

CMake: static linking with libpcap

Hello,

When linking demo_mn_console statically with pcap, the CMake build system forget to link with other libraries linked with libpcap (-lnl-genl-3 -lnl-3 -ldbus-1 -pthread).

[100%] Linking C executable demo_mn_console
/home/buildroot/build/instance-0/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libpcap.a(pcap-linux.o): In function nl80211_init': pcap-linux.c:(.text+0x41e): undefined reference to nl_socket_alloc'

To fix this, the build system could use pcap-config:
pcap-config --libs --static
-L/path/to/sysroot/usr/lib -lpcap -L/path/to/sysroot/usr/lib/.libs -lnl-genl-3 -lnl-3 -L/path/to/sysroot/usr/lib -ldbus-1 -pthread

Full build log:
http://autobuild.buildroot.net/results/385/3859dc0f4de7e3284a96d5841f040f69f71842df/build-end.log

Best regards,
Romain

Basic run test fails for Altera Terasic De2-115 (cn-single-hostif-gpio, cn-single-hostif-drv)

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Basic run test
Managing Node : Linux edrv
Controlled Node: Terasic de2-115 (cn-single-hostif-gpio, cn-single-hostif-drv)
Cycle time : 50ms

Bug summary:

CN does not initialize and fails to reach operational state.

Test to reproduce:

  1. Build the hardware, stack, driver and application.
  2. Run the application with the above mentioned configuration.

Warnings with CMake v3.3.0

Kalycito bug Id: 2570
Bug Type: ENHANCEMENT
Design: All Platforms
Target Release: v2.4.1

Following warnings are generated while using CMake v3.3.0 for configuring openPOWERLINK build

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

Performance issues on Altera C5SOC

Kalycito bug Id: 2699
Bug Type: PERFORMANCE optimization
Design: Altera C5SOC
Target Release: v2.4.1

Configuration:

MN CN CDC
mn-soc-shmem-gpio Bus coupler 10CN/36TPDO/24RPDO/400us/800us
mn-soc-shmem-gpio Bus coupler 20CN/64TPDO/64RPDO/400us/10ms
mn-soc-shmem-gpio Bus coupler 30CN/252TPDO/104RPDO/2ms/10ms

Observation:

  • With 10CN/36TPDO/24RPDO configuration:
    • MN hangs PRE_OP2 state with the 250us, 400us and 500us cycle time
  • With 20CN/64TPDO/64RPDO configuration:
    • MN hangs PRE_OP2 state with the 400us, 500us, 800us, 1000us and 2000us cycle time
    • MN reaches Operational state with the 5000us cycle time and all the CN were crashed after 20 minutes.
    • MN reaches Operational state with the 10000us cycle time, during the long run following error message is displayed in LCD screen
      ERROR=0x0005โ€(Operation is not allowed in this situation)
  • With 30CN/252TPDO/104RPDO configuration:
    • MN hangs Ready_to_Operate state with the 2000us, 5000us and 10000us cycle time

Zynq hybrid: Bitstream generation fails if SKIP_BITSTREAM is ON

Skipping the bitstream generation enables just exporting handoff files to the software build. This is used to accelerate Jenkins builds if only software parts have changed.

hardware/build/xilinx-microblaze $ cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../../../cmake/toolchain-xilinx-microblaze-gnu.cmake -DDEMO_Z702_MN_DUAL_SHMEM_GPIO=ON -DSKIP_BITSTREAM=ON
-- Hardware platform: DEMO_Z702_MN_DUAL_SHMEM_GPIO set to ON!
-- Generating targets for demo z702-mn-dual-shmem-gpio!
CMake Error at cmake/xilinx/genbitstream.cmake:40 (ADD_CUSTOM_COMMAND):
  add_custom_command Wrong syntax.  A TARGET or OUTPUT must be specified.
Call Stack (most recent call first):
  boards/xilinx-z702/mn-dual-shmem-gpio/CMakeLists.txt:57 (GENERATE_BITS)


-- The C compiler identification is GNU 5.2.0
-- Check for working C compiler: /opt/Xilinx/SDK/2016.2/gnu/microblaze/lin/bin/mb-gcc
-- Check for working C compiler: /opt/Xilinx/SDK/2016.2/gnu/microblaze/lin/bin/mb-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring incomplete, errors occurred!

Compilation test (Driver compilation) fails for Windows NDIS design

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Compile test (Driver compilation)
Managing Node : Windows (demo_mn_console)

Bug summary:

Driver compilation fails for Windows NDIS intermediate driver.

Steps to reproduce:

  1. Compile the driver (drv_ndis_intermediate).

Error log:

<openPOWERLINK-dir>\drivers\windows\drv_
s_intermediate\drv_ndis_intermediate.vcxproj.met
<openPOWERLINK-dir>\drivers\windows\drv_
s_intermediate\drv_ndis_intermediate.vcxproj" (d
ClCompile target) ->
 <openPOWERLINK-dir>drivers/windows/drv
8): error C2036: 'const void *' : unknown size [
vers\windows\drv_ndis_intermediate\build\drv_ndi
diate.vcxproj]
 <openPOWERLINK-dir>/drivers/windows/drv
 error C4013: 'ctrlk_init' undefined; assuming e
<openPOWERLINK-dir>\drivers\windows\drv_ndis_inter
iate\drv_ndis_intermediate.vcxproj]
 <openPOWERLINK-dir>/drivers/windows/drv
 error C4013: 'ctrlk_exit' undefined; assuming e
<openPOWERLINK-dir>\drivers\windows\drv_ndis_inter
iate\drv_ndis_intermediate.vcxproj]
 <openPOWERLINK-dir>/drivers/windows/drv
 error C4013: 'ctrlk_updateHeartbeat' undefined;
[<openPOWERLINK-dir>\drivers\windows\drv
is_intermediate\drv_ndis_intermediate.vcxproj]

EPCS boot issue for Terasic DE2i-150

Application is unable to boot from the EPCS flash on Terasic DE2i-150 development board.

Steps followed to test the flash booting:

  • Create the .jic (.sof + .elf) and use the quartus-programmer.exe to program it to the EPCS flash.
    • The programming succeeds without any errors.
  • Restart the board to boot from the new noticed that .elf is unable to boot.
    • The FPGA was configured correctly. This was confirmed by using the JTAG to run the application without reprogramming the FPGA.

A support request with Altera is created to get a solution for this issue. Currently we are waiting for an update from them.

Windows compiler warning for application build

Bug description:

Stack version : 2.5.0
SHA : ed45710
Test case : Compile test
Managing Node : Windows (demo_mn_console)

Bug summary:

Compiler warnings are displayed for application build.

Steps to reproduce:

  1. Build and compile the application in release mode.

Error log:

<openPOWERLINK-dir>\apps\common\src\system\system-windows.c(225): warning C4013: 'CancelIoEx' undefined; assuming extern returning int

Avnet LX150T MN design initilization

Kalycito Bud ID: #2162

The Avnet LX150T MN design fails to initialize randomly reporting error with the host interface initialization.

Problem arises due to unknown bug in the Xilinx ISE 14.7 which results in inconsistent placement and routing on modifications to any IP core parameters such as base address, and internal register configurations.

In past discussions with Xilinx, no conclusive fix for the issue is identified, as there is no active support from Xilinx for ISE + spartan 6 designs.

Target Release : NA
Status: OPEN

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.