Commissioning
62
Hans Turck GmbH & Co. KG | T +49 208 4952-0 | F +49 208 4952-264 | more@turck.com | www.turck.com
7.7
Creating a C application
Requirements
The following components are required to create a C application:
n
Toolchain for Cortex A8
n
C program
Downloading a toolchain
The following toolchain is required for the Cortex A8 processor in order to cross compile a C
program:
n
OSELAS.toolchain-2014.12.0-arm-cortexa8-linux-gnueabihf-gcc-4.9.2-glibc-2.20-
binutils-2.24-kernel-3.16-sanitized
The toolchain is available to download at
http://debian.pengutronix.de/debian
Example: Creating the C program
Create the “hello.c” file.
Copy the following text to the file:
// hello.c
#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}
Create executable file with the following toolchain command:
/opt/OSELAS.Toolchain-2014.12.0/arm-cortexa8-linux-gnueabihf/
gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/bin/
arm-cortexa8-linux-gnueabihf-gcc -o helloExample hello.c
Example: Creating a C program via a make file
The “make” service program automates the creation of executable files from source code. C
programs can be compiled via “make”. This uses a make file which contains the rules for creat-
ing executable files.
The following example shows a simple make file:
all: helloExample
helloExample: hello.o
/opt/OSELAS.Toolchain-2014.12.0/arm-cortexa8-linux-gnueabihf/
gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/bin/arm-
cortexa8-linux-gnueabihf-gcc -o helloExample hello.o
hello.o: hello.c
/opt/OSELAS.Toolchain-2014.12.0/arm-cortexa8-linux-gnueabihf/
gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/bin/arm-
cortexa8-linux-gnueabihf-gcc -c hello.c
clean:
rm hello.o helloExample
}
Summary of Contents for TN-UHF LNX Series
Page 1: ...Your Global Automation Partner Instructions for Use TN UHF LNX UHF Read Write Head ...
Page 2: ...2 Hans Turck GmbH Co KG T 49 208 4952 0 F 49 208 4952 264 more turck com www turck com ...
Page 75: ...V01 00 2019 04 75 Select RS485 RFID and confirm with OK Fig 62 Selecting the RS485 interface ...