Error in Programming

Whenever i am Compiling the sample code for the maze solver for the uc atmega328 there’s an error…I dont know why…But the sample code for the atmega168 is compiling and generating the hex file…

avr-gcc  -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d  -c  ../main.c
avr-gcc  -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT maze-solve.o -MF dep/maze-solve.o.d  -c  ../maze-solve.c
avr-gcc  -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT turn.o -MF dep/turn.o.d  -c  ../turn.c
avr-gcc -mmcu=atmega328p -Wl,-gc-sections -Wl,-Map=test.map bargraph.o follow-segment.o main.o maze-solve.o turn.o    -lpololu_atmega328p  -o test.elf
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib\libpololu_atmega328p.a: file not recognized: File format not recognized
make: *** [test.elf] Error 1
Build failed with 1 errors and 0 warnings...

Hello,

What version of Windows are you using? It sounds like your library might not be installed correctly. Can you type this command into a command prompt?

C:\Users\paul>ls -l c:/winavr-20100110/avr/lib/libpololu*.a
-rw-r--r--    1 paul     Administ   306186 Jan 29 15:39 c:/winavr-20100110/avr/lib/libpololu_atmega1284p.a
-rw-r--r--    1 paul     Administ   279490 Jan 29 15:39 c:/winavr-20100110/avr/lib/libpololu_atmega168.a
-rw-r--r--    1 paul     Administ   306106 Jan 29 15:39 c:/winavr-20100110/avr/lib/libpololu_atmega324p.a
-rw-r--r--    1 paul     Administ   279510 Jan 29 15:39 c:/winavr-20100110/avr/lib/libpololu_atmega328p.a
-rw-r--r--    1 paul     Administ   277234 Jan 29 15:39 c:/winavr-20100110/avr/lib/libpololu_atmega48.a

If you do not see the same sizes that I have, those files could be corrupted somehow.

[edit: I had posted the wrong file sizes initially - they are correct now]

-Paul

Sir…I am using Windows XP professional…I guess there wont be any problem with my OS… But What file sizes are you referring to…I typed the code into a command prompt that you gave but it could not recognize the “-rw-r–r--”…Sir in the command prompt do i need to do to the section where my Winavr 2010 is installed or where your library is kept.

Please just type the “ls -l c:/winavr-20100110/avr/lib/libpololu*.a” part, and post the output you get here.

-Paul

Sir after typing the command that you gave i got the following output in the command prompt

ls -l c:/winavr-20100110/avr/lib/libpololu*.a
-rw-r--r--    1 soumava     Administ   306186 Mar 9 7:19 c:/winavr-20100110/avr/lib/libpololu_atmega1284p.a
-rw-r--r--    1 soumava     Administ   279490 Mar 9 7:19 c:/winavr-20100110/avr/lib/libpololu_atmega168.a
-rw-r--r--    1 soumava     Administ   306106 Mar 9 7:19 c:/winavr-20100110/avr/lib/libpololu_atmega324p.a
-rw-r--r--    1 soumava     Administ   279588 Mar 11 22:19 c:/winavr-20100110/avr/lib/libpololu_atmega328p.a
-rw-r--r--    1 soumava     Administ   277234 Mar 9 7:19 c:/winavr-20100110/avr/lib/libpololu_atmega48.a

Sir,I if you see i installed the library on the same day but only for uc 328 the time is different…All the other programs are compiling…What do i do sir please tell me

Hello,

Sorry, I initially posted the wrong file sizes because I had an unreleased version of the library installed here. I have updated my earlier post with the correct one. Indeed the 328p library seems to have been modified since the installation. Can you reinstall or copy that library file over again, check the file size, then try again?

-Paul