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

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

Re: [avr-gcc-list] Problem to get .coff


From: Colin Paul Gloster
Subject: Re: [avr-gcc-list] Problem to get .coff
Date: Tue, 2 Jan 2007 13:40:17 +0100 (CET)

On Tue, 2 Jan 2007, Ramesh Arise wrote:

"Hi,

    I am  new  to  use  AVR - GCC."

Welcome.

" On windows-XP."

Perhaps you should consider using FreeBSD. WWW.FreeBSD.org

" I need your help.
Currently  i am  using WinAVR-programmers notepad, AVR studio to work using
ATmega168 microcontroller. I am  getting  some problem  while  using these
tools (i am  not getting the .cof file)."

Why do you want a COFF file?

" Basically i am following the
procedure as described below.

[..]

3]  In C:\WinAVR\sample  there it contains a Make file.  I am simply adding
this make file to the project,  On double clicking this make file  it opens
here i am  specifying 3 options
         A]  MCU     = atmega168
         B] TARGET = Project name without Extension(project1)
         C] OPT       = 0
for simple one .c file
[..]"

According to WinAVR.Sourceforge.net/links.html , MFile ( 
WWW.Sax.De/~joerg/mfile/ ) is in WinAVR so perhaps you should try using 
MFile to create a new Makefile instead of adapting a file whose 
suitability to your particular project is dubious.

"5] Tools->[Winavr] Makeall   to compile the code.
6] Here  in output window  i am getting
**************************************************************************************************************************************************************
> "make.exe" all

[..]

Compiling C: project3.c
avr-gcc -c -mmcu=atmega168 -I. -gdwarf-2 -DF_CPU=8000000UL -O0
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wundef -Wa,-adhlns=obj/project3.lst  -std=gnu99 -Wundef
-MD -MP -MF .dep/project3.o.d project3.c -o obj/project3.o
make.exe: *** No rule to make target `obj/main.o', needed by
`project3.elf'.  Stop.

> Process Exit Code: 2
> Time Taken: 00:02
**************************************************************************************************************************************************************

7] Then i am opening the TOOLS->OPTIONS in options window iam sellecting the
TOOLS->ADD

here iam adding the properties:         NAME :[Winavr]MakeExtcoff
                                               Command  :make.exe
                                                    Folder   :%d
                                             Parameters  :extcoff

[..]
finally i am getting( .c, .pnproj, .pnps, .lst, .o) files
Here if i got the .cof file i will simulate the code by taking this .cof
file in to AVRstudio This is my idea

[..]"

It seems that you have also not obtained an ELF file but that a tool has 
attempted to create project3.elf. This is a simplification, but you may 
interpret ELF and COFF to be alternatives. From
HTTP://lists.GNU.org/archive/html/avr-gcc-list/2005-07/msg00014.html
:

"[..]

[..]
It may seem like you are converting from elf to coff before you feed the 
object files to AVR Studio.
You should not use the elf2coff conversion tool anymore. AVR Studio now, 
(4.11) has a parser to handle elf/dwarf files directly. Remember to use 
the -gdwarf-2 flag.

Try to use the elf/dwarf files directly [..]"

An old (and possibly still the current) version of MFile would run 
COFFCONVERT but it is not necessary to do so.

You have been given enough advice above, but if you are interested to 
learn more re ELF versus COFF, you can start with:
WWW.Delorie.com/djgpp/v2faq/faq22_22.html
HTTP://Sourceware.org/binutils/docs-2.17/bfd/coff.html#coff
HTTP://Sourceware.org/binutils/docs-2.17/bfd/elf.html#elf

Regards,
Colin Paul Gloster




reply via email to

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