PLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

Install the .NET Core runtime 3.0.0 on the AXC F 2152

Abstract

This guide explains how to install the dotnet core runtime version 3.0.0 on the PLCnext controller AXC F 2152. The controller need at least the firmware 2019.6.3 installed.

Installation

Download the dotnet runtime binaries for Linux ARM32.

wget https://download.visualstudio.microsoft.com/download/pr/0c5e013b-fa57-44dc-85bf-746885181278/58647e532fcc3a45209c13cdfbf30c74/dotnet-runtime-3.0.0-linux-arm.tar.gz

Copy the archive to the controller.

scp dotnet-runtime-3.0.0-linux-arm.tar.gz This email address is being protected from spambots. You need JavaScript enabled to view it.:/opt/plcnext/

Connect with ssh to the controller and open a root login shell. This needs an enabled root account on the controller.

ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
su - root

Extract the archive.

mkdir /opt/dotnet-runtime-3.0.0-linux-arm
tar xvf /opt/plcnext/dotnet-runtime-3.0.0-linux-arm.tar.gz -C /opt/dotnet-runtime-3.0.0-linux-arm
rm /opt/plcnext/dotnet-runtime-3.0.0-linux-arm.tar.gz

Environment setup

Create a profile script to setup the environment for dotnet.

cat <<"EOF" > /etc/profile.d/dotnet.sh
#!/bin/sh
export DOTNET_ROOT=/opt/dotnet-runtime-3.0.0-linux-arm
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
export COMPlus_LTTng=0
export PATH="$PATH:/opt/dotnet-runtime-3.0.0-linux-arm"
EOF
chmod +x /etc/profile.d/dotnet.sh

Background information

The environment variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT has to be set due to a missing ICU installation on the controller. See the Globalization invariant documentation in the corefx GitHub repository.

The COMPlus_LTTng environment variable has to be set due to an old lttng installation on the controller. This prevents the tracing library to be loaded at runtime from dotnet core. See the issue #15693 in the coreclr GitHub repository for more information, especially this comment. The environment variable was introduced with the pull request #24733.