Phytec phyBOARD RANA-­AM335x User Manual

Phytec phyBOARD RANA-­AM335x User Manual

Application development

Advertisement

Quick Links

phyBOARD RANA­AM335x
Single Board Computer
Application Development User Manual
Product No
SOM PCB No
CB PCB No
Edition
: PCL-051/PBA-CD-03
: 1397.0
: 1404.0
: Mar 10, 2014

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the phyBOARD RANA-­AM335x and is the answer not in the manual?

Questions and answers

Summary of Contents for Phytec phyBOARD RANA-­AM335x

  • Page 1 phyBOARD RANA­AM335x Single Board Computer Application Development User Manual Product No : PCL-051/PBA-CD-03 SOM PCB No : 1397.0 CB PCB No : 1404.0 Edition : Mar 10, 2014...
  • Page 2 PHYTEC Embedded Pvt. Ltd further reserves the right to alter the layout and/or design of the hardware without prior notification and accepts no liability for doing so.
  • Page 3: Table Of Contents

    1.6.1. Starting the GDB server on the target................24 1.6.2. Configuring and starting the debugger in Eclipse............25 1.6.3. Setting a Breakpoint....................28 1.6.4. Stepping and Watching Variable Contents..............29 1.6.5. Stepping and Watching Variable Contents..............31 1.6.6. Using the Memory Monitor..................32 PHYTEC Embedded Pvt. Ltd 2014...
  • Page 4: Introduction

    $ sudo apt-get install openjdk-7-jdk openjdk-7-jre Download eclipse from below link  http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr2 For windows: Download and install the java for windows using below link:  http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads- 1880261.html Download eclipse from below link  http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr2 PHYTEC Embedded Pvt. Ltd 2014...
  • Page 5: Eclipse Ide Configuration For Phyboard-Rana-Am335X

     Click on Use the following IP address   Enter a IP like 192.168.1.12  Press Tab and the Subnet Mask section will populate with default numbers  Enter gateway 192.168.1.1  Hit Ok PHYTEC Embedded Pvt. Ltd 2014...
  • Page 6: Target Setup

    GNU C/C++ cross development toolchain. Click the Eclipse icon to start the application. You can find this icon where you have extracted the Eclipse IDE for C/C++ Developers . PHYTEC Embedded Pvt. Ltd 2014...
  • Page 7: How To Open Eclipse

    Click the Eclipse icon to start the application. You can find this icon on  your desktop. Confirm the workspace directory with  Close the "Welcome to Eclipse" screen by clicking on the "workbench"  button PHYTEC Embedded Pvt. Ltd 2014...
  • Page 8 Now you can see the Eclipse workbench. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 9: Creating A New Project

    File ► New ► Project from the menu bar. A new dialog will open.  Select C Project and click Next  Enter the project name myHelloWorld and Toolchain as Cross GCC then  click Next PHYTEC Embedded Pvt. Ltd 2014...
  • Page 10 Click Next  Set Toolchain Prefix & Path and Click Finish  Select the Cross Compiler Prefix as arm-cortexa8-linux-gnueabihf- Cross Compiler Path as <path of toolchain bin> PHYTEC Embedded Pvt. Ltd 2014...
  • Page 11: Open New C Source File

     Note  For windows you have to select the arm­none­linux­gnueabi­ and the appropriate path   of the toolchain. 1.3.3. Open new C source file Right-click on myHelloWorld project  Select File ► ► Source file from the menu bar  In Source file write myHelloWorld.c and click on Finish.  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 12: Write Simple Hello Application

    The Properties dialog box will appear. Select C/C++ Build ► Setting ► Select the Build Steps  Enter the following command in the Post-build steps Command input field: scp ./myHelloWorld root@192.168.1.15:/home ;ssh root@192.168.1.1 5 ./myHelloWorld PHYTEC Embedded Pvt. Ltd 2014...
  • Page 13 Note First login manually using ssh as shown in snapshot below. Otherwise we will not be able to login in target because it requires secure connection  Note  If you are using windows so you have to use Winscp or directly copy the   binary into target board using pen drive or sd card. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 14: Build The Project

    Build project from the menu bar  The project will be built. Select the Console tab.  if no errors occur while building the project, you will see the following output:  Note   If you are using Window machine then you need the make utils using the   below link. ftp://ftp.equation.com/make/32/make.exe PHYTEC Embedded Pvt. Ltd 2014...
  • Page 15: Changing The Demo Application

    [] = { "Welcome to the World of the Rana-AM335x! (serial)\n" write_tty(buf, sizeof (buf) - 1); In the next screenshot you can see the complete program. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 16  Save your program after changing the code. Select Project ► Build project from the menu bar  The project will be build... The application will be compiled, built, copied to the target and executed. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 17: Open Target Board Using Minicom

    You have to set the address manually connect ethernet cable Go to network connections right click on "Local area connection" ► properties ► under general tab double click on "Internet Protocol(TCP/IP)" change the parameters For above settings, refer section 1.2.1 PHYTEC Embedded Pvt. Ltd 2014...
  • Page 18: For Linux

    You have to set the address manually ,for this refer section 1.2.2.1 Left-click the Window  Show view ► other ► Remote Systems and ok Now you are able to see the remote system page. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 19: Create New Connection For Remote System Login

    1.5.1. Create New Connection for Remote System login Right Click on Local select new connection  select linux 1.5.2. Set the Host Name and IP Then write Host name as 192.168.1.15 and connection name as Rana Board. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 20 Select ssh.files  select processes.shell.linux next  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 21  select ssh.terminals finish  Now the connection has been created successfully PHYTEC Embedded Pvt. Ltd 2014...
  • Page 22 Click on the Rana Board ► Sftp Files ► My Home  Type User ID as root leave password blank. Then press OK.  Then a secure Storage tab is opened just cancel it.  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 23: Launch The Remote Terminal

    1.5.3. Launch the Remote Terminal Right click Ssh Terminal ► Launch Terminal  Now we can see all the contents of phyBOARD-RANA-AM335x. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 24: Debugging An Example Project

    Type user name “root” and press Enter Start the GDB server: gdbserver 192.168.1.12:10000 myHelloWorld You have started the GDB server on the target. The GDB server is now waiting for connections on TCP port 10000. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 25: Configuring And Starting The Debugger In Eclipse

    Note Make sure that on the bottom of the Debug configuration Window it says “Using GDB (DSF) Manual Remote Debugging Launcher”. If it does not, then click on the “Select Other” and select this option. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 26 Click  Select the Connection tab and select TCP in the drop-down box  Enter 192.168.1.15 (the target's IP address) in the Host name input field. And port numer 10000.As shown in next page. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 27 Click Apply  Click Debug  A new dialog appears. Select to switch to the Debug perspective  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 28: Setting A Breakpoint

    1.6.3. Setting a Breakpoint Now we will set a breakpoint in our program. This breakpoint will be set on the last line of the function main(). If you resume the application, the debugger will stop on this line. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 29: Stepping And Watching Variable Contents

    In this part we will step through the example project with the debugger. we will also learn how to check the content of a variable. Expand buf in the Variables window Click the Step Over button in the Debug window to step to the next line  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 30 Variables window. Click on the variable buf  Then click the button Step into to enter the function write_tty()  The debugger stops in write_tty(). we will see the following variable window: PHYTEC Embedded Pvt. Ltd 2014...
  • Page 31: Stepping And Watching Variable Contents

    Welcome in the Minicom window. This shows when changing the counter variable's value to 7 only the first seven characters of the buffer are output, instead of the whole sentence. PHYTEC Embedded Pvt. Ltd 2014...
  • Page 32: Using The Memory Monitor

    Enter the address of buffer and click OK. Remember that the variable's  address might differ from your system. You will see following output. Click New Rendering  Select ASCII and click Add Rendering(s).  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 33 Now click the Resume button from the menu bar  The debugger stops at the breakpoint in the last line of main() i.e return0. Click the Resume button to end the application.  PHYTEC Embedded Pvt. Ltd 2014...
  • Page 34 France PHYTEC France SARL 17, place St. Etienne F-72140 Sillé le Guillaume Tel.: +33 2 43 29 22 33 Fax: +33 2 43 29 22 34 www.phytec.fr ........We are looking forward to hearing from you!........PHYTEC Embedded Pvt. Ltd 2014...

Table of Contents