Page 1 of 1

AVR doper firmware compile issue

Posted: Mon Apr 07, 2008 8:18 am
by Guest
Hi,

in order to change the AVR-Doper firmware version number I had to recompile the firmware. While doing so, I encountered a few problems:

When compiling with WinAVR20080402RC1 I get a few warnings:

../hardware.h:50:1: warning: "F_CPU" redefined
=> can be removed by commenting out the lines

../stk500protocol.c:137: warning: pointer targets in passing argument 1 of 'strcpy_P' differ in signedness
=> serious???

Anyway, when I flash the generated code ignoring the warnings, everything worked at first sight, but when I use AVR-Doper in HV-Mode, it looses USB connection during the flashing process. The originally provided hex works fine, though.

I also have installed an old version WinAVR20060421

here I get a different warning:
../timer.h:44: warning: comparison is always false due to limited range of data type
=> haven't tested the generated code on AVR doper.

Question:
-Which compiler version is the originally provided hex built with?
-Can the firmware successfully and functionally be built with new WinAVR versions? If so, how?

Thanks, Tom

Posted: Mon Apr 07, 2008 10:04 am
by christian
The bundled hex file was built with gcc 3.4.6.

The warnings you get suggest that you are not using the Makefile which ships with AVR-Doper. For the new WinAVR, the redefintion of F_CPU indicates that you pass it on the compiler command line (we have it in hardware.h in this project).

And the "comparison is always false" warning indicates that you use a "char is unsigned" option for the compiler. This is not in our original Makefile.

Posted: Mon Apr 07, 2008 6:08 pm
by Guest
Thanks for the hints! I use AVR Studio to compile the firmware and missed to check tese options.

Now the code compiles with zero warnings and runs properly!

:-)