avr-gcc는 avr/io.h를 찾을 수 없습니다.

avr-gcc는 avr/io.h를 찾을 수 없습니다.

Xmega_bootloader를 컴파일하고 싶습니다.

하지만 make를 시작하면 다음과 같은 오류가 발생합니다.

[arkadi@arkadi-linux /home/arkadi/Xmega_Bootloader $]make
avr-gcc  -mmcu=atxmega64a3u -Wall -gdwarf-2 -std=gnu99 -DF_CPU=2000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -DBOOT_PAGE_SIZE=256 -DAPP_PAGE_SIZE=256 -DMCU=atxmega64a3u -DBAUD_RATE=115200 -DMY_UART=C,0 -DENTER_BOOTLOADER_PIN=B,2 -DLED_PIN=D,2 -DLED_ON=0 -DBOOTLOADER_PIN_EN=0 -MD -MP -MT sp_driver.o -x assembler-with-cpp -Wa,-gdwarf2 -c  sp_driver.s
sp_driver.s:69:20: fatal error: avr\io.h: No such file or directory
 #include <avr\io.h>
                    ^
compilation terminated.
makefile:374: recipe for target 'sp_driver.o' failed
make: *** [sp_driver.o] Error 1

나는 달리고 있다

Linux arkadi-linux 4.0.7-2-ARCH #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015 x86_64 GNU/Linux

avr-gcc와 avr-libc를 설치했습니다.

문제가 무엇입니까?

답변1

내 문제는 내 코드에서 "\"를 사용하고 있다는 것입니다.

Linux에서는 '/'여야 하므로 코드를 이식 가능하게 만들려면 해당 행이 다음과 같아야 합니다.

#include <avr/io.h>

관련 정보