TI-Android-FroYo-DevKit-V2 CCSv5SetupGuide

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png

TI Android FroYo DevKit V2.2 CCSv5 and ADT Setup Guide

This document describes the installation procedure for TI's Code composer studio V5 and integrating CCSv5 with Android Debug Tools. This enables users to debug the device also use all the rich features of Android debugging.

Tools and Components

In order to setup CCSv5 with Android Debug Tools we need the following components on a ubuntu host machine.

  • CCSv5 installer
  • ADT ( Android Development Tool) Plugins for CCSv5

The EVM kit includes a ubuntu 10.04 disk that can be used to setup the host machine, please follow the setup guide in SD Card for more details on host machine and target setup. It can also be referred at http://processors.wiki.ti.com/index.php?title=TI-Android-FroYo-DevKit-V2_EVMSetupGuide

CCSv5 setup

The below steps the describe the procedure to install and setup CCSv5

  • Copy CCSv5 installer from "TI Android FroYo 2.2 DevKit V2.2->Tools->CCSv5" on SD card) to Host machine
  $> cp setup_CCS_5.0.2.00006.tar.gz <new folder example: DEVKIT_ROOT>
  • Copy "CCSV5_ADT_dependencies" (from CD) to <DEVKIT_ROOT>, these are required to enable Android Debug Tools with CCSv5
  $> cp -a CCSV5_ADT_dependencies <DEVKIT_ROOT>
  • Go to CCSv5 folder and do the following
  $> cd <DEVKIT_ROOT_CCSv5>
  $> tar -xzvf setup_CCS_5.0.2.00006.tar.gz
  $> ./setup_CCS_5.0.2.00006.bin 

Follow instructions and complete setup

ADT plug in installation

Follow the steps mentioned below to install Android plugins with CCSv5

Step 1: Copy all ADT-dependencies to <CCSv5_DIR>/eclipse/plugins

  $> cd <DEVKIT_ROOT>/CCSV5_ADT_dependencies
  $> cp -rf * <CCSv5_INSTALL_DIR>/eclipse/plugins

Step 2: Launch CCSv5

  Follow :: (Ubuntu Panel) Application->Code Composer Studio v5.0.2->Code Composer Studio v5

Step 3: Install plugins by following below instructions

  Go to Help-> Install New Software
  Add : Enter Name & Browse to ADT location - "<DEVKIT_ROOT>/CCSV5_ADT_dependencies/ADT-10.0.0.zip"
  Select All-> Next

NOTE: Some times it is better to have internet connection, if dependencies are not installed manually then it gets downloaded from the net.

Step1.png

Android SDK configuration

This section describes the steps to configure Android SDK.

  • Go to <DEVKIT_ROOT>/CCSV5_ADT_dependencies folder
  $> cd <DEVKIT_ROOT>/CCSV5_ADT_dependencies folder
  $> tar -xzvf android-sdk-linux_x86.tar.gz
  • Launch CCSv5, on UI menu traverse as given below
  • Window-> Preferences -> Android->
  • Enter SDK location - <DEVKIT_ROOT>/CCSV5_ADT_dependencies/android-sdk-linux_x86
  • Click on Apply

Sdkconf.png

DDMS configuration

This section describes the steps to configure Android DDMS. On the UI menu traverse as given below

  • Window - Preferences Android - DDMS Change - ADB debugger base port: 8700; Logging Level: Verbose Click on Apply
  • Window - Open Perspective - Other - DDMS Click on OK

Get CCS attach to TI EVM using ADB bridge

Android Debug Bridge (adb) is a versatile tool lets you manage the state of the Android-powered device. For more information about what is possible with adb, see Android Debug Bridge page at http://developer.android.com/guide/developing/tools/adb.html. The ADB tool can be used to

  • Download an application from a host machine, install & run it on the target board.
  • Start a remote shell in the target instance.
  • Debug applications running on the device using the debugging tool DDMS ( Dalvik Debug Monitor Server) which runs on top of adb connection.
  • Copy files to and from the board to host machine

The adb tool is located in tools/ directory under the Android SDK installation. Export the tools directory path as shown below.

  $> export PATH=${PATH}:<your_sdk_dir>/platform-tools

This release of DevKit has been tested for different methods of connecting a given board with host machine

  • adb over USB
  • adb over Ethernet

adb over USB

  • Make sure that the mini-usb cable is connected between the host usb port and the target’s USB OTG port
  • Turn on "USB Debugging" on your board. On the board (UI screen)-
    • Go to home screen, press MENU,
    • Select Applications, select Development, then enable USB debugging.
    • Alternatively, you can navigate to Settings->Applications->Development and then enable the "USB debugging" option.
  • Setup host machine to detect the board. On Ubuntu Linux host machines this is done by adding a rules file to configure device vendor ID of on-board OMAP device.
  • For the EVMs and Boards covered here, the vendor ID is "18d1".
    • Log in as root and create this file: /etc/udev/rules.d/51-android.rules
    For Gusty/Hardy, edit the file to read:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
    For Dapper, edit the file to read:
    SUBSYSTEM=="usb_device", SYSFS{idVendor}=="18d1", MODE="0666"
    • Execute the following to change the user mode for the rules file.
    $> chmod a+r /etc/udev/rules.d/51-android.rules
    • Verify the adb connectivity between host and target board
    $> adb devices 
    If device is connected, then output on screen should list the device, example:
  
       List of devices attached
       20100720    device

adb over Ethernet

Things to do on Android Device: Obtain IP of your EVM via the executing following command on your EVM’s Serial Terminal:

    # netcfg

or using DHCP

    # netcfg eth0 dhcp 

ADB stub on target defaults to USB. To fix this, execute the following on your EVM’s Serial Terminal :

    # setprop service.adb.tcp.port 5555
    # stop adbd
    # start adbd

On the Host machine run the following commands from cmd prompt:

    $ export ADBHOST=<IP_ADDRESS_OF_YOUR_TI_EVM> (Linux)
    $ cd <ANDROID_SDK_ROOT>\platform-tools
    $ adb kill-server
    $ adb start-server

Check if you are now connected to the TI EVM device by running the following command on the cmd prompt:

    $ adb devices

It should output something like:

    emulator-5554 device

This confirms that EVM is connected. With this setup, you should be able to use ADB, logcat, DDMS and other tools directly from CCS ADT environment for creating your applications for Android.

Hello World Using CCSv5

File->New-> Android Project Follow below pics

Appstep1.png Appstep2.png


Support

For any questions or support please get in touch with us through http://e2e.ti.com/android