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.
git clone https://github.com/openil/openil.git
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
Only the OpenIL-v1.9-202009
release has been tested and supported by port, some newer releases have changed the API of the tc command line tool and/or other parts of the TSN setup.
Differences are likely small but critical, so using other releases is not advised.
NXP has further developed the OpenIL platform and eventually switched to the Real-Time Edge Software System. The above warning applies.
Real-Time Edge brings its own TSN stack. This functionality is already provided by GOAL and would have to be disabled/ignored.
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
Note: On some hardware revisions the uboot is not set up to run from sd card immediatly. In case it does not work, check that the bootcmd
is set to qixis_reset sd
.
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:
#!/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:
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.
When building for the OpenIL-v1.9-202009
release, build with a system that uses Glibc 2.30 else running the software will cause issues.
I.e. build in a Ubuntu 20.04 virtual machine
On the LS1028ARDB:
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:
Please make sure that the script is executable:
chmod +x /etc/init.d/S99GOAL