following path first, since the Tool Chain files, including the compiler,
link, library, and include files are located in this directory.
PATH=/opt/Korenix/gcc-4.1.1-glibc-2.3.6/i686-korenix-linux-gnu/b
in/:$PATH
Setting the path allows you to run the compiler from any directory.
2.4.2 Compiling Hello.c
The JetBox 8100 CD contains several example programs. Here we use
Hello.c as an example to show you how to compile and run your
applications. Type the following commands from your PC to copy the files
used for this example from the CD to your computer's hard drive.
# cd /tmp/
# mkdir example
# cp –r /mnt/cdrom/example/* /tmp/example
To compile the program, go to the helloworld subdirectory and issue the
following commands:
#cd example/helloworld
#make
You should receive the following response:
The output executable file is the test.
2.4.3 Uploading "test" to JetBox 8100 and Running the Program
Use the following command to upload test to the JetBox 8100 via FTP.
1. From the PC, type:
14
Figure 2-13 Compile example file "main.c"
JetBox 8100 User Manaual_Linux_1.1