...
goal_cclIeSlaveTimeSlotMacAddrAdd
...
...
Assign a VLAN to a timeslot for this Remote Station.
...
Table 1‑4: Functions for Remote Station configuration
Starting the CC-Link IE TSN Master Stack
...
...
NXP LS1028A
The NXP LS1028A is a SoC that fullfills the hardware requirements for a Class B device.
There is an evaluation board called LS1028ARDB.
Building the firmware
The LS1028ARDB uses OpenIL, a Linux distribution for industrial automation with Realtime support. The distribution can be built with Buildroot.
Code Block | ||
---|---|---|
| ||
git clone
cd openil
git checkout OpenIL-v1.9-202009 #alternatively you can choose a newer release
make nxp_ls1028ardb-64b_defconfig
make 2>&1 | tee build.log |
Flashing the firmware
Once the firmware has been built it must be copied to the SD-Card of the LS1028ARDB.
insert SD-Card into Linux PC
card is listed as /dev/sdX [e.g. /dev/sdc]
see log via dmesg
in directory openil:
sudo dd if=output/images/sdcard.img of=/dev/sdc bs=1024
ATTENTION: choosing the wrong output device will overwrite sections of the PC’s HDD/SDD causing data loss
insert SD-Card into LS1028ARD and start device
Debug Interface
A serial console is available on UART1.
Use the following parameters: 115,200 baud/s, 8 data bits, no parity, 1 stop bit.
Configuration of the LS1028ARDB
It is possible to configure the number of ports used for CC-Link IE TSN. By default each port of the integrated TSN Switch is independent, i.e. there is no forwarding between these ports.
The interfaces representing these ports are called swp0 to swp3. In order to enable forwarding between two or more ports the following script could be executed:
Code Block | ||
---|---|---|
| ||
#!/bin/sh
# create a bridge device
ip link add name switch type bridge
ip link set switch up
# add 1st port
ip link set swp0 master switch
ip link set swp0 up
# add 2nd port
ip link set swp1 master switch
ip link set swp1 up
# uncomment to add 3rd port
#ip link set swp2 master switch
#ip link set swp2 up
# uncomment to add 4th port
#ip link set swp3 master switch
#ip link set swp3 up
# add a route for this interface (subnet address might need to adjusted)
ip route add 192.168.3.0/24 dev switch |
This will create a new interface called “switch”.
By default, the OpenIL image runs netopeer2, a NETCONF server. This server interfers with the Realtime behaviour of the GOAL process. Therefore, the server must be removed from the initialization scripts:
Code Block | ||
---|---|---|
| ||
rm /etc/init.d/S91netopeer2-server |
Building the CC-Link IE TSN Master Application
The application can be built with aarch64-linux-gnu-gcc.
Navigate to the project folder of a sample application, e.g. “projects/goal_ccl_ie_tsn/03_master_ct/gcc”.
Select the target platform (only required once)
make select
enter the number of “linux_nxp_ls1028a”
build sample application
make
The binary is located at
“projects/goal_ccl_ie_tsn/03_master_ct/gcc/linux_nxp_ls1028a/goal_ linux_nxp_ls1028a.bin”.
The file must be copied to the LS1028ARDB, e.g. via scp.
On the LS1028ARDB:
Code Block | ||
---|---|---|
| ||
#reduce kernel log messages to only critical ones
echo 1 > /proc/sys/kernel/printk
#disable memory overcommitting
echo 2 > /proc/sys/vm/overcommit_memory
#make application executable
chmod +x goal_ linux_nxp_ls1028a.bin
#start application (adjust Ethernet port if necessary)
./goal_ linux_nxp_ls1028a.bin -i <IFACE> |
Note:
<IFACE> is the ethernet interface that GOAL should use. This is either the bridge device “switch” or a standalone port, e.g. “swp0”.
Start CC-Link IE TSN Master application automatically
In order to start the Master SDK automatically after boot up, a script must be created in the directory /etc/init.d, e.g. S99GOAL.
The script should have the following content:
Code Block |
---|
#!/bin/sh
#
# CC-Link IE TSN Master SDK
#
GOAL=/root/goal_linux_nxp_ls1028a.bin
start() {
echo 1 > /proc/sys/kernel/printk
echo 2 > /proc/sys/vm/overcommit_memory
printf "Starting CC-Link IE TSN Master SDK: "
${GOAL} -i swp0 &
echo "OK"
}
stop() {
printf "Stopping CC-Link IE TSN Master SDK: "
killall $(basename ${GOAL})
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac |
Please make sure that the script is executable:
chmod +x /etc/init.d/S99GOAL
Conformance Test
In order to perform the conformance test, several configurations must be tested.
...
...