TI AWR1642 build with RT-Druid

From ERIKA WIKI
Jump to: navigation, search

Synopsys

This guide illustrates how to build and run a first ERIKA Enterprise v3 application for AWR1642BOOST

  • Using the Eclipse environment (this wiki page)
    • OIL File editing integrated in Eclipse
    • No integrated debugger support (you will need CCS v8 or Lauterbach Trace32 (for lauterbach no specific instruction are provided))

Prerequisites

Please remember to install CCS v8 and MMWAVE-SDK 02_01_00_04 to obtain the full functionality described in this tutorial.

Additional information on prerequisites is available at the Quick Start Guide - Prerequisites.


RT-Druid Eclipse IDE

  • Double-click the eclipse.exe application located in the eclipse folder extracted from the RT-Druid Package. Then, the workspace selection window will appear as shown in the following figure:
Figure 1: RT-Druid Eclipse IDE workspace selection.
  • Browse the file-system to select Workspace folder and then click on the OK button to let the RT-Druid Eclipse IDE start as shown in the following figure:
Figure 2: RT-Druid Eclipse IDE welcome.
  • Click on the Welcome tab-sheet close button to show the default RT-Druid Eclipse IDE C/C++ perspective as shown in the following figure:
Figure 3: RT-Druid Eclipse IDE C/C++ perspective.

RT-Druid Template Project

  • Click on File->New->RT-Druid v3 Oil and C/C++ Project menu entry as shown in the following figure:
Figure 4: RT-Druid v3 Oil and C/C++ Project.
  • The RT-Druid C/C++ Project Wizard will open as shown in the following figure:
Figure 5: RT-Druid C/C++ Project Wizard.
  • Type the name of the project in the Project name text-box (e.g., TI_AWR1642_example).
  • Make sure the Cygwin GCC toolchain is selected and then click on the Next button.
  • The wizard will show the window to select a project template as shown in the following figure:
Figure 6: RT-Druid Project Template Wizard.
  • Click on Create a project using one of these templates check-box to let the Template Wizard to show the available templates as shown in the following figure:
Figure 7: RT-Druid Available Templates Wizard.
  • Expand the Cortex-R and TI AWR1642 entries and choose the desired template to instantiate: Full Demo.
  • Finally, click on the Finish button to instantiate an RT-Druid Eclipse project from a chosen template as shown in the following figure:
Figure 8: RT-Druid Eclipse Project.

RT-Druid Configuration

  • Click on the Window->Preferences menu entry as shown in the following figure:
Figure 9: RT-Druid Eclipse Preferences.
  • The RT-Druid Eclipse Preferences window will open as shown in the following figure:
Figure 10: RT-Druid Eclipse Preferences OIL.
  • Click the Generator Properties entry in the OIL section of the left panel to show the RT-Druid Generator Properties to configure.
  • Double-click on the TI Code Generation Tool ARM property to configure the TI CGT ARM C Compiler installation path as shown in the following figure:
Figure 11: RT-Druid TI CGT ARM Compiler Path Property.
  • Browse the file-system to select the ARM GCC Compiler path (E.g. C:\ti\ti-cgt-arm_16.9.6.LTS) and then click the OK button. N.B. This specific version of the compiler in this specific position in installed by mmWave SDK 02_01_00_04 installer
  • Double-click on the TI mmWave SDK for sensors property to configure the S32 SDK installation path as shown in the following figure:
Figure 12: RT-Druid TI mmWave SDK for sensors Path Property.
  • Browse the file-system to select the TI mmWave SDK for sensors path (E.g. C:\ti\mmwave_sdk_02_01_00_04) and then click the OK button.
  • Finally, click the Apply and Close button to confirm the configuration properties as shown in the following figure:
Figure 15: RT-Druid Configured Properties.

ERIKA distribution clean

  • Right-Click on TI_AWR1642_example project into Eclipse Project Explorer panel and click on Clean Erika context-menu entry as shown in the following figure:
Figure 16: Erika Clean.
  • The Clean up Erika Files dialog window will appear as shown in the following figure:
Figure 17: Clean up Erika Files.
  • Click on the Yes button to clean the whole ERIKA distribution.

NOTE: the distribution folder will be automatically regenerated if the flag Build Automatically is enabled.

Figure 18: Build automatically flag.

NOTE: this operation may be necessary every time an ERIKA or RT-Druid configuration property is modified.

ERIKA project build

  • Right-click on TI_AWR1642_example project into Eclipse Project Explorer panel and click on Build Project context-menu entry as shown in the following figure:
Figure 19: Erika project build.
  • The build process starts as shown in the following figure:
Figure 20: Erika build process.
  • The build process ends successfully as shown in the following figure:
Figure 21: Erika build successfully.

How to debug the project with CCS

Open CCS v8

Create a TI AWR1642 Target File

As first thing you need to configure the debugging target. This procedure has to be done only once for all the projects that target TI AWR 1642 (CCS projects or, as in our case, external).

  • Right click on Project Explorer and select New->Taget Configuration File (Change the target-file name in the wizard if you wish. For This tutorial I changed it in TI AWR1642.ccrxml)
Figure 22: Create a Target Configuration File for TI AWR1642.

In the target file editor:

  • Change the combo box Connection to Texas Instrument XDS110 USB Debug Probe
  • Select AWR1642 in Board or Device
Figure 23: Configure Target Configuration File for TI AWR1642.
  • After attach your TIAWR1642BOOST board to your computer and test the connection
Figure 24: Test Connection with TI AWR1642BOOST.

Import RT-Druid Project and Create the Lauch Configuration

  • and right click on project explorer select Import->Import in Wizard Windows select C/C++->C/C++ Executable
Figure 25: Import RT-Druid Project as C/C+ executable in CCS v8.
  • Change the binary parse from the default COFF to Elf (the highlighted combo box in the following pictures)
  • Search the erikaapp.out file inside the RT-Druid project/out folder
  • Select Next
Figure 26: Select RT-Druid Project out erika3app.out as executable.
  • Important: check the checkbox Create a Launch Configuration
  • Important: in the corresponding combo box select Code Compose Studio - Device Debugging
  • Select Next
Figure 27: Create the Code Compose Studio - Device Debugging configuration

In Debug Configuration Wizard

  • Select the TI AWR1642 Target Configuration file through the File System
  • Select Apply
  • Start Debug
Figure 28: Configure the Launch Configuration

CCS v8 Device Debug Perspective

In the CCS v8 Debug Perspective

  • Connect the target
Figure 29: Connect to the target
  • Download the application to the target
Figure 30: Download the application on the target. Step A
Figure 31: Download the application on the target. Step B


This should setup the debug session with the application stopped at main. Sometimes CCS fail in doing that, redo the download application procedure: this is usually enough to fix the things.

N.B. To have evidence of the application running on the board be sure that the console view is active, printf output is semihosted by jtag and showed on debug view.


Figure 32: Application debug on the target