-
11
pages
-
English
-
Documents
Description
How to Create a “Hello World” Program for the Hammer There are five basic steps to creating a “hello world” program for the Hammer: 1) Build a cross-compiler tool chain that will generate ARM output 2) Create the “hello world” c source file 3) Compile the “hello world” program 4) Transfer the “hello world” program to the Hammer 5) Execute the “hello world” program Step 1 : Create An ARM Cross-Compiler Toolchain First you will need a compiler to generate the “hello world” program. The Hammer has limited memory resources so it is not 1advisable to run a full size compiler and linker directly on the Hammer. Therefore, you will use a cross-compiler toolchain. This cross-compiler toolchain is a set of programs (e.g., compiler, linker, libraries) that run on a Linux PC and generate ARM compatible output files that run on the Hammer target platform. To create an ARM cross-compiler tool chain use the GNU Compiler Collection (GCC) compiler tools and Buildroot (http://buildroot.uclibc.org/). Buildroot is a set of scripts that allow you to easily generate both the cross-compiler tool chain and a 2root file system for the Hammer target platform. The cross compiler tool chain uses uClibc (http://www.uclibc.org/), an alternative 3library for C applications. It is much smaller than the GNU C Library (http://www.gnu.org/software/libc/libc.html) , but nearly all applications supported by glibc can also work perfectly with uClibc. 4 56This tutorial ...
-
Publié par
-
Langue
English