Tutorial to build the C sample code and introduction to Linux toolchain.
Linux toolchain contains the necessary libraries and compilers for developing your programs. ioThinx 4530 Series support both native and cross compiling of code. Native compiling is more straightforward since all the coding and compiling can be done directly on the device, but Arm architecture is less powerful, the compiling speed is slower. On the other hand, cross compiling can be done on any Linux machine using a toolchain, and the compiling speed is much faster.
The following compiler tools are provided:
Tool | Usage |
---|---|
ar | Manage archives (static libraries) |
as | Assembler |
c++, g++ | C++ compiler |
cpp | C preprocessor |
gcc | C compiler |
gdb | Debugger |
ld | Linker |
nm | Lists symbols from object files |
objcopy | Copies and translates object files |
objdump | Displays information about object files |
ranlib | Generates indexes to archives (static libraries) |
readelf | Displays information about ELF files |
size | Lists object file section sizes |
strings | Prints strings of printable characters from files (usually object files) |
strip | Removes symbols and sections from object files (usually debugging information) |
The native compiler, ioThinx library and necessary packages are already installed on ioThinx 4530 series devices.
To ensure that an application will be able to run correctly when installed on ioThinx 4530 series, you must compile the application and link it to the same libraries that will be present on ioThinx 4530 series. This is particularly true when the Arm-based Cortex processor architecture 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 toolchain that comes with the ioThinx 4530 series devices contains a suite of cross compilers, ioThinx library and other tools, as well as the libraries and headers that are necessary to compile applications for the ioThinx 4530 series devices. The host environment must be running Linux to install the Moxa GNU Tool Chain.
The toolchain will need about 1GB of hard disk space on your PC. To install the toolchain, download the toolchain file from Moxa’s website. After you untar the package, run the following script to install the toolchain.
You can check the toolchain version using the following command:
You can now start compiling programs using this toolchain.