Sitara Linux Software Developer's Guide Thank You for Choosing to Evaluate One of Our Sitara ARM Microprocessors [1]
Total Page:16
File Type:pdf, Size:1020Kb
Sitara Linux Software Developer’s Guide v6.00.00.00 NOTE - This PDF is hyperlinked. Clicking on a link (typically bolded and underlined) will take you to that chapter or open the appropriate website. Contents Articles Sitara Linux Software Developer’s Guide 1 How to Build a Ubuntu Linux host under VMware 14 Sitara SDK Installer 29 Sitara Linux SDK Setup Script 32 AMSDK START HERE Script 36 Matrix Users Guide 38 AM335x Power Management User Guide 47 AM37x Power Management User Guide 51 OMAPL1: Changing the Operating Point 54 ARM Multimedia Users Guide 57 Camera Users Guide 81 Cryptography Users Guide 89 Oprofile User's Guide 97 WL127x WLAN and Bluetooth Demos 100 OMAP Wireless Connectivity OpenSource Compat Wireless Build 103 OMAP Wireless Connectivity mac80211 compat wireless implementation Architecture 104 OMAP Wireless Connectivity Battleship Game demo 106 AMSDK u-boot User's Guide 111 AMSDK Linux User's Guide 122 Code Composer Studio v5 Users Guide 127 Linux Debug in CCSv5 156 How to setup Remote System Explorer plug-in 169 How to Run GDB on CCSv5 185 Pin Mux Utility for ARM MPU Processors 193 Pin Setup Tool for AM18xx ARM Microprocessors 215 AM335x Flashing Tools Guide 223 Flash v1.6 User Guide 226 AM18x Flash Tool User's Guide 240 AMSDK File System Optimization/Customization 242 Sitara Linux Training 244 How to use a Mouse instead of the Touchscreen with Matrix 246 How to Recalibrate the Touchscreen 247 AM335x U-Boot User's Guide 248 Sitara Linux SDK Top-Level Makefile 264 Sitara Linux SDK GCC Toolchain 267 Sitara Linux SDK create SD card script 272 How to add a JVM 278 References Article Sources and Contributors 281 Image Sources, Licenses and Contributors 282 Article Licenses License 285 Sitara Linux Software Developer’s Guide 1 Sitara Linux Software Developer’s Guide For the SDG specific to your SDK release, please refer to Archived SDGs under Reference Documentation Welcome to the Sitara Linux Software Developer's Guide Thank you for choosing to evaluate one of our Sitara ARM microprocessors [1]. Please bookmark this page and refer back to it as needed. It is designed to quickly provide the information you need most while evaluating the AMx microprocessor. We are always striving to improve this product. Please let us know if you have ideas or suggestions. Supported Platforms & Version Information The following Sitara ARM microprocessors are supported with this SDK version. Platforms SDK PSP Kernel U-Boot Toolchain Release Date BeagleBone 6.0 04.06.00.11 3.2 2013.01 Linaro GCC 4.7 July 2013 AM335xEVM 6.0 04.06.00.11 3.2 2013.01 Linaro GCC 4.7 July 2013 AM335x StarterKit (SK) 6.0 04.06.00.11 3.2 2013.01 Linaro GCC 4.7 July 2013 Beagleboard-xM 6.0 - 3.3.7 2012.04.01 Linaro GCC 4.7 July 2013 AM37xEVM 6.0 04.02.00.07 2.6.37 2012.04.01 Linaro GCC 4.7 July 2013 AM35xEVM 6.0 04.02.00.07 2.6.37 2011.09 Linaro GCC 4.7 July 2013 AM180xEVM 6.0 03.21.00.04 2.6.37 2010.12 gcc4.5.3 July 2013 Sitara Linux Software Developer’s Guide 2 Linux Software Stack The following software stack illustrates at a high level the various components provided with the Sitara Linux SDK. NOTE - Availability of certain applications are platform dependent and clarified in the associated User Guides below. EVM Hardware Overview Details for various hardware platforms supported by this Sitara Linux SDK are provided before. Platform Document EVM Provider [2] [3] AM335xEVM Hardware User's Guide www.ti.com [4] [3] AM335x StarterKit (SK) Hardware User's Guide www.ti.com [5] [6] BeagleBone Hardware User's Guide (Rev A3) Beagleboard.org [7] [6] Beagleboard-xM Hardware User's Guide Beagleboard.org [8] [9] AM37xEVM Hardware User's Guide Mistral [10] [11] AM35xEVM Hardware User's Guide Logic [12] [11] AM180xEVM Hardware User's Guide Logic Sitara Linux Software Developer’s Guide 3 Start your Linux Development Before using the Sitara Linux SDK you must have a Linux development environment. Linux development environments vary, so we recommend the following for ease of use and consistency when working together. The next few steps will assist you in the setup & configuration of your Linux host based on the physical setup shown below. 1. Configure a Linux Host - If you already have a Linux host machine, go to Step 2. If you do not have a Linux host machine, you can configure a Linux host machine on your Windows PC using a virtual machine. • Build a Ubuntu 10.04 LTS Linux host with VMware on WinXP (preferred) • Build a Ubuntu 10.04 LTS Linux host with VirtualBox on WinXP For standard EVMs: 2. Configure your development For Beaglebone: 2. Configure your development environment environment 3. Install the SDK - Within your Linux host machine, Install 3. Run the START_HERE Script - When Beaglebone boots, a START_HERE the Sitara SDK directory will display on your Linux host desktop. To start your evalaution and development using the BeagleBone, Run the START_HERE.sh script NOTE: The START_HERE.sh script will run the setup.sh script. For Beaglebone boards before rev A5 the setup.sh script will attempt to install a udev rule to load the ftdi_sio module with the proper parameters to recognize the Beaglebone. If you experience difficulty with the Beaglebone being recognized you can load the module manually by doing: • sudo rmmod ftdi_sio • sudo modprobe ftdi_sio vendor=0x0403 product=0xa6d0 4. Run the Setup Script - Once the SDK has been installed, NOTE: If using a VMWare image you will likely need to import the beaglebone Run the Setup.sh Script to guide you through the remaining into the VMWare image as a mass storage device using the instructions here development environment configuration. Configuring a Serial Connection If you chose not to use the setup.sh script (or START_HERE.sh) to configure you connection you can always perform the following steps to configure a serial connection with the board. • The following steps will help you validate that you have a valid serial connection with your target board IMPORTANT These steps are written for boards like the EVM-SK and Beaglebone which use an FTDI USB-to-Serial adapter. For boards with a straight UART connection you can ignore the steps for /dev/ttyUSBx and instead just use the serial port on your Linux host that is connected to the board • Connect the USB cable between your Linux host and your target board Sitara Linux Software Developer’s Guide 4 IMPORTANT On the AM335x EVM-SK, the USB cable enables a USB-to-serial interface to the Linux host PC. If using a virtual machine, please insure the AM335x EVM-SK is a selected USB device. NOTE If you are running your VMWare image with Windows 7 some USB-to-Serial adapters do not properly work with Windows 7. Make sure that your adapter specifically says that it supports Windows 7. You may also need to install an additional driver for your adapter. • Open a terminal and run the following command to find the USB serial adapters available on the system. The FTDI chip used on the board presents two serial interfaces to the Linux host. The first interface is the JTAG interface and the second one is the serial console interface. ls /dev/ttyUSB* You should see output like: /dev/ttyUSB0 /dev/ttyUSB1 NOTE If using VMWare you may need to pass the "Future Technology Devices" device into the VMWare image • As mentioned above since the board's serial interface is the second interface you will want to open a serial console to the second device node. In this case that is /dev/ttyUSB1. This can be done by doing: • minicom -w -s • Select Serial port setup and press ENTER • Press A to modify the Serial Device and change the device to /dev/ttyUSB1. Press ENTER • Press ENTER to exit the serial setup • Select Exit and press ENTER • You should now see a minicom window. • Power on the board, you should see "ccccc" being printed in the window, if so the serial connection is working as expected. Go ahead and leave this console RUNNING in the background. NOTE For the EVM-SK board the power button is under the board in the upper-right hand corner. You must press and hold this button to power on the board. NOTE For the Beaglebone the board will power on as soon as the USB cable is connected. you can reset the board by pressing the reset button which should provide you with the expected output Sitara Linux Software Developer’s Guide 5 SDK Directory Structure Overview The Sitara Linux SDK contains the following top-level directories and files These directories contain the code and tools used to develop for Sitara devices. • bin - Contains the helper scripts for configuring the host system and target device. Most of these scripts are used by the setup.sh script. • board-support - Contains the SDK components that need to be modified when porting to a custom platform. This includes the kernel and boot loaders as well as any out of tree drivers. • docs - Contains various SDK documentation such as the software manifest and additional user's guide. This is also the location where you can find the training directory with the device training materials. • example-applications - Contains the sources for the TI provided example applications seen during the out-of-box demonstration. • filesystem - Contains the reference file systems. These include the smaller base file system as well as the full-featured SDK file system.