NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Running the TCA8418 Demo (CCS)
MAVRK is no longer an active TI evaluation platform. Please contact TI application support if you need further information on TI products or support.
- 1 Purpose
- 2 What You Will Need For This Project
- 3 Workspaces and Templates
- 4 Initial Project
- 5 Running the Qt Demo GUI
- 6 MAVRK Links
This page describes how to bring up a very simple demo application on the MAVRK system using Code Composer. The application contains code that will allow the MCU to interact with the TCA-8418 keyboard, and the Qt Demo GUI will allow us to see a virtual keyboard in action as we interact with the real keyboard.
What You Will Need For This Project
In order to run this application, you will need:
- MB-PRO-MVK - MAVRK Pro Motherboard
- MCU-430F5438A-MVK- MSP430F5438A Processor Component
- MAVRK Software installed on PC. Please see MAVRK Software Installation Guide.
- Code Composer Studio v5 software installed on PC. If you intend to use this with IAR (alternative compilor) please follow the instructions in Running the TCA8418 Demo (IAR).
- MSP-FET430UIF - MSP430 USB Debug Interface
- USB Cable (A to Micro AB) to power the MAVRK Pro motherboard
- TCA8418 Module
- Latest version of the Qt Demo GUI
Workspaces and Templates
Code Composer Studio is a modified version of Eclipse IDE which gathers software together into workspaces. A workspace includes all of the source software necessary to compile together and create one application executable code. This executable code can then be downloaded onto the MAVRK system and run.
The MAVRK software contains a number of Template projects designed to enable the user to rapidly begin development. In general, there are templates available for each separate category of components. These templates contain a workspace that already has a generic working program and most of the files necessary to develop software for that component.
In this case, we will use the TCA8418 Template. Make sure that your TCA8418 module is attached to RF slot 1 on the MAVRK board. The motherboard and module should be assembled like this:
To begin working on the project, you need to first launch Code Composer Studio.
For Windows CCS the program can be found in Start->Program Files->Texas Instruments->Code Composer Studio #.#.#->Code Composer Studio #.#.#.
If this window related to the Workspace Launcher appears:
Set the workspace directory to the MAVRK_CCS directory your root directory [C:\] for example C:\MAVRK_CCS.
For more details on what this does visit Selecting the CCS Workspace Directory.
Otherwise, the start window should look like:
Click on X to close the Welcome Tab to close the window. The resulting Code Composer window should look like:
You can then import the project by selecting File -> Import.
You should select “Existing CCS/CCE Eclipse Projects” and click “Next”
We want to choose the “Select search-directory” option and click “Browse” to find the template.
The template in question will be located in the MAVRK software under mavrk_embedded\Modular_EVM_projects\Component_Demo_Projects\TCA8418-MVK_Demo_Project
Click "Finish" after you've selected the template.
The launched project will look like:
On the left side, we see a list of folders that will contain the library files and support files necessary to build the application. The main program file is also visible here in TCA8418-MVK_Demo_Main.c
Some basic capabilities of the system:
- Clicking on the + sign by a folder will expand the folder showing the source files in that folder.
- Clicking on the - sign of an expanded folder will collapse the folder.
- Clicking on the + sign for a specific file will show the header files used to compile that source file
Before we begin, we must configure certain settings. In particular, we need to add the predefined symbol “__MSP430F5438A__” to the settings. You can do so by right mouse clicking on "TCA8418-MVK_Demo” and selecting “Properties”
Once in “Properties” expand the “CCS Build” tab in the left column. Then click on “Predefined Symbols” under “MSP430 Compiler”.
Click on the “Add” icon for “Pre-define NAME” to add a symbol. Type in “__MSP430F5438A__” and click “OK”.
Click “OK” again to save the settings and to quit the window.
Now lets take a look at all the files included in the application. You can open each of the folders to see the files provided in the MAVRK libraries that are used within this system. A majority of the files are used to initialize the system.
While that seems like a lot of work, these files contain pre-written functions for you to utilize. The actual user based work for this application is located in the TCA8418-MVK_Demo_Main.c file.
First we have to build the project.
This is done by the “Build Project” option under the “Project” tab. Make sure that your project “TCA8418-MVK_Demo” is highlighted before clicking on “Build” Project”
At this point a Console block with build status will appear at the bottom of the Code Compiler Workbench. We can also see in the Problems block the Total Number of Errors and Total Number of Warnings. These should be 0 for a good build.
Debug and Run
Now, we are ready to get this thing going. Let’s get the board ready. Make sure the MCU-430F5438A-MVK is installed on the board.
Attach the USB cable from the PC to the USB connector to the left of the JTAG connector at the top of the MAVRK Pro motherboard. This will provide power for the board.
Now that we have power, we can attach the JTAG connector from the MSP430 USB-Debug-Interface to the JTAG slot at the top of the MAVRK Pro motherboard and the other end into a USB slot on the PC.
At this, debug the project by selecting the drop-down arrow on the bug -> Debug As -> Code Composer Debug Session
The executable file will download and the program will halt at the first step of the main program. We can now hit the Run button to run the program.
Running the Qt Demo GUI
At this point, the code should be loaded onto your MCU. In order for us to see that the PC is receiving the keyboard signals, we can see a virtual keyboard in action on the Qt Demo App. To get the current Qt Demo App, create a new repository by right mouse clicking in a folder and choosing "Git Clone".
Enter "ssh://dlegerr.ext.ti.com:29421/mavrk_qt_tool" into the URL and click OK.
We need to switch to the mavrk_prerelease folder and do a pull so that we get the current version of the Qt Demo App. To do so, right click on your repository folder "mavrk_qt_tool" -> TortoiseGit -> Switch/Checkout...
Now choose the "mavrk_prerelease_dev" branch and click OK.
After you do the switch, right mouse click on the "mavrk_qt_tool" folder again and click on TortoiseGit -> Pull...
Now you should have the latest version of the Qt Demo App. Go to mavrk_qt_tool -> Released Version - QT Demo Application -> mavrk_demo_gui.exe
This should open up the GUI software that looks like this:
Click on a few buttons on the keypad and wait a few seconds. You should see a "Select Device" popup. Click OK.
Now you should see the virtual keypad on your PC. It will copy the actions you make on the keypad module by highlighting the pressed button green.
For a more complete discussion of the various software API functions, please see the MAVRK API Documentation.
I have MAVRK Questions
I want Info on other MAVRK Software Functionality
<DPL> category = MAVRK category = Software columns = 3 </DPL>
I want more info on MAVRK
<dpl> category = MAVRK category = navigation columns = 3 </dpl>