Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

 This document describes how start GOAL with the Raspberry Pi 3.

Required Hardware and Software

Following hardware and software is required for running GOAL on Raspberry Pi.

  • a Raspberry Pi 3 B+

  • a power supply for Raspberry Pi,

  • PC with Linux OS

  • GCC and the arm-gcc-linux-eabihf cross compiler (available at APT)

  • GOAL Software package/ release

Preparing the Raspberry Pi

Connect the Raspberry Pi to your local network via Ethernet. To access the device, either connect a monitor, keyboard and mouse via the provide HDMI and USB connectors or connect to the device via SSH after bootup.

Building and downloading applications

Navigate into the gcc subdirectory of one of the provided projects and run command make. On first run, you have to choose the platform. Enter the displayed ID for raspberry_pi.

maz@maz-VirtualBox:~/goal/projects/00410_goal/template/gcc$ make

No platform selected, choose a platform - OR - press <CTRL+c> and set the
PLATFORM environment variable.

Choose platform:
  [ 1] linux_x86                       (gcc)
  [ 2] linux_x86_clang                 (gcc)
  [ 3] raspberry_pi                    (gcc)

Choice [1-3]:

Build process is executed afterwards automatically. The created binary is placed in the GCC subdirectory build/raspberry_pi/goal_raspberry_pi.bin.

Downloading the binary can be realized by scp for example. If the Raspberry Pi is already connected to the local network and its {IP} it is available, run the following command to copy the binary file into the home directory of the {user}

cp build/raspberry_pi/goal_raspberry_pi.bin   {user}@{IP}:/home/{user}/

The GOAL protocol software is available as a 3h time limited demo release. In this case, the projects of protocol stacks are only available as library projects. These projects are marked by file ending _lib. Building and downloading the demo application is similar to the description above, but additionally, the library libgoal_raspberry_pi.so has to be copied to the Raspberry Pi too. The file is available in the 00_lib directory for each protocol stack.

Logging is always enabled in the libraries.

Starting applications

After downloading the binary file, the application can be executed. Please not, that you need root access to start the program. Changing to to super user by sudo su is recommended.

Subsequently, navigate into the directory where the application file is located.

If you are using the Demo version of GOAL, please set the LD_LIBRARY_PATH to the directory, where the libgoal_raspberry_pi.so is located like shown below.

root@maz-raspi:/home/pi# LD_LIBRARY_PATH=/home/pi/
root@maz-raspi:/home/pi# export LD_LIBRARY_PATH

Starting the GOAL application is done by simply executing the binary file. If your application requires a network interface, please use the argument -i to pass the interface name to your application.

See following example for a running a GOAL demo.

root@maz-raspi:/home/pi# ./goal_raspberry_pi.bin -i eth0
GOAL Start

[I|goal_taskCreate:117] creating task: GOAL Timer
[I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[I|goal_tgtTaskCreate:1252] task scheduler priority: 99
[I|goal_taskCreate:159] Created task GOAL Timer with priority 100/100 and stack 0 byte sucessfully.
[I|goal_cmInit:220] Calculated config size of 4052 in 7 modules modules
[I|goal_cmLoad:807] Checksums 2618002105 and 2618002105 match! match!
[I|goal_queueCmVarsInit:266] Use config manager variables for buffer number and sizes instead of default value defines
[I|goal_taskCreate:117] creating task: GOAL Eth TX
[I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[I|goal_tgtTaskCreate:1252] task scheduler priority: 98
[I|goal_taskCreate:159] Created task GOAL Eth TX with priority 50/100 and stack 0 byte sucessfully.
[I|goal_netIpSet:1514] ip address: 192.168.1.23
[I|goal_netIpSet:1518] netmask: 255.255.255.0
[I|goal_netIpSet:1522] gateway: 0.0.0.0
[I|goal_netIpSet:1526] IP valid flag: false
[I|goal_netIpSet:1534] successfully updated IP configuration
[I|goal_miNetOpen:267] ip address: 192.168.1.23
[I|goal_miNetOpen:271] netmask: 255.255.255.0
[I|goal_taskCreate:117] creating task: GOAL Eth RX
[I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[I|goal_tgtTaskCreate:1252] task scheduler priority: 97
[I|goal_taskCreate:159] Created task GOAL Eth RX with priority 50/100 and stack 0 byte sucessfully.
[I|goal_drvEthLinuxNativeRawInit:607] started RAW Ethernet receive thread
[I|PN_netInit:84] clearing IP configuration
[I|goal_netIpSet:1514] ip address: 0.0.0.0
[I|goal_netIpSet:1518] netmask: 0.0.0.0
[I|goal_netIpSet:1522] gateway: 0.0.0.0
[I|goal_netIpSet:1526] IP valid flag: false
[I|goal_netIpSet:1534] successfully updated IP configuration
[I|PN_netCbIpSet:370] IP: 0.0.0.0
[I|PN_netCbIpSet:371] Netmask: 0.0.0.0
[I|PN_netCbIpSet:372] Gateway: 0.0.0.0
[I|PN_netCbIpSet:373] Remanence: temporary
[I|PN_netCbIpSet:381] Update reason: 0
[I|goal_miEthMcastDel:1678] removed multicast address: 01:80:c2:00:00:0e
[I|goal_miEthMcastDel:1678] removed multicast address: 01:0e:cf:00:00:00
[I|PN_lldpMgmtAddr:1092] management address: 0.0.0.0
[I|goal_miEthMcastAdd:1636] added multicast address: 01:0e:cf:00:00:00
[I|goal_miEthMcastAdd:1636] added multicast address: 01:80:c2:00:00:0e
[I|IOD_Init:2930] PROFINET Stack Version 2.22.1
[I|IOD_Init:2938] PROFINET standard ver: V2.4
[I|IOD_Init:2939] Test specification ver: V2.4a March 2019
[I|IOD_Init:2940] Testcase ver: Bundle July 2019
[I|IOD_Init:2941] ART ver: V2.4.1.3
[I|IOD_Init:2942] SL1 Test ver: V2.40.0 V1.2
[I|IOD_Init:2943] PROFINET ver: 2.4
[I|IOD_Init:2944] GSD ver: 2.35
[I|IOD_Init:2946] Compiler Info: GCC C/C++ V9.3.0
[I|PN_devSetOrderId:604] new order ID: 00210
[I|PN_devSetSerialNr:629] new serial nr: 20074
[I|PN_devSetHwRev:506] new hw rev: 0x0001
[I|PN_devSetSwRev:532] new rev prefix: P
[I|PN_devSetSwRev:533] new rev enh: 0x50
[I|PN_devSetSwRev:534] new rev bugfix: 0x03
[I|PN_devSetSwRev:535] new rev int chg: 0x18
[I|PN_devSetSwRev:536] new rev cnt: 0x0000
[I|PN_dcpInit:289] Vendor ID: 0x028c
[I|PN_dcpInit:290] Device ID: 0x0001
[I|PN_dcpInit:324] name of station: 'dut'
[I|PN_devSetVendorName:2193] new vendor name: 'port GmbH'
[I|RPC_init:265] opened RPC UDP port: 34964
[I|RPC_init:274] opened RPC UDP port: 49152
[I|PN_recPDPortDataSync:3818] set MAU type: driver default speed and duplex
[I|OAL_ethMAUTypeSet:238] setting link speed on interface 0 to 0
[I|goal_tgtEthIfaceSpeed:1605] auto-negotiation enabled, skipping speed reset
[I|OAL_ethMAUTypeSet:245] setting duplex on interface 0 to 0
[I|goal_tgtEthIfaceDuplex:1204] auto-negotiation enabled, skipping duplex reset
[I|OAL_ethMAUTypeSet:253] enabling auto-negotiation on interface 0
[I|OAL_ethMAUTypeSet:268] setting MDI mode to auto on interface 0
[I|PN_recPDPortDataSync:3840] set link state: driver default
[I|OAL_ethPortStateSet:375] setting port state on interface 0 to default
[I|locPortTable_init:64] Initialized lldpLocPortTable
[I|locManAddrTable_init:54] Initialized lldpLocManAddrTable
[I|configManAddrTable_init:54] Initialized lldpConfigManAddrTable
[I|remTable_init:54] Initialized lldpRemTable
[I|xPnoLocTable_init:64] Initialized lldpXPnoLocTable
[I|xPnoRemTable_init:64] Initialized lldpXPnoRemTable
[I|xDot3LocPortTable_init:62] Initialized lldpXDot3LocPortTable
[I|goal_lldpSnmpMibInit:398] Initialized LLDP MIBs.
[I|IOD_Init:3119] PROFINET stack ready
[I|goal_fwInit:92] registered ARP handler
[I|goal_fwInit:101] registered UDP/TCP handler
[I|appl_setup:147] Initializing device structure
[I|appl_setup:195] PROFINET ready
[I|goal_memInitDone:152] fixed memory usage: 131708/262144 bytes bytes
[I|goal_memInitDone:157] fixed memory usage: (51%)

 

  • No labels