I'm using an ATtiny2313 and compile it with WinAvr. When I looked to the results of the compiler, I found out the MOVW instruction wasn't used. With some search I found the patch: patch #4881.
So I decided to compile the compiler myself. I found the instructions from kai
I followed the instructions. I wanted to build the compiler first without the patch. Building binutils went fine, but got a problem with building GCC. When I type 'make', after a while there comes an error. It says:
"./tm.h:5:29: error: config/avr/avr.h: No such file or directory" After the a couple of other header files can't be found too.
I tried to search for this (type of) error, but couldn't find an helping answer.
The tutorial said to download only gcc-core-[Version].tar.bz2 and gcc-g++-[Version].tar.bz2. So I thought, I might be missing something. I tried downloading gcc-4.1.0.tar.bz2. But the error is still the same. So I went looking for the files in the directories.
tm.h is located inside "msys\1.0\home\HP_Eigenaar\gcc-4.1.0\host-i686-pc-mingw32\gcc\". The first include is "options.h" The compiler doesn't give an error on that file, as far as I can see. options.h is in the same directory as tm.h. After options.h is included, "config/avr/avr.h" is included. There is no config directory inside the directory where options.h and tm.h are. I located the file and it is in this directory: "msys\1.0\home\HP_Eigenaar\gcc-4.1.0\gcc\config\avr"
Now I'm out of ideas. I don't know how I can solve this problem. I might did something wrong, but can't figure out what. To be sure I didn't misspelled something, I tried every step twice, with deinstalling everything before I did it the second time.
Here follows some information, that might be usefull, don't have any idea what could help, so I'll give much info, that also might be useless ;)
OS is WinXP with SP2
Filesystem where MinGW and msys are installed is NTFS.
msys version 1.0.10
MinGW version 5.0.2
binutils version 2.16
gcc version 4.10
If someone has any idea what the problem can be, I would appreciate it much. If someone has another tutorial or guide how to compile gcc for AVR on windows, it would be nice too. I could try that :)
Thijs