3

I downloaded the Adafruit_GPS library from Adafruit and I'm trying to compile the example code (due_parsing) but I can't seem to get past this silly error:

In file included from due_parsing.ino:15:

/Users/haddad/Documents/Arduino/libraries/Adafruit_GPS/Adafruit_GPS.h:24: fatal error: SoftwareSerial.h: No such file or directory
compilation terminated.

This is the location in the example Arduino Sketch where SoftwareSerial.h is mentioned:

#ifdef __AVR__
  #include <SoftwareSerial.h>
#endif

I noticed it's around an ifdef guard, so shouldn't it not even matter that I don't have this library?

I went into the .h and .cpp files and commented out the where it called SoftwareSerial.h, but I'm still getting that above error.

Does anybody know how to fix this? I am using Arduino IDE v1.5.5


Update:

I didn't put the library in the library direct on my mac but I'm now getting tons of errors, all the errors are with SoftwareSerial.cpp. Is anybody else having similar issues when you go to compile?

  • You mention you are using a DUE, do you use Arduino IDE 1.5 with it? – jfpoilpret Apr 10 '14 at 20:23
  • yessir, Arduino IDE v1.5.5 – mosawi Apr 10 '14 at 20:49
  • What are the errors that you are getting after installing the library? – Anonymous Penguin Apr 10 '14 at 21:22
  • the errors were all in regards to SoftwareSerial.cpp, but after commenting out those ifdef guards, it worked...for now anyway – mosawi Apr 10 '14 at 21:58
3

According to your comment:

after commenting out those ifdef guards, it worked

I would say that is a bug in the Adafruit_GPS library.

As a matter of fact, the DUE is not using the AVR architecture (it uses ARM), that explains why #ifdef __AVR__ in Adafruit_GPS.h never passes; but then something else should be done specifically for the DUE (missing #else or #elif).

After checking on github, there is an issue open for that; unfortunately, as of April 2014, it has not moved for 10 months.

Your best guess would be to go there and try to "reactivate" this issue.

  • Yes, you're right. That library and software for the Due in general seems to be in continual development, not as mature as the stuff out for the AVR boards out there – mosawi Apr 11 '14 at 23:20
0

So I went into the interface file (.h) and removed all references to AVR and then went into (.cpp) and removed all references to AVR there as well. It now seems to be working, although sometimes it says "Not supported Architecture ARM" during compilation...very weird

0

this is a "bug" in the arduino IDE pre-compilation process. If you turn on the compiling verbositi in thge precerences menu, you will see that arduino has copied all file (with a rater "stupid" code that just look for include) into a temp folder (wiring lib are not copied, but the below still aplly). Until here, ugly but still fine.

Then, it will -force- compilation of every "included" file, one by one, the facto bypassing the #ifdef.. and this is why you get that problem.

Solution is to heavy change the ide so it will force compilation only in the main, and let the compiler include and compile needed libraries.

I still have no idea why every file is forced, but a change like this is really heavy and break-old-code prone..

Newest IDE to bypass this problem (and also some other problem, like depeency) use a "config" file that will tell the IDE if use the AVR or ARM or x86 library, probabily this file is missing and the ide see te lib as only AVR by default.

Double check if it is really usable on DUE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.