Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9435b37 authored by Joe Fernandez's avatar Joe Fernandez
Browse files

docs: ADK2 docs - update alternative build instructions

Change-Id: I395749198a0c1589b71d49638620708e2dc2f6ae
parent 7547be05
Loading
Loading
Loading
Loading
+29 −11
Original line number Original line Diff line number Diff line
@@ -314,20 +314,38 @@ ready to communicate with your Android device.</li>


<h3 id="alt-build">Using the ADK Alternative Build System</h3>
<h3 id="alt-build">Using the ADK Alternative Build System</h3>


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


<p>To use the command line based build system:</p>
<p>To setup the environment:</p>
<ol>
<ol>
  <li><a href="#src-download">Download</a> the ADK 2012 source code files.</li>
  <li><a href="#src-download">Download</a> the ADK 2012 source code files.</li>
  <li>Download and install the <a href="http://www.gnu.org/software/make/">make</a> tool on your
  <li>In a terminal window, navigate to {@code
development system.</li>
&lt;adk-source-download&gt;/adk2012/board/MakefileBasedBuild}.</li>
  <li>Update your system’s PATH to include {@code
  <li>Execute the following command and follow the instructions:
&lt;adk-source-download&gt;/external/toolchain/bin}.</li>
    <pre>$> ./setup</pre>
  <li>Open a terminal window, navigate to {@code
  </li>
&lt;adk-source-download&gt;/external/toolchain/app} and execute the following command:
</ol>
  <pre>$> make</pre></li>

<p>To build a program for your accessory:</p>
<ol>
  <li>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.</li>
  <li>Execute the following command and follow the instructions:
    <pre>$> ./build</pre>
  </li>
</ol>

<p>To load the program on your accessory hardware:</p>
<ol>
  <li>Run the build process above and make sure your program compiled successfully.</li>
  <li>Attach the accessory via USB cable to your development computer.</li>
  <li>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}.</li>
  <li>Execute the following command to load the program on the accessory:
  <pre>$> ./flash</pre></li>
</ol>
</ol>


<h2 id="adk-conn">How the ADK Connects with Android Devices</h2>
<h2 id="adk-conn">How the ADK Connects with Android Devices</h2>