Can't upload code to zero - say SoftwareSerial.h not there

what could be the reason

fatal error: SoftwareSerial.h: No such file or directory

 #include <SoftwareSerial.h>


compilation terminated.

exit status 1
Error compiling for board Arduino Zero (Programming Port).

I’m using Arduino 1.8.2
Board: Arduino Zero
Port : COM20 (Native USB Port)

this is the code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8);
#define DEBUG true
int pon = 9;
void setup()
  pinMode(pon, OUTPUT);
  digitalWrite(pon, HIGH);
  digitalWrite(pon, LOW);
  Serial.println("After 3s, test begin!!");

void loop()
  sendData("AT+CCID", 3000, DEBUG);
  sendData("AT+CREG?", 3000, DEBUG);
  sendData("AT+CGATT=1", 1000, DEBUG);
  sendData("AT+CGACT=1,1", 1000, DEBUG);
  sendData("AT+CSTT=CMNET", 3000, DEBUG);
  sendData("AT+CIICR", 1000, DEBUG);
  sendData("AT+CIFSR", 1000, DEBUG);
  sendData("AT+CDNSGIP=\"\"", 1000, DEBUG);
  sendData("AT+CDNSGIP=\"a b c d e f\"", 1000, DEBUG);
  sendData("AT+CIPSTART=\"TCP\",\"WWW.SIM.COM\",80", 5000, DEBUG);
  sendData("AT+CIPSEND=6", 1000, DEBUG);
  sendData("123456", 1000, DEBUG);
  sendData("AT+CIPCLOSE", 1000, DEBUG);

String sendData(String command, const int timeout, boolean debug)
  String response = "";
  long int time = millis();
  while ( (time + timeout) > millis())
    while (mySerial.available())
      char c =;
      response += c;
  if (debug)
  return response;

Do you need need something else ? missing information ?

Thanks ,

I'm not too sure you can use softwareSerial.h with samd boards (I could be wrong though). If you are looking to create a UART adafruit has a nice guide on it (these are hardware UARTS):

Basically you can have up to 6 UARTS with the samd21. Since it looks like you only need 2, you might consider just using the UARTs that already exist for you (you get three out of the box with this board variant). My recommendation is to use Serial1 which is mapped to D0 = RX, D1 = TX. Since this is already included in your board variant, all you have to do is call Serial1.begin(9600) in your setup{}.