
Setting Up the Build/Development Environment
DVEVM Software Setup
4-11
4.4
Setting Up the Build/Development Environment
To set up the GPP-side development and build environment, follow these
steps:
1) Log in to your
user
account (and not as root) on the NFS host
system.
2) Set your PATH so that the MontaVista tool chain host tools and cross
compiler (arm_v5t_le-gcc) can be found. For example, in a default
installation of the MontaVista LSP, you should add a definition like
the following to your shell resource file (for example, ~/.bashrc). If
you installed in a location other than /opt/mv_pro_4.0, use your
location in the PATH.
PATH="/opt/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/bin:
/opt/mv_pro_4.0/montavista/pro/bin:
/opt/mv_pro_4.0/montavista/common/bin:$PATH"
4.4.1
Writing a Simple Program and Running it on the DVEVM
Make sure you have performed the steps in Section 4.3.4,
Shared File System for Target Access
.
Perform the following steps on the NFS host system as user (not as root):
1)
host $
mkdir ~/workdir/filesys/opt/hello
2)
host $
cd ~/workdir/filesys/opt/hello
3) Create a file called hello.c with the following contents:
#include <stdio.h>
int main() {
printf("Buongiorno DaVinci!\n");
return 0;
}
4)
host $
arm_v5t_le-gcc hello.c -o hello
Perform the following steps on the target board. You may use either the
target's console window (Section 2.2) or a telnet session.
1)
target $
cd /opt/hello
2) Run ./hello. The output should be:
Buongiorno DaVinci!
Summary of Contents for DVEVM
Page 1: ...DVEVM Getting Started Guide Literature Number SPRUE66A August 2006...
Page 14: ...1 6...
Page 70: ...Index 4...