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

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

[avr-gcc-list] Success! CVS MinGW32 AVR tools build... coff output works


From: Tony Mahar
Subject: [avr-gcc-list] Success! CVS MinGW32 AVR tools build... coff output works with AVR Studio 3.54/4.0build2 Simulators!!
Date: Fri, 14 Jun 2002 19:00:14 -0400

Yahoo!  (i'm excited... spent way to long getting this to work :)

After spending 5 days researching how to successfully build gcc 3.1 or the
current cvs snapshots I finally got it to go work.
(Hello ATMega8 AVR Studio integration!)

Trial after trial I could not get current gcc CVS to compile in cygwin using
these settings:
build=i686-pc-cygwin
host=i686-pc-mingw32
target=avr

Trial after trial i could not get it to compile under the mingw32 1.1
release with these settings:
host=i686-pc-mingw32
host=i686-pc-mingw32
target=avr
or
host=i386-pc-mingw32
host=i386-pc-mingw32
target=avr

Running the tools built for cygwin greated the tools and avr compilers
correctly, BUT  elfcoff would NOT produce an output that AVR Studio 3.54 or
4.0 build 2 could understand.  So i continued trying for a pure mingw32
build of the avr tools.

The problem when compiling for the mingw32 host was the mingw32 compiler
does not understand unix functions such as fork and several others.
I found an old patch in an old message to get gcc 3.0 to compile under
mingw32 and I adapted it, and had to change other parts of code as well.  I
copied my entire build output tree over the avrfreaks release.  I had
already tested their compilers against their gcctest directories and that
provided a good base reference.


The result?

IT WORKS!  elfcoff chokes a little right now and does not produce the crt1.S
or crt0.S (i forget which).  Initial testing with avr studio does not show
any problems however.  i have been able to use both AVR Studios to simulate
my code compiled for the ATMega8 the same as the avrfreaks avr tools
compiled for the AT90S4433 .

Before I make a release of the binaries I want to recompile everything for
the i686-pc-mingw32 instead of i386-pc-mingw32 and verify the tools some
more, do a detailed write up for other people to follow and compile their
own tree if they should so desire, write a patch, etc.

***** Does anybody know what AVR Studio uses those *.S files for (why does
elfcoff produce them)?

Tony

----- Original Message -----
From: "Bill Collis" <address@hidden>
To: <address@hidden>
Sent: Friday, June 14, 2002 2:11 PM
Subject: Re: [avr-gcc-list] Buildling files on other drives


> Yes Glenn
> my experiments so far with it are similar to yours.
> I gave up in the end and just deleted those few lines (clean also) from
the
> avr_make file.
> Thanks for your suggestions
> Bill
>
> ----- Original Message -----
> From: "Glenn" <address@hidden>
> To: "Ted Larsson" <address@hidden>; "Bill Collis" <address@hidden>
> Cc: <address@hidden>
> Sent: Saturday, June 15, 2002 2:02 AM
> Subject: Re: [avr-gcc-list] Buildling files on other drives
>
>
> > Bill & all,
> >
> > I have also been plagued with this problem for some time.
> >
> > The ugly(!) workaround is to copy the offending commands (rm fails too)
> into a
> > batch file & call it from make:
> >
> > For example:
> >
> > Create cpycoff.bat in the avrfreaks dir with the text:
> > cp coff\*sym .
> > cp coff\*S .
> >
> > Then change avr_make to:
> >
> > %.cof: %.elf
> > $(ELFCOF) $< $(OUT) $@ $*.sym
> > $(CP) $(OUT)\$@ .
> > c:\avegcc\avrfreaks\cpycoff.bat
> >
> > The same problem exists with the clean target....
> > make clean.bat like:
> > rm -f coff\*.*
> >
> > and call that from the clean target.
> >
> > You can get fancy with make variables & passing them to the batch
> processor
> > (via %1, %2, etc), but I omitted that for clarity & brevity.
> >
> > It seems that under XP (and other win versions too!), the binutils shell
> has
> > problems, but calling it through the comannd processor is OK.
> >
> > When I can find time & detailed instructions, I intend to compile the
> latest
> > tools myself (since avrfreaks is so old) to see if it has been fixed.
> >
> > Kind regards,
> > Glenn.
> >
> > --- Ted Larsson <address@hidden> wrote:
> > > Bill Collis (address@hidden) wrote:
> > > > No its not the cp file it cant find.
> > > > It has been using that successfully up to that point.
> > > >
> > > > cp is reporting that it cant find something
> > > >
> > > > the line it comes to in the avr_make is:
> > > >     $(CP) $(OUT)\\*sym .
> > > > with the variables replaced
> > > >      cp coff\\*sym .
> > > > and it replies:
> > > >     cp: not found
> > > >
> > > > does anyone know what cp coff\\*sym . means?
> > >
> > > The line above this one is executed successfully, and it
> > > only has one backslash. Try removing one of the backslashes
> > > in the makefile on the relevant lines.
> > >
> > > btw, "cp coff\\*sym ." means copy all files in the coff
> > > directory ending with sym to the current directory.
> > >
> > > Cheers,
> > > /Ted
> > >
> > > avr-gcc-list at http://avr1.org
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
>
>
> avr-gcc-list at http://avr1.org
>

avr-gcc-list at http://avr1.org



reply via email to

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