NoICE Debugger

ARM Tutorials

Running NoICE for the first time

Connecting to hardware

Compiling for debugging

Source-level debugging

 
Home Download Purchase Tutorials FAQ NoICE Help

ARM: Compiling for Debugging

Once you have learned a little about NoICE, the next step is to try source-level debugging.

This example uses ImageCraft ICCARM. You can follow along even if you don't have this compiler. All files necessary for you to run the NoICE demo will be provided. Setup for other compilers is generally similar.

You can download all the files for this example here: hellofoo.zip.

Using another compiler? The steps are similar. Consult your compiler's documentation to see what debug formats are available and how to select them. Here is the list of what NoICE supports.


Creating a project

In the ImageCraft IDE, select "Project", "New" to create an empty project. We called ours "hellofoo.prj". (You could just open hellofoo.prg from the zip file, but you will learn more if you do it yourself. You probably hate it when people tell you that.)

Select "Project", "Options..." to open the Compiler Options dialog.

In the "Compiler" tab, be sure that "Output Format" is set to "Intel HEX With Debugging Support".

To produce a debug file from the command line or a make file, use the "-g" compiler switch.

ImageCraft Compiler Options

Click on the "Target" tab.

Our example is for an Philips LPC2106, so we select "Philips LPC2106".

Be sure to specify the exact processor and memory configuration appropriate to your target.

The small version of printf is fine for our needs.

Be sure to uncheck "No C$$init in linker command file".

ImageCraft Target Options


Adding Source Code

In the ImageCraft IDE, open or create the source file hellofoo.c, and add it to the project.

Add the file "myserial.c" to the project. Printf won't work unless you add myserial.c or otherwise implement putchar and getchar functions.

Build the project, generating hellofoo.dbg and hellofoo.hex, along with various files that won't concern us further.

(If you don't have the ImageCraft compiler, hellofoo.dbg and .hex are include in hellofoo.zip.)

Source Code for hellofoo.c


Continue the tutorial with Source-level debugging

 
   
NoICE Debugger Copyright 2006 by John Hartman Revised 22 November 2006