Eclipse debugging

Hi Guys,

I’m new to Yagarto tools and I’m trying to debug LPC2131.

How do I show the status of the peripherals? (I tried to view them by monitoring their memory but all that’s displayed are ??? )

How do I enable the global variable icon? (it’s greyed out)

How would I generate a .lst file?

Thanks

TJ

Hi TJ.

All debugging in Eclipse is done when the application has stopped (it hit a breakpoint or you hit the “pause” button).

To look at a device register, you must know it’s memory address. For example, the Output Data Status Register (PIO_ODSR) in an Atmel AT91SAM7S256 cpu is at 0xFFFFF438.

In Eclipse, you can bring up the “Expressions” view in the debugger, right-click and select “Add Watch Expression”. Enter a valid C language expresion such as: *(0xFFFFF438)

The next time the application stops, the “Expressions” view will show the evaluated expression like this:

*(0xFFFFF438) = 12 (I think you are stuck with decimal format)

When I run the Eclipse debugger, the “Add Globals” icon is greyed-out while the application is running and properly illuminated when the application stops.

There is no list file, per se, for the C compiler to be generated (what would it show in any case). There is a list file that can be generated by the assembler. For example,

arm-elf-as -ahls -mapcs-32 -o crt.o crt.s

will assemble the file crt.s and produce a listing with high level statements mixed in with symbol info, etc.

It is possible to command the GNU C compiler to not generate an object file but rather generate an assembler source file. You do that with the -S command-line argument.

arm-elf-gcc -S main.c

The above example will compile main.c and produce an assembler source file “main.s”. You could then run this through the GNU assembler as shown above and get a detailed listing file.

There’s usually no need for a C listing file. When your application stops, the Eclipse assembler view will show the disassembled C code with the high-level statements annotated within the assembler statements.

Cheers,

Jim Lynch

p.s. you might want to read my tutorial “Using Open Source Tools for AT91SAM7 Cross Development” . Find it at www.at91.com

Hi Jim,

Thank you for your response.

I’m not familiar with ARM assembly(rookie) therefore I thought if I can get a preview of what is being generated by a C code (like the Eclipse assembler view without going into debug) then I could kinda learn from it.

Yungky