Home
        DE2 Development and Education Board User Manual
         Contents
1.  you see the prompt message  Are you sure you want to continued connecting   yes no     reply yes by typing    yes    and pressing ENTER  Next  when you are asked for the    password  please enter the root s password and press ENTER  In this tutorial  we assumed the  password is       terasic                  DEO Nano SoC 2 www  terasic com  www                              First FPGA Manual May 18  2015    eh  M    akefile main c main o    lHichardlHRichar     first_h   not create directory             ichard     ssh      The authenticity of host  192 168 1 113 4  172 168 1 1135    can t he established   ECDSA key fingerprint is   b7 62 60 9    b ac b7 1  b 324 fi 78 a4 54 98 51 83 62   Are you sure you want to continue connecting    yes no  yes  Failed to add the host to the list of known hosts Chom PI chard   ssh known  host               2192 168 1 113    password   my first hps 1005 6521 6   KBs               ichard PG  cygdrive c altera     13  6 embedded my_f iret              After completing the copy process  you can type    Is    to list the files in the current directory  We will  see that the    my_first_hps    appears  Before the file can be executed  you need to change the file    permission by running the command    chmod 777 my first hps  as shown below                           Inv irst    mmm    LN      chmod 777              DEQ Nano Sol 10 www  terasic com  www  teraso com My First FPGA Manual May 18  2015    Chapter 4  Appendix    4 1 Headquarter  amp  Br
2. DEO Nano SoC          My FIRST FPGA          ABER    UNIVERSITY  www  terasic com PROGRAM    Copyright    2003 2015 Terasic Inc  All Rights Reserved     CONTENTS                 CHAPTER 1 INTRODUCTION                                                     1  1 1 SOFTWARE DEVELOPMENT                                      1  1 2 SYSTEM REQUIREMENTS             csccssccscoscoscosccscceccscceccsccscceccsccsccecceccecceccsccscssccscsecoscssscscsessessessesees 2  Lo                                    E             2  CHAPTER 2 CREATE AND BUILD YOUR PROJECT                                    cccecsccscccccccccscccccces 3  254  CREATING                  FOLDER                                     E N                    3  2 2 CREATING A DESIGN                                               idest fud                    3   2 OACREATING THE  MAKEFILE                                              4  2 4 COMPILING THE PROJECT           ccccscecccecececscecscececcscecescecescecscecuseececescecescscesescessscesescesescecesesceees 5  CHAPTER 3 EXECUTING YOUR PROJECT                             cescccccccccccccccccccccccccccccccccccccccccccces 7  3 1 EXECUTE YOUR EXECUTABLE FILE              cccccescececcececcececcsceccececesceceseecesescecescecesescesescesescesescecuees 7  3 2 PUTTING MY FIRST HPS INTO THE BOOTABLE SD CARD    2       ccccecescecceccscsceccscesceccecescescscescsceces 8  CIHAPTERA APPENIDEN                                                                  11  4  1 HEADOUARTER M BRANC
3. HCP server        Type    ifconfig    to check the Ethernet IP for your DEO Nano SoC board  In this tutorial   IP    192 168 1 113    is assigned to the DEO Nano SoC board  as shown below            DEO Nano sol 8 www  terasic com  www terasic com My First FPGA Manual May 165 2015     Yocto Project 1         g    Lo   Im  j    p    to              H  m im    n                                         udhcpec d                  soctpga 8    1  T  ct    a  m 2o    ict                                 verruns                 0      rrunsa u   carrier       CEL             Il    COD       pee 55 di   ogverruns 0 frame          m  Overru    ms 0 carrier          The    sep    command requires a password  If you have not defined the password for the root account     please type in Linux command    passwd    to create a password  as shown below  In this tutorial  we    assume the password is  terasic      5 COM   PuTTY    root socfpga      clones   g password for  new password  minimum of 5  maximum  combination of upper and lower    Ssword                th       1  ct fu       2  a          pm           i Fl td       1    ad       too short     word  continuin       Now  you can use    scp    command to copy the executable file    my_first_hps    into the SD card  In  Altera SoC command shell  type    scp my_first_hps root  192 168 1 113  home root    to copy the  file into the folder     home root     Note that  the  192 168 1 113  IP address is obtained in the  previous step  When
4. HES erreser EE E queam Die         du E LU      11  ter DEO Nano SoC 1 www  terasic com    www  terasic com My First FPGA Manual May 18  2015    Chapter 1    Introduction          This tutorial provides comprehensive information that will help you understand how to create a C   language software design and run it on your ARM included DEO Nano SoC development board   The following sections provide a quick overview of the design flow  explain what you need to get    started  and describe what you will learn     1 1 Software Development Flow    Figure 1 1 shows the software design flow block diagram  The development procedures are     1  Developers need to design their C code software project with a generic text editor   Generally   c and  h files are needed    2  Create a    Makefile    for your software design project  so the compiler knows how to  generate a final object executable files for your project    3  Use the compile tool to generate executable file  Boot Linux from your DEO Nano SoC board     5  Download the executable file to Linux and launch it            Design File  c  h E p  2  Make File p gt     Alt S S         E   Execution File     Compile Suite        Linux  Running on SoCKit Board        I  LM C  Linux  Booting SD Card  Figure 1 1 Design Flow  DEO Nano SoC 1 www  terasic com    ter    www terastecom      First FPGA Manual May 18  2015    1 2 System Requirements    Besides the DEO Nano SoC board  the following software and hardware are required         Micr
5. SoC board  For more details  please refer to Chapter 5 of the DEO Nano SoC Getting  Started Guide manual  We assumed you have installed the following softwares       PuTTY        Virtual Com Driver    3 1 Execute Your Executable File    Before you can run your executable file  you need to copy the executable file    my_first_hps    to the  bootable SD card or USB storage  so you can access your file under a running Linux system on the  DEO Nano SoC board  If you have already put your executable file under the  home root folder   after logging in as a root user  you can type      my_first_hps    to launch the executable file  and you  will see  Hello World   on the UART terminal as shown below  If you don t know how to put the    execute file  my  first hps  into the SD card  please refer to the following section     pg COMS   PuTTY       ter DEO Nano SoC 7 www  terasic com  www                              First FPGA Manual May 165 2015       3 2 Putting my first hps into the bootable SD card    The section describes how to copy the executable file         first hps  into the SD card using Linux  system command    sep     First  you have to use an RJ45 cable to connect both your Windows                the DEO Nano SoC board to your Ethernet router  as shown in Figure 3 1     Ethernet Rounter       Figure 3 1 Ethernet Setup  To boot Linux  follow the below procedure to get the Ethernet IP for your DEO Nano SoC board     Login as a root user  Type  udhcpc  to query an IP from D
6. anches    e Tel   886 3 575 0880  e Fax   886 3 572 6690  e Add  9F  No 176  Sec 2  Gongdao 5th Rd  East Dist  Hsinchu City  Taiwan 300 70       Email  sales terasic com   support  terasic com    ter DEO Nano SoC    www  terasic com  www terastecom      First FPGA Manual May 18  2015    
7. ip altera hps altera hps hwlib include  defines the    searching path for the gcc including header files        TARGET   my_first_hps        CROSS_COMPILE   arm linux gnueabihf    CFLAGS    g  Wall  I     SOCEDS DEST ROOTYy p altera hps altera hps hwlib include  LDFLAGS    g  Wall   CC      CROSS COMPILE gcc   ARCH  arm    build    TARGET       TARGET   main o    CC    LDFLAGS                    0   C      CC    CFLAGS   c   lt             PHONY  clean  clean     rm  f   TARGET           o          ter DEQ Nano sol 4 www  terasic com  www terasic com My First FPGA Manual May 18  2015    2 4 Compiling the Project    To compile a project  developers need to launch the Altera Embedded Command Shell first  Please    browse to the SoC EDS installation folder  e g   C  altera 14 1 embedded   as shown in Figure 2 1     1  embeddedsw     examples    i hest tools  m    do      first hps         bash  exe dump      m  82 Embedded Command Shell bat          embedded command shell sh                    EELE          Figure 2 1 Embedded Folder of SoC EDS    Then  double click the  Embedded Command Shell bat  item to launch Command Shell as shown    below     EN  cygd rive c  altera 14 1 0 186 embeddec    Altera Embedded Command Shell    Version 14 1       cd cygdrive   c altera   i14 1 6 186 embedded        In the Command Shell  please use the Linux    cd    command to change current directory to your  project folder  In this tutorial  just type    cd my first hps  to go to the project fo
8. lder we just created   Then  type a    make    command to start the building  compiling and linking  process  as shown    below     ter DEO Nano SoC 5 www  terasic com  www terastecom      First FPGA Manual May 18  2015       Em  cygdrive c altera 14 1 0 186 embedded my first hps                     5 cd cygdrive c altera   i4 i 6 186 embedded       cd my_first_hps       make   arm linux gynueabihf gcc  g  Mall  I G  altera    14 1 6 186 embedded ip altera hps    Aaltera hps  hulib  include  c main c  o main o   arm   linux gnueabihf gcc        Mall main o    o my_first_hps       After the building process is finished  developers can type  Is  to list all the files in the current  directory  In this tutorial  we can see the executable file    my_first_hps    is generated successfully as    shown below        Em  cygdrive c altera 14 1 0 186 embedded my first hps    4      cygdrive c altera 14 1 8 186 embedded      cd my first hps     5 make  arm linux gnueahihf qgcc  g  Mall  I G   alteraz 14 1 H8 186 emhedded z ip  alterazlhps    A  Aaltera hps  hwlibz   include  c main c  o main o  arm   linux    qnueabihf gee  g  Wall main o    o muy first hps    main o makefile mu first              DEO Nano SoC 6    www terasecom      First FPGA Manual May 18  2015    Chapter 3  Executing Your Project       This chapter describes how to execute your executable file         first hps  on Linux on the  DEO Nano SoC board  Here  we assume you already know how to boot Linux on the  DEO Nano 
9. osoft Windows computer with USB port and Ethernet Port     Ethernet Router       Altera SoC EDS Embedded Design Suite  software tool installed     Generic text editor tool installed      PuTTY installed      FTDI Virtual COM driver installed       A bootable SD card with the Linux system    1 3 What You Will Learn    In this tutorial you will perform the following tasks         Create a  Hello World   design that displays a message on the Linux terminal   This design 15  easy to create and gives you visual feedback that the design works  Of course  you can use    your DEO Nano SoC board to run other designs as well        Become familiar with Altera SoC EDS and Linux   tThis tutorial will not make you an expert   but you should grasp some basic concepts about the compile tool and Linux operation in the    end of this tutorial     ter DEO Nano sol 2 www  terasic com  www                              First FPGA Manual May 165 2015    Chapter 2  Create and Build Your Project          This chapter describes how to create your first HPS  Hard Processer System  project and build   compile and link  it with the Altera SoC EDS software tool  We assume you have already installed  the Altera SoC EDS  If not  there are installatin details in Chapter 2 of the DEO Nano SoC Getting  Started Guide manual in the System CD     2 1 Creating a Project Folder    A project usually includes the design files  c  h and a make file  These files are generally stored  under the same folder  So  it is s
10. uggested to create a project folder where you can store your design    file and make file     Developer can create a    my_first_hps    folder under the installed Altera SoC EDS installation    folder  From this point onward  the folder s absolute path will be assumed to be       C  altera 14 1 0 186 embedded my_first_hps       2 2 Creating a Design File    First  please create an empty file  named  main c   under    my_first_hps    folder  Then  type below  code into the file and save it  The program includes the  stdio h  header file for the  printf   function  which is used to output a  Hello World   message in a standard output device  By default     the standard output device 1s the UART terminal      include  lt stdio h gt     int main int argc  char   argv       printf  Hello World  r n          ter DEO Nano SoC 3 www  terasic com  www  terasic com My First FPGA Manual May 165 2015    return  0       2 3 Creating the Makefile    A makefile is required for the Altera SoC EDS in order for it to know how to compile and link your  project  First  you will need to create an empty file  named    Makefile     under    my_first_hps     folder  Then  type in the following content and save it  Inside the makefile  the  TARGET  variable  defines the output file name  In this tutorial  the output executable file name is  my  first hps   The  makefile also specifies which compiler to use  in this case we use ARM gcc cross compiler  The gcc  compile paramater   I  SOCEDS DEST ROOTY 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Confolentais - Réseau des VPAH Poitou  Art Decor I-04-5092-CH Installation Guide  ダウンロード - ワゴジャパン  Baumatic BCG905SS cooker  Guide du bilan sociétal PME  @bre。d マイブレッド  Craftsman 38cc Owner's Manual  User Manual for Online Pro  Fazer de PDF      Copyright © All rights reserved. 
   Failed to retrieve file