You are on page 1of 15

TRITON IDE Quick Start Guide

Welcome to Triton IDE!


This tutorial provides a very simple and quick introduction to the Triton IDE workflow
by walking you through the creation of a simple "keypad" C language application. Once
you are done with this tutorial, you will have a general knowledge of how to create,
build, download and run applications in the IDE.
This tutorial takes less than 10 minutes to complete.
After you finish this tutorial, you can move on to the Triton IDE user manual or
integrated Triton IDE help. The IDE help provides comprehensive tutorials that highlight
a wider range of IDE features and programming techniques for a variety of application
types.

Before You Begin


To write your first program, you'll need to have the following software installed on your
system:

Triton IDE installed


JRE of version 1.5 or higher ( provided in Triton IDE setup)
Philips Utility ( provided in Triton IDE setup)

Setting up the Project


To create an IDE project:

Start Triton IDE.


Select the workspace in which you can create all your projects as shown in the
figure below. Click OK.

Triton IDE C/C++ Environment opens as shown in below figure in which you
can create new project, open existing one etc.

To create new project go to Project menu New  C Project. You will get
below figure.

o
o
o
o
o
o
o
o
o
o
o

In the Project Name field, type keypad.


Select the Target as per the board you have.
Select the Variant from the variant list.
Select Operating System as per your requirement.
Select the Port from Port field.
Select the Baud Rate.
Select the Build options.
Select the Download options
Select the Debug type
You can also change the location of project. For that
uncheck use default location.
Check Create Project Using Template.

Click Next.
Below screen will appear. Select Debug and Release configurations.

Click Finish.

The project is created and opened in the IDE. You should see the following components:

The Projects window, which contains a tree view of the components of the
project, including source files and properties file that your code depends on. .
The Source Editor window with a file called keypad_main.c open.

Adding Code to the Generated Source File


Because you have left the Create Project Using Template checkbox selected in the New
Project wizard, the IDE has created a skeleton class for you. You can add your keypad
code to the skeleton code by replacing the line:
//TODO: You can write your code at here

Sample code for Keypad


------------------------------#include <board.h>
int main(void)
{
char key;
q_keyinit(SPIRIT);
q_lcdinit(SPIRIT);

/* initialise the LCD*/

q_printf("%s \r\nkey;","Hello");
q_displaylcd("Hello", 5);
while(1)
{
while((key = q_keyread()) == 0);
key = key + 0x30;
q_clrscreen();
q_printf("%x \n", key);
q_displaylcd(&key, 1);
}
}

Save the change by choosing File > Save.

Compiling the Project

To compile project you need to select Debug or Release mode.


Debug mode: This creates an executable which you after downloading on the
target board are able to debug.
Release mode: This creates an executable which you can download on the target
board but you wont be able to debug.
Right click on the keypad project and point to Active Build Configuration and
select Release as shown in the below screen.

To build Project right click on keypad project and select Build Project.
Open the build console view to check for any errors as shown in the below figure.

If your project has built successfully *.hex will be created.


If there are any errors in the project Build Console view will display the error
messages and from Build Output view you can check the location of errors in
your code.
When you build the project, the keypad.hex is generated. You can see where the
new file is generated by opening the C/C++ Projects view and expanding the
keypad project node as shown in the following figure.

Now that you have built the project, you download executable on target board and run the
program.

Downloading the Program

In Triton IDE executable can be downloaded by three options:


ISP Utility, Odyssey JTAG and FTP.

Select the appropriate download option and right click on the *.hex file generated
and click Download as shown below.

After successful download of program you can check the application by running it
on target board.

To know more about download options refer to IDE integrated help file by clicking on
Help menu and open Help contents.
Also you can refer Triton IDE user manual.

Debugging the Program

In Triton IDE you can debug your program by three options:Monitor, Odyssey JTAG and Ethernet.

As per your requirement select appropriate option for debugging and build the
project in debug mode (same step as Release mode)
After compilation download the generated executable and you can now debug the
project.
Right click on the project and select Debug As and click Debug Local C/C++
Application.

Below screen appears for Debug environment

Debug environment allows you to debug code using commands Step In, Step Out,
Step over etc. Debug environment also displays disassembly, registers,
breakpoint, variables view.

To know more about debug options refer to IDE integrated help file by clicking on Help
menu and open Help contents.
Also you can refer Triton IDE user manual.

You might also like