1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Hello World

From disptec

(Difference between revisions)
Jump to: navigation, search
(Created page with '==First Program on EVM== '''1.''' Move to $DEVDIR/fs/fs where $DEVDIR is your SDK's installation directory. '''2.''' Create a directory for your program #'''mkdir Hello_Worl…')
 
(4 intermediate revisions not shown)
Line 1: Line 1:
==First Program on EVM==
==First Program on EVM==
 +
 +
This tutorial shows the steps to follow in order to make a simple "Hello World" programm running exclusively in the GPP (general purpose processor) only. For a tutorial on how to create a program on both GPP and DSP refer to [[first DSP program]] section.
'''1.''' Move to $DEVDIR/fs/fs where $DEVDIR is your SDK's installation directory.
'''1.''' Move to $DEVDIR/fs/fs where $DEVDIR is your SDK's installation directory.
Line 9: Line 11:
'''3.''' Open a text editor and type the following:
'''3.''' Open a text editor and type the following:
   #include <stdio.h>
   #include <stdio.h>
-
  #include <stdlib.h>
 
-
 
   int main(){
   int main(){
-
 
+
       printf("\n\n        This is dispTEC's hello world!\n\n");
-
       printf("hello world\n");
+
       return EXIT_SUCCESS;
       return EXIT_SUCCESS;
   }
   }
Line 19: Line 18:
Remember to save it as Hello_World.c
Remember to save it as Hello_World.c
-
'''4.'''
+
'''4.''' Include arm compilator in your system's path: 
 +
  #'''export PATH="/opt/arm-linux-gnueabi/bin":$PATH'''
 +
 
 +
'''5.''' Compile your program by typing:
 +
  #'''arm-linux-gnueabi-gcc Hello_World.c -o Hello_World'''
 +
 
 +
'''6.''' Open minicom and connect to the EVM.
 +
 
 +
'''7.''' In EVM's CL (command line) type:
 +
  #'''cd Hello_World'''
 +
  #'''./Hello_World'''
 +
 
 +
'''8.''' Create your own programs the same way, remembering that they are only for the GPP. For a tutorial on how to comunicate GPP with DSP refer to [[first DSP program]] section

Current revision as of 19:17, 14 August 2010

First Program on EVM

This tutorial shows the steps to follow in order to make a simple "Hello World" programm running exclusively in the GPP (general purpose processor) only. For a tutorial on how to create a program on both GPP and DSP refer to first DSP program section.

1. Move to $DEVDIR/fs/fs where $DEVDIR is your SDK's installation directory.

2. Create a directory for your program

  #mkdir Hello_World
  #cd Hello_World

3. Open a text editor and type the following:

  #include <stdio.h>
  int main(){
     printf("\n\n         This is dispTEC's hello world!\n\n");
     return EXIT_SUCCESS;
  }

Remember to save it as Hello_World.c

4. Include arm compilator in your system's path:

  #export PATH="/opt/arm-linux-gnueabi/bin":$PATH

5. Compile your program by typing:

  #arm-linux-gnueabi-gcc Hello_World.c -o Hello_World

6. Open minicom and connect to the EVM.

7. In EVM's CL (command line) type:

  #cd Hello_World
  #./Hello_World

8. Create your own programs the same way, remembering that they are only for the GPP. For a tutorial on how to comunicate GPP with DSP refer to first DSP program section

Personal tools