Bug 12731 - avr-cgg can't find header files during compilation
: avr-cgg can't find header files during compilation
Status: CLOSED NOTABUG
: Sisyphus
(All bugs in Sisyphus/avr-gcc)
: unstable
: all Linux
: P2 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2007-09-09 21:36 by
Modified: 2009-07-21 15:06 (History)


Attachments
Пример Makefile (3.37 KB, application/octet-stream)
2009-07-21 13:21, Grigory Milev
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-09-09 21:36:50
gcc give error when I run "make" in my project's folde:
"avr/io.h: No such file or directory" and etc.
Headers file install in /usr/include/avr but gcc look at the
/usr/lib/avr/lib/gcc/avr/3.4.4/include.
Steps to Reproduce:
Every time during compilation the programms for AVR microcontrollers
------- Comment #1 From 2008-06-13 12:59:26 -------
*** This bug has been confirmed by popular vote. ***
------- Comment #2 From 2008-11-22 05:23:00 -------
Nobody is ever going to work on this issue.
------- Comment #3 From 2009-07-21 12:16:07 -------
В сизифе ошибка устойчиво воспроизводится.
------- Comment #4 From 2009-07-21 12:28:25 -------
А установить библиотеку avr-libc пробовали?
rpm -qf /usr/include/avr/avr/io.h
avr-libc-1.6.6-alt1

Сам использую постоянно и все отлично работает, вот пример сборки моего
проекта:
make
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=tv-switch.lst -MD -MP
-MF .dep/tv-switch.o.d -I. -I/usr/include/avr -I./include -I. -mmcu=atmega32
-I. -I/usr/include/avr -I./include -D__AVR_ATmega32__ tv-switch.c -o
tv-switch.o
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=lcd.lst -MD -MP -MF
.dep/lcd.o.d -I. -I/usr/include/avr -I./include -I. -mmcu=atmega32 -I.
-I/usr/include/avr -I./include -D__AVR_ATmega32__ lcd.c -o lcd.o
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=matrix.lst -MD -MP -MF
.dep/matrix.o.d -I. -I/usr/include/avr -I./include -I. -mmcu=atmega32 -I.
-I/usr/include/avr -I./include -D__AVR_ATmega32__ matrix.c -o matrix.o
avr-gcc -S -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=tv-switch.lst -MD -MP
-MF .dep/tv-switch.s.d -I. -I/usr/include/avr -I./include -I. -mmcu=atmega32
-I. -I/usr/include/avr -I./include -D__AVR_ATmega32__ tv-switch.c -o
tv-switch.s
avr-gcc  tv-switch.o lcd.o matrix.o  -Wl,-Map=tv-switch.map,--cref 
-mmcu=atmega32 -o tv-switch.elf
avr-objcopy -O ihex tv-switch.elf tv-switch.hex
avr-size tv-switch.elf
   text    data     bss     dec     hex filename
   2694     152      17    2863     b2f tv-switch.elf
------- Comment #5 From 2009-07-21 12:46:29 -------
rpm -qf /usr/include/avr/avr/io.h
avr-libc-1.6.4-alt1
# apt-get install avr-libc
Reading Package Lists... Done
Building Dependency Tree... Done
avr-libc is already the newest version.
0 upgraded, 0 newly installed, 0 removed and 0 not upgraded.

# apt-get install avr-libc --reinstall
Reading Package Lists... Done
Building Dependency Tree... Done
Reinstallation of avr-libc is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 removed and 0 not upgraded.


http://sisyphus.ru/ru/find.shtml?request=avr-libc


Кто из нас неправ?
------- Comment #6 From 2009-07-21 13:21:24 -------
Created an attachment (id=3679) [details]
Пример Makefile

В атаче пример Makefile, которым собирается мое приложение и все гарантированно
работает. Ищи, что у тебя не так :)
------- Comment #7 From 2009-07-21 13:54:37 -------
INCLUDES = -I. -I/usr/include/avr -I./include
Это понятно. Как это применить, к примеру, в случае
http://www.cadmaniac.org/projectMain.php?projectName=kontrollerlab&section=docs_firstSteps
и других подобных примеров "для новичков"?
------- Comment #8 From 2009-07-21 15:06:55 -------
Тут я не подскажу, читай доки по написанию Makefile или по той оболочке, в
которой пишешь и т.д.