Page 1 of 1

Recompiling the AVR code

Posted: Fri Apr 22, 2011 4:23 am
by Balthasar
Hi Jeff,

I am playing with WinAVR (20100110) and trying to recompile your AVR LCD handler (main.c, lcd.c). You know, I want to make sure I can repro the whole stuff before I start with the project. I am going to reburn my AVR programmer's AVR as well.

So I left everything on default in WinAVR, opened lcd.c and called a "make all" command from the menu. Apart from the fact I got 13 warnings on signed/unsigned char array type mismatches (IMHO not a real problem), the resulting .hex file differs on 300+ positions (I checked it with frhed).

What do you think the reason for the differences could be? Since I am using your makefile, I can only think of compiler options or maybe you were using an older version of WinAVR. Any idea?

Thanks,
Balthasar

Re: Recompiling the AVR code

Posted: Fri Apr 22, 2011 7:47 pm
by mightyohm
I didn't use WinAVR at all, but instead used CrossPack on the Mac, and probably used gcc3 as well (although I can't remember now).

I wouldn't use the exact size/contents of the hex file as a good gauge of whether the code is compiling correctly.

Re: Recompiling the AVR code

Posted: Sat Apr 23, 2011 12:57 am
by Balthasar
Hi, that explains everything. A different compiler has a different code generator

Thanks, Balthasar