Hello need help with an error

Hello friends
i am trying to build a gps tracker and encountered an an error which i dont know how to solve

using adafruit. i.o cloud
Error : Compilation error: 'RTC_DATA_ATTR' does not name a type

Error : "Compilation error: 'RTC_DATA_ATTR' does not name a type"https://www.youtube.com/watch?v=7gG57DVETAo[youtube](https://www.youtube.com/watch?v=7gG57DVETAo)
project source youtube

THANK YOU

code:

#define TINY_GSM_MODEM_SIM7000

// Set serial for debug console (to the Serial Monitor, default speed 115200)
#define SerialMon Serial

// Set serial for AT commands (to the module)
// Use Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial1

// Define the serial console for debug prints, if needed
#define TINY_GSM_DEBUG SerialMon

// Define how you're planning to connect to the internet
// These defines are only for this example; they are not needed in other code.
#define TINY_GSM_USE_GPRS true
#define TINY_GSM_USE_WIFI false


// Your GPRS credentials, if any
const char apn[]      = "APN_NAME";
const char gprsUser[] = "io.adafruit.com";
const char gprsPass[] = "";


// MQTT details
const char *broker = "SERVER_NAME";

const char *GPSTopic = "Arrow118/feeds/gpsloc/csv";
const char *BatTopic = "BATTERY_TOPIC";

#include <TinyGsmClient.h>
#include <PubSubClient.h>

// Just in case someone defined the wrong thing..
#if TINY_GSM_USE_GPRS && not defined TINY_GSM_MODEM_HAS_GPRS
#undef TINY_GSM_USE_GPRS
#undef TINY_GSM_USE_WIFI
#define TINY_GSM_USE_GPRS false
#define TINY_GSM_USE_WIFI true
#endif
#if TINY_GSM_USE_WIFI && not defined TINY_GSM_MODEM_HAS_WIFI
#undef TINY_GSM_USE_GPRS
#undef TINY_GSM_USE_WIFI
#define TINY_GSM_USE_GPRS true
#define TINY_GSM_USE_WIFI false
#endif

#ifdef DUMP_AT_COMMANDS
#include <StreamDebugger.h>
StreamDebugger debugger(SerialAT, SerialMon);
TinyGsm        modem(debugger);
#else
TinyGsm        modem(SerialAT);
#endif
TinyGsmClient client(modem);
PubSubClient  mqtt(client);


#define uS_TO_S_FACTOR 1000000ULL  // Conversion factor for micro seconds to seconds
#define TIME_TO_SLEEP  120          // Time ESP32 will go to sleep (in seconds)

#define UART_BAUD   9600
#define PIN_DTR     25
#define PIN_TX      27
#define PIN_RX      26
#define PWR_PIN     4
#define BAT_ADC     35

#define LED_PIN     12

float speed_kph = 0;
float heading = 0;
float speed_mph = 0;
float altitude = 0;
float lat = 0;
float lon = 0;
char Lat[20];
char Lon[20];
char sendbuffer[120];
const char* Bat_value;
RTC_DATA_ATTR int bootCount = 0;
float readBattery(uint8_t pin)
{
  int vref = 1100;
  uint16_t volt = analogRead(pin);
  float battery_voltage = ((float)volt / 4095.0) * 2.0 * 3.3 * (vref);
  return battery_voltage;
}

int ledStatus = LOW;

uint32_t lastReconnectAttempt = 0;

void transCoordinates()
{
  while (lat <= 0 || lon <= 0)
  {
    modem.sendAT("+SGPIO=0,4,1,1");
    if (modem.waitResponse(10000L) != 1) {
      Serial.println(" SGPIO=0,4,1,1 false ");
    }
    modem.enableGPS();
    Serial.println("Requesting current GPS/GNSS/GLONASS location");
    if (modem.getGPS(&lat, &lon))
    {
      Serial.println("Latitude: " + String(lat, 8) + "\tLongitude: " + String(lon, 8));
    }
  }
  char *p = sendbuffer;
  // add speed value
  dtostrf(speed_mph, 2, 6, p);
  p += strlen(p);
  p[0] = ','; p++;

  // concat latitude
  dtostrf(lat, 2, 6, p);
  p += strlen(p);
  p[0] = ','; p++;

  // concat longitude
  dtostrf(lon, 3, 6, p);
  p += strlen(p);
  p[0] = ','; p++;

  // concat altitude
  dtostrf(altitude, 2, 6, p);
  p += strlen(p);

  // null terminate
  p[0] = 0;

  Serial.print("Sending: "); Serial.println(sendbuffer); // (Speed,Latitude,Longitude,Altitude)
  mqtt.publish(GPSTopic, sendbuffer);

  // Reading and Sending Battery Voltage
  float mv = readBattery(BAT_ADC);
  Serial.println(mv);
//  int Bat_Percentage = map (mv, 3300, 4200, 0, 100);
//  if (Bat_Percentage < 0) Bat_Percentage = 0;
//  if (Bat_Percentage > 100) Bat_Percentage = 100;
  String TEMP = (String)mv;
  Bat_value = (char*) TEMP.c_str();
  Serial.println(Bat_value);
  mqtt.publish(BatTopic, Bat_value);
}

void mqttCallback(char *topic, byte *payload, unsigned int len)
{

  SerialMon.print("Message arrived [");
  SerialMon.print(topic);
  SerialMon.print("]: ");
  SerialMon.write(payload, len);
  SerialMon.println();
}

boolean mqttConnect()
{
  SerialMon.print("Connecting to ");
  SerialMon.print(broker);

  // Connect to MQTT Broker
  //boolean status = mqtt.connect("GsmClientTest");

  // Or, if you want to authenticate MQTT:
  boolean status = mqtt.connect("GsmClientName", "Arrow118", "aio_xKxc53nmmI8iKAz9IKlgHlrClhzv");

  if (status == false) {
    SerialMon.println(" fail");
    return false;
  }
  SerialMon.println(" success");
  //mqtt.publish(topicInit, "GsmClientTest started");
  return mqtt.connected();
}


void setup()
{
  // Set console baud rate
  Serial.begin(115200);
  delay(10);

  // Set LED OFF
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH);

  pinMode(PWR_PIN, OUTPUT);
  digitalWrite(PWR_PIN, HIGH);
  delay(300);
  digitalWrite(PWR_PIN, LOW);

  Serial.println("\nWait...");

  delay(1000);

  SerialAT.begin(UART_BAUD, SERIAL_8N1, PIN_RX, PIN_TX);
  if (bootCount  == 0)
  {
    // Restart takes quite some time
    // To skip it, call init() instead of restart()
    Serial.println("Initializing modem...");
    if (!modem.restart()) {
      Serial.println("Failed to restart modem, attempting to continue without restarting");
    }
    bootCount++;
  }
  String name = modem.getModemName();
  DBG("Modem Name:", name);

  String modemInfo = modem.getModemInfo();
  DBG("Modem Info:", modemInfo);


#if TINY_GSM_USE_GPRS && defined TINY_GSM_MODEM_XBEE
  // The XBee must run the gprsConnect function BEFORE waiting for network!
  modem.gprsConnect(apn, gprsUser, gprsPass);
#endif

  SerialMon.print("Waiting for network...");
  if (!modem.waitForNetwork()) {
    SerialMon.println(" fail");
    delay(10000);
    return;
  }
  SerialMon.println(" success");

  if (modem.isNetworkConnected()) {
    SerialMon.println("Network connected");
  }

#if TINY_GSM_USE_GPRS
  // GPRS connection parameters are usually set after network registration
  SerialMon.print(F("Connecting to "));
  SerialMon.print(apn);
  if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
    SerialMon.println(" fail");
    delay(10000);
    return;
  }
  SerialMon.println(" success");

  if (modem.isGprsConnected()) {
    SerialMon.println("GPRS connected");
  }
#endif

  // MQTT Broker setup
  mqtt.setServer(broker, 1883);
  mqtt.setCallback(mqttCallback);

}

void loop()
{
  // Make sure we're still registered on the network
  if (!modem.isNetworkConnected())
  {
    SerialMon.println("Network disconnected");
    if (!modem.waitForNetwork(180000L, true))
    {
      SerialMon.println(" fail");
      delay(10000);
      return;
    }
    if (modem.isNetworkConnected())
    {
      SerialMon.println("Network re-connected");
    }

#if TINY_GSM_USE_GPRS
    // and make sure GPRS/EPS is still connected
    if (!modem.isGprsConnected())
    {
      SerialMon.println("GPRS disconnected!");
      SerialMon.print(F("Connecting to "));
      SerialMon.print(apn);
      if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
        SerialMon.println(" fail");
        delay(10000);
        return;
      }
      if (modem.isGprsConnected()) {
        SerialMon.println("GPRS reconnected");
      }
    }
#endif
  }

  if (!mqtt.connected())
  {
    SerialMon.println("=== MQTT NOT CONNECTED ===");
    // Reconnect every 10 seconds
    uint32_t t = millis();
    if (t - lastReconnectAttempt > 10000L)
    {
      lastReconnectAttempt = t;
      if (mqttConnect()) {
        lastReconnectAttempt = 0;
      }
    }
    delay(100);
    return;
  }

  mqtt.loop();
  transCoordinates();
  esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
  esp_deep_sleep_start();

Thank you

That is not the only error. Post the complete error.

Probably missing a library. Post all code in code tags and compile with verbose and post the log with code tags

Looks like the common ESP32-core 3.X-problem.
espressif made BREAKING changes to the core-files in ESP32-core 3.X
Which often lead to compiler-errors.

I compiled your code successfully with ESP32-core 2.0.17
You can de-install ESP32-core Version 3.X and install ESP32-core version 2.0.17

Does not appear to be the full story because RTC_DATA_ATTR is indeed a defined macro, at least in Core 3.0.3 (and I suspect in all 3.x cores). See 'esp_attr.h':

#define RTC_DATA_ATTR _SECTION_ATTR_IMPL(".rtc.data", __COUNTER__)

So, there's more going on.

hello
thank you for your assistance. entire error attached

FQBN: esp8266:esp8266:nodemcuv2
Using board 'nodemcuv2' from platform in folder: /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2
Using core 'esp8266' from platform in folder: /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2

/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 -I /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/mkbuildoptglobals.py "/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources" 10607 /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt /Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino.globals.h /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/CommonHFile.h
default_encoding:       UTF-8
Assume aggressive 'core.a' caching enabled.
Note: optional global include file '/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino.globals.h' does not exist.
  Read more at https://arduino-esp8266.readthedocs.io/en/latest/faq/a06-global-build-options.html
Detecting libraries used...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
Alternatives for TinyGsmClient.h: [TinyGSM@0.12.0]
ResolveLibrary(TinyGsmClient.h)
  -> candidates: [TinyGSM@0.12.0]
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
Alternatives for PubSubClient.h: [PubSubClient@2.8]
ResolveLibrary(PubSubClient.h)
  -> candidates: [PubSubClient@2.8]
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp -o /dev/null
Generating function prototypes...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/3201337436/sketch_merged.cpp
/Users/johnsmith/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/3201337436/sketch_merged.cpp
Compiling sketch...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 -I /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/signing.py --mode header --publickey /Users/johnsmith/Documents/Arduino/gps1111/public.key --out /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/Updater_Signing.h
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU_ESP12E\"" "-DARDUINO_BOARD_ID=\"nodemcuv2\"" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp.o
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:81:1: error: 'RTC_DATA_ATTR' does not name a type
   81 | RTC_DATA_ATTR int bootCount = 0;
      | ^~~~~~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino: In function 'void setup()':
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:65:21: error: invalid conversion from 'int' to 'SerialMode' [-fpermissive]
   65 | #define PIN_RX      26
      |                     ^~
      |                     |
      |                     int
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:197:41: note: in expansion of macro 'PIN_RX'
  197 |   SerialAT.begin(UART_BAUD, SERIAL_8N1, PIN_RX, PIN_TX);
      |                                         ^~~~~~
In file included from /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/Arduino.h:303,
                 from /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp:1:
/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/HardwareSerial.h:87:68: note:   initializing argument 3 of 'void HardwareSerial::begin(long unsigned int, SerialConfig, SerialMode, uint8_t)'
   87 |     void begin(unsigned long baud, SerialConfig config, SerialMode mode, uint8_t tx_pin)
      |                                                         ~~~~~~~~~~~^~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:198:7: error: 'bootCount' was not declared in this scope
  198 |   if (bootCount  == 0)
      |       ^~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino: In function 'void loop()':
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:308:3: error: 'esp_sleep_enable_timer_wakeup' was not declared in this scope
  308 |   esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:309:3: error: 'esp_deep_sleep_start' was not declared in this scope; did you mean 'system_deep_sleep_instant'?
  309 |   esp_deep_sleep_start();
      |   ^~~~~~~~~~~~~~~~~~~~
      |   system_deep_sleep_instant

Using library TinyGSM at version 0.12.0 in folder: /Users/johnsmith/Documents/Arduino/libraries/TinyGSM 
Using library PubSubClient at version 2.8 in folder: /Users/johnsmith/Documents/Arduino/libraries/PubSubClient 
exit status 1

Compilation error: 'RTC_DATA_ATTR' does not name a type

here

Arduino error 
FQBN: esp8266:esp8266:nodemcuv2
Using board 'nodemcuv2' from platform in folder: /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2
Using core 'esp8266' from platform in folder: /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2

/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 -I /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/mkbuildoptglobals.py "/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources" 10607 /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt /Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino.globals.h /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/CommonHFile.h
default_encoding:       UTF-8
Assume aggressive 'core.a' caching enabled.
Note: optional global include file '/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino.globals.h' does not exist.
  Read more at https://arduino-esp8266.readthedocs.io/en/latest/faq/a06-global-build-options.html
Detecting libraries used...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
Alternatives for TinyGsmClient.h: [TinyGSM@0.12.0]
ResolveLibrary(TinyGsmClient.h)
  -> candidates: [TinyGSM@0.12.0]
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
Alternatives for PubSubClient.h: [PubSubClient@2.8]
ResolveLibrary(PubSubClient.h)
  -> candidates: [PubSubClient@2.8]
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /dev/null
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp -o /dev/null
Generating function prototypes...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU_ESP12E" -DARDUINO_BOARD_ID="nodemcuv2" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/3201337436/sketch_merged.cpp
/Users/johnsmith/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/3201337436/sketch_merged.cpp
Compiling sketch...
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 -I /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/signing.py --mode header --publickey /Users/johnsmith/Documents/Arduino/gps1111/public.key --out /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/Updater_Signing.h
/Users/johnsmith/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE -DESP8266 @/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core/build.opt -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/lwip2/include -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sdk/libc/xtensa-lx106-elf/include -I/private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/core -c @/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/warnings/none-cppflags -Os -g -free -fipa-pta -Werror=return-type -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_NODEMCU_ESP12E -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU_ESP12E\"" "-DARDUINO_BOARD_ID=\"nodemcuv2\"" -DLED_BUILTIN=2 -DFLASHMODE_DIO -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266 -I/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/variants/nodemcu -I/Users/johnsmith/Documents/Arduino/libraries/TinyGSM/src -I/Users/johnsmith/Documents/Arduino/libraries/PubSubClient/src /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp -o /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp.o
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:81:1: error: 'RTC_DATA_ATTR' does not name a type
   81 | RTC_DATA_ATTR int bootCount = 0;
      | ^~~~~~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino: In function 'void setup()':
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:65:21: error: invalid conversion from 'int' to 'SerialMode' [-fpermissive]
   65 | #define PIN_RX      26
      |                     ^~
      |                     |
      |                     int
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:197:41: note: in expansion of macro 'PIN_RX'
  197 |   SerialAT.begin(UART_BAUD, SERIAL_8N1, PIN_RX, PIN_TX);
      |                                         ^~~~~~
In file included from /Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/Arduino.h:303,
                 from /private/var/folders/9s/_hy99wt525d05t0y9fgsnwlc0000gn/T/arduino/sketches/DA9873B05A5AF6D17ECACCB0926B33EE/sketch/gps1111.ino.cpp:1:
/Users/johnsmith/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/HardwareSerial.h:87:68: note:   initializing argument 3 of 'void HardwareSerial::begin(long unsigned int, SerialConfig, SerialMode, uint8_t)'
   87 |     void begin(unsigned long baud, SerialConfig config, SerialMode mode, uint8_t tx_pin)
      |                                                         ~~~~~~~~~~~^~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:198:7: error: 'bootCount' was not declared in this scope
  198 |   if (bootCount  == 0)
      |       ^~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino: In function 'void loop()':
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:308:3: error: 'esp_sleep_enable_timer_wakeup' was not declared in this scope
  308 |   esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/johnsmith/Documents/Arduino/gps1111/gps1111.ino:309:3: error: 'esp_deep_sleep_start' was not declared in this scope; did you mean 'system_deep_sleep_instant'?
  309 |   esp_deep_sleep_start();
      |   ^~~~~~~~~~~~~~~~~~~~
      |   system_deep_sleep_instant

Using library TinyGSM at version 0.12.0 in folder: /Users/johnsmith/Documents/Arduino/libraries/TinyGSM 
Using library PubSubClient at version 2.8 in folder: /Users/johnsmith/Documents/Arduino/libraries/PubSubClient 
exit status 1

Compilation error: 'RTC_DATA_ATTR' does not name a type

You're compiling for an ESP8266. To the best of my knowledge, that processor doesn't even have RTC Memory.

im lacking knowledge and since i dont use any boards at all i dont know why it mentions nodemcu tried to compile prior uploading

went thru regular process file ->preference ->
https://dl.espressif.com/dl/package_esp32_index.json
\installed via board manager esp32 version 2.017 and libraries

What board do you have selected for your build target?

Thank you!!! Solved!!! had no idea it affects it you are a hero of today beer on me cheers

What was the solution???

wrong board was selected from boards ( nodemcu) I didn’t know proper board has to be selected prior compiling

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.