I've been trying to compile a simple program for the avr attiny13a microcontroller, but have gotten stuck with what appears to be a library path issue.
When I try to compile the object file to an elf, I get the following error:
$ avr-gcc -g -DF_CPU=9600000 -Wall -L/usr/avr/lib -Os -mmcu=attiny13a -o tmp.elf tmp.o /usr/bin/avr-ld: cannot find crttn13a.o: No such file or directory collect2: error: ld returned 1 exit status
The library search path appears to be correct:
$ locate crttn13a.o /usr/avr/lib/avr25/crttn13a.o $ avr-gcc -print-search-dirs install: /usr/lib/gcc/avr/4.7.1/ programs: =/usr/lib/gcc/avr/4.7.1/:/usr/lib/gcc/avr/4.7.1/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.7.1/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.7.1/../../../../avr/bin/avr/4.7.1/:/usr/lib/gcc/avr/4.7.1/../../../../avr/bin/ libraries: =/usr/lib/gcc/avr/4.7.1/:/usr/lib/gcc/avr/4.7.1/../../../../avr/lib/avr/4.7.1/:/usr/lib/gcc/avr/4.7.1/../../../../avr/lib/
Can any of you see what I am missing here?
Last edited by bludra84 (2012-07-21 04:22:38)
Your gcc command says -L/usr/avr/lib but the library is in /usr/avr/lib/avr25
I am pretty sure the drobole has the answer.
The first thing that came to my mind is to be careful with the locate command. It is a great tool, but all it tells you is that /usr/avr/lib/avr25/crttn13a.o existed the last time you ran updatedb. No guarantees it is there now
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
How to Ask Questions the Smart Way