background image

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

Summary of Contents for 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: ...arising from the improper usage or improper installation of the hardware or software PHYTEC Embedded Pvt Ltd further reserves the right to alter the layout and or design of the hardware without prior...

Page 3: ...3 5 Build the project 14 1 4 Changing the Demo Application 15 1 4 1 Open Target Board using Minicom 17 1 5 Remote System Access using Eclipse 17 For Windows 17 For Linux 18 1 5 1 Create New Connection...

Page 4: ...Eclipse First we will take a look on the C programming language At the end of this chapter we will explain how to execute your written programs automatically when booting the target 1 1 Eclipse IDE I...

Page 5: ...ace Set the gateway route add default gw 192 168 1 1 For Windows http sourcery mentor com public gnu_toolchain arm none linux gnueabi arm 2012 09 64 arm none linux gnueabi exe Click Start Control Pane...

Page 6: ...a Note 192 168 1 15 is not mandatory you can use any IP but it should be different from the server IP Set the gateway route add default gw 192 168 1 1 To see the change in the gateway route 1 3 Creat...

Page 7: ...un binary file eclipse Confirm the workspace directory with OK For windows Click the Eclipse icon to start the application You can find this icon on your desktop Confirm the workspace directory with O...

Page 8: ...Now you can see the Eclipse workbench PHYTEC Embedded Pvt Ltd 2014 8...

Page 9: ...pse and how to configure the project for use with the GNU C C cross development toolchain Select File New Project from the menu bar A new dialog will open Select C Project and click Next Enter the pro...

Page 10: ...Click Next Set Toolchain Prefix Path and Click Finish Select the Cross Compiler Prefix as arm cortexa8 linux gnueabihf and Cross Compiler Path as path of toolchain bin PHYTEC Embedded Pvt Ltd 2014 10...

Page 11: ...ux gnueabi and the appropriate path of the toolchain 1 3 3 Open new C source file Right click on myHelloWorld project Select File New Source file from the menu bar In Source file write myHelloWorld c...

Page 12: ...C cross compiler Modify Post build steps Right click the myHelloWorld project and chose Properties The Properties dialog box will appear Select C C Build Setting Select the Build Steps tab Enter the f...

Page 13: ...t 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 usi...

Page 14: ...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 u...

Page 15: ...td h include fcntl h Then add the function write_tty which writes n bytes to the first serial interface which on the phyBOARD RANA AM335x is connected to the system console dev console void write_tty...

Page 16: ...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 L...

Page 17: ...d how to access the serial interface First we called the function open on the device dev console The return value of this function was a file descriptor With the file descriptor you called the functio...

Page 18: ...You have to set the address manually for this refer section 1 2 2 1 Left click the Window tab Show view other Remote Systems and ok Now you are able to see the remote system page PHYTEC Embedded Pvt L...

Page 19: ...ection 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 Embe...

Page 20: ...Select ssh files select processes shell linux and next PHYTEC Embedded Pvt Ltd 2014 20...

Page 21: ...select ssh shells and next select ssh terminals and finish Now the connection has been created successfully PHYTEC Embedded Pvt Ltd 2014 21...

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 22...

Page 23: ...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 23...

Page 24: ...serial interface In this Quickstart we will only describe debugging via TCP IP 1 6 1 Starting the GDB server on the target In this passage you will learn how to start the GDB server on the target The...

Page 25: ...lipse if the application is not started yet Right click on the myHelloWorld project in the Navigator window Select Debug As Debug Configurations A dialog to create manage and run applications appears...

Page 26: ...te to the directory Path of the Toolchain bin arm cortexa8 linux gnueabihf gdb Click OK Select the Connection tab and select TCP in the drop down box Enter 192 168 1 15 the target s IP address in the...

Page 27: ...Click Apply Click Debug A new dialog appears Select Yes to switch to the Debug perspective PHYTEC Embedded Pvt Ltd 2014 27...

Page 28: ...ger in Eclipse and connected the host s GDB with the target s GDB server We can now start to debug the project 1 6 3 Setting a Breakpoint Now we will set a breakpoint in our program This breakpoint wi...

Page 29: ...ew breakpoint 1 6 4 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...

Page 30: ...uf variable in the 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...

Page 31: ...nge the value of a variable At the end of this part we will see the effect of this change Select the count variable in the Variables window Double click on value and Change Value to 7 Click the Step O...

Page 32: ...the content at a memory address Select the Memory tab Click Add Memory Monitor Enter the address of buffer and click OK Remember that the variable s address might differ from your system You will see...

Page 33: ...able buffer at the address 0xbeeb7c34 or whatever address is used on your system Now click the Resume button from the menu bar The debugger stops at the breakpoint in the last line of main i e return0...

Page 34: ...55129 Mainz Tel 49 6131 9221 32 Fax 49 6131 9221 33 www phytec de www phytec eu America PHYTEC America LLC 203 Parfitt Way SW Suite G100 Bainbridge Island WA 98110 Tel 1 206 780 9047 Fax 1 206 780 91...

Reviews: