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>

おすすめ記事