Adafruit_GPS and Softwareserial no such file

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vdw
 
Posts: 2
Joined: Thu Mar 09, 2023 12:01 pm

Adafruit_GPS and Softwareserial no such file

Post by vdw »

I am stuck and would very much appreciate some help. Using the GPS hardware serial parsing example. It works fine in Arduino IDE but in Platformio, which I prefer to use, I get the following error.

In file included from src\main.cpp:2:0: //which is the #include <Adafruit_GPS>
.pio\libdeps\megaatmega2560\Adafruit GPS Library\src/Adafruit_GPS.h:60:10: fatal error: SoftwareSerial.h: No such file or directory

The whole spiel is,

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html
PLATFORM: Atmel AVR (4.1.0) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr @ 5.1.0
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://BANNED/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 7 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit GPS Library @ 1.7.2
| |-- SPI @ 1.0
| |-- Wire @ 1.0
|-- SD @ 1.2.4
| |-- SPI @ 1.0
Building in release mode
Compiling .pio\build\megaatmega2560\src\main.cpp.o
Compiling .pio\build\megaatmega2560\lib056\Adafruit GPS Library\Adafruit_GPS.cpp.o
Compiling .pio\build\megaatmega2560\lib056\Adafruit GPS Library\NMEA_build.cpp.o
Compiling .pio\build\megaatmega2560\lib056\Adafruit GPS Library\NMEA_data.cpp.o
In file included from src\main.cpp:2:0:
.pio\libdeps\megaatmega2560\Adafruit GPS Library\src/Adafruit_GPS.h:60:10: fatal error: SoftwareSerial.h: No such file or directory

Any ideas Please.

User avatar
sj_remington
 
Posts: 998
Joined: Mon Jul 27, 2020 4:51 pm

Re: Adafruit_GPS and Softwareserial no such file

Post by sj_remington »

Download the SoftwareSerial library and put it where PlatformIO expects to find it.

User avatar
vdw
 
Posts: 2
Joined: Thu Mar 09, 2023 12:01 pm

Re: Adafruit_GPS and Softwareserial no such file

Post by vdw »

Unfortunately that does not seem to solve the issue.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”