avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Recipe: How to debug assembler source files with AVRStud


From: Haase Bjoern (EW-BEU/PMT) *
Subject: [avr-gcc-list] Recipe: How to debug assembler source files with AVRStudio using gcc tools
Date: Fri, 16 Jan 2004 09:46:33 +0100

Hy,

thanks to Larry's hint I got the system running.

... in case that so else will have the same problem in the future ..

Summary of the steps that will make it possible to 
debug your assembler sources with the Atmel AVRStudio tool using gcc tools:


Recipe:

1.) compile your assembler source code using the command line parameters

avr-as --gstabs --mmcu your_mcu_identifier -o filename.o filename.s

2.) link your application (e.g. with avr-gcc )

avr-gcc -g -mmcu your_mcu_identifier -o project.elf filename.o filename2.o ...

3.) generate the COFF-Object file excecuting

avr-objcopy -O coff-ext-avr --debugging project.elf project.cof

4.) Use the .cof-file with AVR Studio



In order to be able to step through your assembler routine in the debugger, add 
the following additional code lines to your assembly file and you will be
able to debug the function:

/*
 * extern unsigned int your_assembler_function_name (void);
 */

.stabs  "",100,0,0,your_assembler_function_name
.stabs  "your_assembler_source_file_name.s",100,0,0,your_assembler_function_name

.global your_assembler_function_name
.func   your_assembler_function_name

your_assembler_function_name:
  
        ... your assembler function code ...
  
        ret
.endfunc



-----Ursprüngliche Nachricht-----
Von: address@hidden
[mailto:address@hidden Auftrag von Larry Barello
Gesendet: Donnerstag, 15. Januar 2004 15:21
An: AVR GCC List
Betreff: RE: [avr-gcc-list] converting gas-generated stabs debugging
symbolsto Atmel coff-format


Try looking at this:

http://www.avr1.org/pipermail/avr-gcc-list/2003-April/004204.html

-----Original Message-----
From: Haase Bjoern
...
Since we will have applications with a certain amount of assembler code, it
would be *very* helpful if
we could step through our assembler source code during debugging.
And that is where I have encountered problems: So far, I did not succeed in
debugging assembler source with the AVRStudio tool.

(I have scanned the archive since september 03 when the avr-objcopy patch
for coff-avr has been published. Unfortunately, I did not find a solution
therein.)

It seems to me, that the problem is related to the conversion procedure
trying to translate the ELF- information to the archaic COFF format.



_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]