Searching \ for '[AVR]: Still having problems with WinAVR' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=still+having+problems
Search entire site for: 'Still having problems with WinAVR'.

Exact match. Not showing close matches.
PICList Thread
'[AVR]: Still having problems with WinAVR'
2004\04\24@171007 by Herbert Graf

picon face
I've been really trying to get going with WinAVR but I keep hitting stupid
little issues.

Now when I run make I get this:

C:\WinAVR\examples\twitest>make
avr-gcc -O -g -Wall -ffreestanding -mmcu=atmega128   -c -o twitest.o
twitest.c
twitest.c:17:22: no include path in which to find inttypes.h
twitest.c:18:19: no include path in which to find stdio.h
twitest.c:19:20: no include path in which to find stdlib.h
twitest.c:21:20: no include path in which to find avr/io.h
twitest.c:22:47: no include path in which to find avr/twi.h

Why the hell didn't the intaller set this all up?

Do people really tolerate an install that is as useless as this?

Hopefully it's something simple that I'm doing wrong.

Thanks for any help.

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2004\04\24@181226 by Kenneth Lumia

picon face
I don't know if this is your problem, but you may want to
check the makefile. If you edited it incorrectly (check
the docs for differences between spaces and tabs especially),
it could be messed up.  Also, there should be a section
in there that looks as follows:

# Define directories, if needed.
DIRAVR = c:/winavr
DIRAVRBIN = $(DIRAVR)/bin
DIRAVRUTILS = $(DIRAVR)/utils/bin
DIRINC = .
DIRLIB = $(DIRAVR)/avr/lib

When I run the makefile (from within the programmers
notepad), I get the following command line:

avr-gcc -c -mmcu=atmega16 -I. -g -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wa,-adhlns=command_parser.lst
-std=gnu99 command_parser.c -o command_parser.o

I just tried a make from a dos prompt and the make fails
when attempting to do a link.  You may want to try it all
from within pn. I followed the document
winavr.sourceforge.net/download/install_config_winavr.pdf
and everything setup fine.

Hope this may give you some clues as to where to look.

As far as the installer goes, I loaded a version from late last year
(20030913) and everything  worked fine (WindowsXP pro).


Ken

{Original Message removed}

2004\04\24@191608 by Herbert Graf

flavicon
face
{Quote hidden}

       I have been referencing that document. The only way to get it to get close
to working is to add the c:\winavr\avr\include path to the "Extralib" part
of the makefile. I still end up with the error below.

> Hope this may give you some clues as to where to look.

       Thanks for the help. I hacked my way through the includes, and now I'm
getting this:

Compiling: test.c
avr-gcc -c -mmcu=atmega128 -I. -g -Os -funsigned-char -funsig
ototypes -Wa,-adhlns=test.lst  -std=gnu99 -Wp,-M,-MP,-MT,test
test.c:2: warning: function declaration isn't a prototype
test.c:2: warning: return type of `main' is not `int'
test.c: In function `main':
test.c:3: warning: implicit declaration of function `printf'
as: unrecognized option `-cu=atmega128'
make: *** [test.o] Error 1

What the hell is that all about?


I must say that so far switching to the ATMEL processor has been the MOST
FRUSTRATING THING I've probably ever done microcontroller wise. Nothing is
working right on the software front. Even AVR Studio didn't install
properly, it took a few hacks to get it working.

Now the gcc-avr thing is driving me nuts (aside from the fact that if you
install it to a path with a space in it it completely bungs everything up,
which of course is mentioned nowhere).

On top of that I never received my ATMEL samples, and the samples I did
receive through the Circuit Cellar contest were the wrong ones...

I'm pretty much at the point of just giving up, getting my PIC flow working
was NEVER this hard, and that's including third party tools.

I guess ATMEL still has alot to learn about making the learning curve easy.
Shame really.

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2004\04\24@203644 by Kenneth Lumia

picon face
> as: unrecognized option `-cu=atmega128'

I think that the "as:" part is the assembler - check the following line in
the makefile, especially the -mmcu part to make sure you didn't
accidentally change it to -cu.

ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)

As far as the warnings go, please paste the first 5 or ten lines
of test.c into your next message, it appears your missing some
function prototypes and it would be easier to
see what is actually there.

I'm disappointed that you're having so many problems.  I'm working
on a project for the circuit cellar contest and was going to
mention how easily and quickly I was able to get winavr up and
running (actually had zero problems - I know, just what you wanted to
hear!).

Ken



{Original Message removed}

2004\04\24@205754 by Herbert Graf

flavicon
face
part 1 3279 bytes content-type:text/plain; (decoded 7bit)

> > as: unrecognized option `-cu=atmega128'
>
> I think that the "as:" part is the assembler - check the following line in
> the makefile, especially the -mmcu part to make sure you didn't
> accidentally change it to -cu.
>
> ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
>
> As far as the warnings go, please paste the first 5 or ten lines
> of test.c into your next message, it appears your missing some
> function prototypes and it would be easier to
> see what is actually there.

       I'm actually now trying with the exact example that comes with the package
(after syntax corrections):

#include <avr/io.h>
#include <avr/delay.h>
int main (void)
{
       unsigned char counter;
       //set PORTB for output
       DDRB =0xFF;
       while (1)
       {
               //set PORTB.2 high
               PORTB |=1<<2;
               //wait (10 *120000)cycles =wait 1200000 cycles
               counter =0;
               while (counter !=5)
               {
                       //wait (30000 x 4)cycles =wait 120000 cycles
                       _delay_loop_2(30000);
                       counter++;
               }
               //set PORTB.2 low
               PORTB &=~(1<<2);
               //wait (10 *120000)cycles =wait 1200000 cycles
               counter =0;
               while (counter !=5)
               {
                       //wait (30000 x 4)cycles =wait 120000 cycles
                       _delay_loop_2(30000);
                       counter++;
               }
       }
       return 1;
}

And the result of 'make all':

Compiling: test1.c
avr-gcc -c -mmcu=atmega8535 -I. -g -Os -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=test1.lst
-Ic:\winavr\avr\include -std=gnu99 -Wp,-M,-MP,-MT,test1.o,-MF,.dep/test1.o.d
test1.c -o test1.o
as: unrecognized option `-cu=atmega8535'
make.exe: *** [test1.o] Error 1

FWIW I've tried different processors all with similar errors (i.e. if I sub
atmega16 the error becomes -cu=atmega16)

I have checked that line in the makefile:

ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)

I've attached the complete makefile to this message (it's very small).

> I'm disappointed that you're having so many problems.  I'm working
> on a project for the circuit cellar contest and was going to
> mention how easily and quickly I was able to get winavr up and
> running (actually had zero problems - I know, just what you wanted to
> hear!).
>
> Ken

       Well I have no problem debugging problems that are mine. Debugging problems
that aren't mine generally aren't something I will do unless absolutely
necessary, and trying to debug defective software is about the lowest on my
scale.

       If it weren't for the circuit cellar contest I wouldn't have bothered to
try for this long.

       Thanks for your help. TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body




part 2 3951 bytes content-type:application/x-zip-compressed; (decode)

2004\04\24@220912 by Kenneth Lumia

picon face
Herbert,

Well, I don't know.  I created a directory and copied in your
makefile.  Then I  cut and pasted the code from the body
of your message into a file named test1.c.  Typed "make all"
from both the pn and from a dos prompt - worked fine, no errors.

About the only suggestion I have left is to make sure your
path is correct and you are really using the correct "make"
application (first in path??) as opposed to some other
make (VC++, PIC, etc. - could account for the invalid
assembler option).  My path is as follows:

PATH=C:\WinAVR\bin;C:\WinAVR\utils\bin;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\COSMIC\CXHC08LT;c:\program files
\devstudio\sharedide\bin\ide;c
:\program files\devstudio\sharedide\bin;c:\program
files\devstudio\vc\bin;C:\COS
MIC\CXHC08LT;C:\PICC

Good Luck.

Ken

{Original Message removed}

2004\04\24@224308 by Herbert Graf

flavicon
face
{Quote hidden}

       For make:

C:\>which make.exe
C:\WinAVR\utils\bin\make.exe

       as was pointing to a different tool though, so I fixed that.

       Then it complained about object files missing (crtm162.o), I just copied
them over, don't have time to figure out that crap.

       Now I get the following:

avr-gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Linking: test1.elf
avr-gcc -mmcu=atmega162 -I. -g -Os -funsigned-char -funsigned-bitfields -fpa
ck-struct -fshort-enums -Wall -Wstrict-proto
types -Wa,-adhlns=test1.o -Ic:\winavr\avr\include -std=gnu99 -Wp,-M,-MP,-MT,
test1.o,-MF,.dep/test1.elf.d test1.o   --out
put test1.elf -Wl,-Map=test1.map,--cref  -lm
ld: cannot find -lgcc
make: *** [test1.elf] Error 1

I find no reference to this -lgcc in the makefile so I have NO idea what's
passing it to ld.

I believe I have the "right" ld:

C:\WinAVR\examples\test>which ld.exe
C:\WinAVR\avr\bin\ld.exe


I must say that I will be sending both circuit cellar and Atmel a very terse
letter about how they shouldn't be recommending such crap software to a
newbie.

Thanks again for your help.

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2004\04\24@231253 by Kenneth Lumia

picon face
>I believe I have the "right" ld:

>C:\WinAVR\examples\test>which ld.exe
>C:\WinAVR\avr\bin\ld.exe

ld is not on my path - I do a
F:\avrprojects\testgarbage>which avr-ld.exe

which gives me:

C:\WinAVR\bin\avr-ld.exe

Perhaps avr-ld.exe is the correct linker?

Just as a side note, when you did the installation, did you
select all defaults (expecially the install directory)? It seems
that all your path info is messed up - I've seen it happen
in other applications when you go the "custom install" route.
Insufficient testing.

Ken

{Original Message removed}

2004\04\24@233820 by Herbert Graf

flavicon
face
> >I believe I have the "right" ld:
>
> >C:\WinAVR\examples\test>which ld.exe
> >C:\WinAVR\avr\bin\ld.exe
>
> ld is not on my path - I do a
> F:\avrprojects\testgarbage>which avr-ld.exe
>
> which gives me:
>
> C:\WinAVR\bin\avr-ld.exe
>
> Perhaps avr-ld.exe is the correct linker?

       I tried changing the name of ld.exe to something else and got and error
stating ld not found, so I believe it is necessary. Whether it's necessary
it's in the path I don't know.

> Just as a side note, when you did the installation, did you
> select all defaults (expecially the install directory)? It seems
> that all your path info is messed up - I've seen it happen
> in other applications when you go the "custom install" route.
> Insufficient testing.
>
> Ken

       I initially WANTED to install it in a custom place, I absolutely HATE
programs that require they be installed where THEY want to. Unfortunately
since the path I WANTED to use had a space in it everything failed. So I
relented and let it put things where it wanted to.

I've given up for now, it's not worth my time, the project I had in mind
will simply be done with a PIC, at least that flow worked the first time I
tried it (C18). Thanks anyways, TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2004\04\25@101746 by John Pearson

flavicon
face
When I started with the AVR, I downloaded this program. But I could never
figure out even how to install it at that time.

I tried Bascom AVR and have been happily developing applications ever since.
It is a Basic compiler but I can make things work very fast.

There is also FastAVR basic compiler. I have only played with the demo
version on that.

John

{Original Message removed}

2004\04\25@182333 by Kevin Olalde

flavicon
face
Herb,

What version of Windows are you trying to get this to go on?  What else
do you have installed?  It sounds like you had some "tweaking" to do to
get get things further, but still not working.

Just another vague data point, I've got Win2K, SP4, a few other packages
installed, but not any GCC tools or Cygwin, installed to D:\ instead of
C:\.  It "just worked" for me....

Thanks,
Kevin

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...