From d9435b37371b3b799ed2e8a93f9fba86ca874833 Mon Sep 17 00:00:00 2001 From: Joe Fernandez Date: Tue, 26 Jun 2012 23:32:03 -0700 Subject: docs: ADK2 docs - update alternative build instructions Change-Id: I395749198a0c1589b71d49638620708e2dc2f6ae --- docs/html/tools/adk/adk2.jd | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'docs/html') diff --git a/docs/html/tools/adk/adk2.jd b/docs/html/tools/adk/adk2.jd index d3fed306a7e1..6ee4a46be5f9 100644 --- a/docs/html/tools/adk/adk2.jd +++ b/docs/html/tools/adk/adk2.jd @@ -314,20 +314,38 @@ ready to communicate with your Android device.

Using the ADK Alternative Build System

-

An alternative build and load system is also available for the ADK 2012. This system is command -line based and intended for production environments where using an IDE environment to load software -onto accessory hardware may be inconvenient or undesirable.

+

An alternative, make file-based build and upload system is also available for the ADK 2012. This +system is command line based and intended for production environments where using an IDE environment +to load software onto accessory hardware may be inconvenient or undesirable.

-

To use the command line based build system:

+

To setup the environment:

  1. Download the ADK 2012 source code files.
  2. -
  3. Download and install the make tool on your -development system.
  4. -
  5. Update your system’s PATH to include {@code -<adk-source-download>/external/toolchain/bin}.
  6. -
  7. Open a terminal window, navigate to {@code -<adk-source-download>/external/toolchain/app} and execute the following command: -
    $> make
  8. +
  9. In a terminal window, navigate to {@code +<adk-source-download>/adk2012/board/MakefileBasedBuild}.
  10. +
  11. Execute the following command and follow the instructions: +
    $> ./setup
    +
  12. +
+ +

To build a program for your accessory:

+
    +
  1. Place your accessory code in the {@code MakefileBasedBuild/app} directory, including all +required library files. See the {@code app/main.c} file for an example of the program format.
  2. +
  3. Execute the following command and follow the instructions: +
    $> ./build
    +
  4. +
+ +

To load the program on your accessory hardware:

+
    +
  1. Run the build process above and make sure your program compiled successfully.
  2. +
  3. Attach the accessory via USB cable to your development computer.
  4. +
  5. Check which port the accessory is attached to and modify the {@code UART} variable in the +{@code flash} script to the correct port address. On linux machines, the port address is typically +{@code /dev/ttyUSB0}.
  6. +
  7. Execute the following command to load the program on the accessory: +
    $> ./flash

How the ADK Connects with Android Devices

-- cgit v1.2.3-59-g8ed1b