Moxa DA-662A-I-16-LX [51/63] Linux tool chain introduction

Moxa DA-662A-I-8-LX [51/63] Linux tool chain introduction
DA-662A Series Software Programmer's Guide
5-4
Steps for Migrating to the DA-662A
Take the following steps to migrate a program written for the DA-660/662 to the DA-662A:
1. Set up the DA-662A‘s development environment, including installing the DA-662A‘s tool chain and set the
cross compiler and glibc environment variables.
2. Develop the code (taking into consideration the Endian issue) and compile it.
3. If there are any error messages during compilation, return to Step 2.
4. Download the program to the DA-662A series via FTP.
5. Debug the program.
If bugs are found, return to Step 4.
If no bugs are found, continue with Step 7.
6. Distribute the program to additional DA-662A series units if needed.
Linux Tool Chain Introduction
To ensure that an application will be able to run correctly when installed on the DA-662A series, you must
ensure that it is compiled and linked to the same libraries that will be present on the DA-662A series. This is
particularly true when the RISC processor architecture of the DA-662A series differs from the CISC x86
processor architecture of the host system, but it is also true if the processor architecture is the same.
The host tool chain that comes with the DA-662A series contains a suite of cross compilers and other tools, as
well as the libraries and headers that are necessary to compile applications for the DA-662A series. The host
environment must be running Linux to install the DA-662A series GNU Tool Chain. We have confirmed that the
following Linux distributions can be used to install the tool chain:
Redhat 7.3/8.0/9.0, Fedora core 1/2/3/4/5.
The Tool Chain will need about 1 GB of hard disk space on your PC. The DA-662A series Tool Chain is located
on the DA-662A series CD. To install the Tool Chain, insert the CD into your PC and then issue the following
commands:
#mount /dev/cdrom /mnt/cdrom
#sh /mnt/cdrom/Toolchain/linux/arm-linux_x.x.x-Vx_Build_YYMMDDHH.sh
Wait for a few minutes while the Tool Chain is installed automatically on your Linux PC. Once the host
environment has been installed, add the directory /usr/local/arm-linux-4.4.2-v4/bin/ to your path and
the directory /usr/local/arm-linux-4.4.2-v4/man/ to your manual path. You can do this temporarily for
the current login session by issuing the following commands:
#export PATH=“/usr/local/arm-linux-4.4.2-v4/bin:$PATH”
#export MANPATH=“/usr/local/arm-linux-4.4.2-v4/man:$MANPATH”
Alternatively, you can add the same commands to $HOME/.bash_profile to cause it to take effect for all login
sessions initiated by this user.
Obtaining help
Use the Linux man utility to obtain help on many of the utilities provided by the tool chain. For example to get
help on the arm-none-linux-gnueabi-gcc compiler, issue the command:
#man arm-none-linux-gnueabi-gcc

Содержание

Похожие устройства

Скачать