Go Down

Topic: More 1.5.3 fun... (Read 1 time) previous topic - next topic


I have renamed all the library.properties files to get my libraries added but now I have a different issue...

Arduino: 1.5.3 (Windows 7), Board: "Arduino Due (Programming Port)"

In file included from C:\Program Files (x86)\Arduino\libraries\SD/utility/Sd2Card.h:26,
                 from C:\Program Files (x86)\Arduino\libraries\SD/utility/SdFat.h:27,
                 from C:\Program Files (x86)\Arduino\libraries\SD/SD.h:20,
                 from Revision_2_3BETA.ino:2:
C:\Program Files (x86)\Arduino\libraries\SD/utility/Sd2PinMap.h:23: fatal error: avr/io.h: No such file or directory
compilation terminated.

Line 23 in Sd2PinMap.h says: "#include <avr/io.h>"

The file is located in: C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include\avr

Why can't it find this file? Do I need to copy it into a different directory?


This sort of question seems to come up a lot.

You cannot use AVR system headers in your ARM Cortex code. The Due is a totally different processor architecture. It has nothing to do with AVR at all. If you want to use libraries that make direct reference to AVR libraries and/or headers then you will have to rewrite the library to work around this.


Are you sure you are in the 1.5.3 libraries?

My copy of Sd2PinMap.h has this include on line 39 and it is only used when compiling for an AVR based arduino.

Code: [Select]
#elif defined(__AVR__) // Other AVR based Boards follows

// Warning this file was generated by a program.
#ifndef Sd2PinMap_h
#define Sd2PinMap_h
#include <avr/io.h>


I know the Due is a sam, I had it selected but got that message still; which confused me. I did manage to get 1.5.3 working and 1.5.4 working but my sketch didn't run on either of them or even the nightly build. Went back to 1.5.2 and it's running flawlessly. I think ill just wait out a few versions...



can you send me your sketch for testing?

Go Up