RTC8563 compiling error for Raspberry Pi 500

I have a sketch that fails validation with a raft of errors relating to RTC8563_Class.h. An example is:

Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:20:10: error: 'int8_t' in namespace 'std' does not name a type
   20 |     std::int8_t hours;
      |          ^~~~~~

(I will provide the entire list of errors at the end.)

I am running IDE 1.8.19 which I think is the latest version that the Pi can support. The same sketch does not throw these errors when compiled on 1.8.18 running on a Windows machine.

I'm presuming it's something to do with ARM vs Intel? has anyone come across anything similar? I've been to the repo for the M5timer library and tried various versions of the RTC8563_Class.h file but I'll be frank, I'm pretty out of my depth.

It seems a very fundamental error not to be widely reported (ie that the M5 Timer library isn't compatible with Arduino IDE on Pi) so that makes me think it's something to do with my setup.

Full error list:

Arduino: 1.8.19 (Linux), Board: "M5TimerCAM, Enabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 1500000, Core 1, Core 1, None, Disabled"

In file included from /home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/Power_Class.h:11,
                 from /home/dr-robert-69/Arduino/libraries/Timer-CAM/src/M5TimerCAM.h:4,
                 from /home/dr-robert-69/Downloads/M5TimerCAM_webserver_connection_test_Jan_24_tinker/M5TimerCAM_webserver_connection_test_Jan_24_tinker.ino:1:
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:20:10: error: 'int8_t' in namespace 'std' does not name a type
   20 |     std::int8_t hours;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:21:10: error: 'int8_t' in namespace 'std' does not name a type
   21 |     std::int8_t minutes;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:22:10: error: 'int8_t' in namespace 'std' does not name a type
   22 |     std::int8_t seconds;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:24:27: error: expected ')' before 'hours_'
   24 |     rtc_time_t(std::int8_t hours_ = -1, std::int8_t minutes_ = -1,
      |               ~           ^~~~~~~
      |                           )
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:26:24: error: expected unqualified-id before ',' token
   26 |         : hours{hours_}, minutes{minutes_}, seconds{seconds_} {
      |                        ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:26:43: error: expected unqualified-id before ',' token
   26 |         : hours{hours_}, minutes{minutes_}, seconds{seconds_} {
      |                                           ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:26:63: error: expected unqualified-id before '{' token
   26 |         : hours{hours_}, minutes{minutes_}, seconds{seconds_} {
      |                                                               ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: In constructor 'rtc_time_t::rtc_time_t(const tm&)':
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:30:11: error: class 'rtc_time_t' does not have any field named 'hours'
   30 |         : hours{(int8_t)t.tm_hour},
      |           ^~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:31:11: error: class 'rtc_time_t' does not have any field named 'minutes'
   31 |           minutes{(int8_t)t.tm_min},
      |           ^~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:32:11: error: class 'rtc_time_t' does not have any field named 'seconds'
   32 |           seconds{(int8_t)t.tm_sec} {
      |           ^~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: At global scope:
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:38:10: error: 'int16_t' in namespace 'std' does not name a type
   38 |     std::int16_t year;
      |          ^~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:41:10: error: 'int8_t' in namespace 'std' does not name a type
   41 |     std::int8_t month;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:44:10: error: 'int8_t' in namespace 'std' does not name a type
   44 |     std::int8_t date;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:47:10: error: 'int8_t' in namespace 'std' does not name a type
   47 |     std::int8_t weekDay;
      |          ^~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:49:28: error: expected ')' before 'year_'
   49 |     rtc_date_t(std::int16_t year_ = 2000, std::int8_t month_ = 1,
      |               ~            ^~~~~~
      |                            )
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:51:22: error: expected unqualified-id before ',' token
   51 |         : year{year_}, month{month_}, date{date_}, weekDay{weekDay_} {
      |                      ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:51:37: error: expected unqualified-id before ',' token
   51 |         : year{year_}, month{month_}, date{date_}, weekDay{weekDay_} {
      |                                     ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:51:50: error: expected unqualified-id before ',' token
   51 |         : year{year_}, month{month_}, date{date_}, weekDay{weekDay_} {
      |                                                  ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:51:70: error: expected unqualified-id before '{' token
   51 |         : year{year_}, month{month_}, date{date_}, weekDay{weekDay_} {
      |                                                                      ^
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: In constructor 'rtc_date_t::rtc_date_t(const tm&)':
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:55:11: error: class 'rtc_date_t' does not have any field named 'year'
   55 |         : year{(int16_t)(t.tm_year + 1900)},
      |           ^~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:56:11: error: class 'rtc_date_t' does not have any field named 'month'
   56 |           month{(int8_t)(t.tm_mon + 1)},
      |           ^~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:57:11: error: class 'rtc_date_t' does not have any field named 'date'
   57 |           date{(int8_t)t.tm_mday},
      |           ^~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:58:11: error: class 'rtc_date_t' does not have any field named 'weekDay'
   58 |           weekDay{(int8_t)t.tm_wday} {
      |           ^~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: At global scope:
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:79:27: error: 'uint8_t' in namespace 'std' does not name a type
   79 |     static constexpr std::uint8_t DEFAULT_ADDRESS = 0x51;
      |                           ^~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: In member function 'rtc_time_t RTC8563_Class::getTime()':
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:135:20: error: no matching function for call to 'rtc_time_t::rtc_time_t()'
  135 |         rtc_time_t time;
      |                    ^~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:29:5: note: candidate: 'rtc_time_t::rtc_time_t(const tm&)'
   29 |     rtc_time_t(const tm& t)
      |     ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:29:5: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note: candidate: 'constexpr rtc_time_t::rtc_time_t(const rtc_time_t&)'
   19 | struct __attribute__((packed)) rtc_time_t {
      |                                ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note: candidate: 'constexpr rtc_time_t::rtc_time_t(rtc_time_t&&)'
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: In member function 'rtc_date_t RTC8563_Class::getDate()':
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:141:20: error: no matching function for call to 'rtc_date_t::rtc_date_t()'
  141 |         rtc_date_t date;
      |                    ^~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:54:5: note: candidate: 'rtc_date_t::rtc_date_t(const tm&)'
   54 |     rtc_date_t(const tm& t)
      |     ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:54:5: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note: candidate: 'constexpr rtc_date_t::rtc_date_t(const rtc_date_t&)'
   36 | struct __attribute__((packed)) rtc_date_t {
      |                                ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note: candidate: 'constexpr rtc_date_t::rtc_date_t(rtc_date_t&&)'
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h: In member function 'rtc_datetime_t RTC8563_Class::getDateTime()':
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:147:24: error: use of deleted function 'rtc_datetime_t::rtc_datetime_t()'
  147 |         rtc_datetime_t res;
      |                        ^~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:65:5: note: 'rtc_datetime_t::rtc_datetime_t()' is implicitly deleted because the default definition would be ill-formed:
   65 |     rtc_datetime_t() = default;
      |     ^~~~~~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:65:5: error: no matching function for call to 'rtc_date_t::rtc_date_t()'
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:54:5: note: candidate: 'rtc_date_t::rtc_date_t(const tm&)'
   54 |     rtc_date_t(const tm& t)
      |     ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:54:5: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note: candidate: 'constexpr rtc_date_t::rtc_date_t(const rtc_date_t&)'
   36 | struct __attribute__((packed)) rtc_date_t {
      |                                ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note: candidate: 'constexpr rtc_date_t::rtc_date_t(rtc_date_t&&)'
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:36:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:65:5: error: no matching function for call to 'rtc_time_t::rtc_time_t()'
   65 |     rtc_datetime_t() = default;
      |     ^~~~~~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:29:5: note: candidate: 'rtc_time_t::rtc_time_t(const tm&)'
   29 |     rtc_time_t(const tm& t)
      |     ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:29:5: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note: candidate: 'constexpr rtc_time_t::rtc_time_t(const rtc_time_t&)'
   19 | struct __attribute__((packed)) rtc_time_t {
      |                                ^~~~~~~~~~
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note:   candidate expects 1 argument, 0 provided
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note: candidate: 'constexpr rtc_time_t::rtc_time_t(rtc_time_t&&)'
/home/dr-robert-69/Arduino/libraries/Timer-CAM/src/./utility/RTC8563_Class.h:19:32: note:   candidate expects 1 argument, 0 provided
Multiple libraries were found for "WiFi.h"
 Used: /home/dr-robert-69/.arduino15/packages/esp32/hardware/esp32/3.1.0/libraries/WiFi
 Not used: /home/dr-robert-69/.local/share/arduino-1.8.19/libraries/WiFi
exit status 1
Error compiling for board M5TimerCAM.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and here is the sketch itself although I'm not sure how relevant it is (nb - it doesn't work when it successfully compiles on the Windows machine...but that's what I'm trying to fix when I can get it to compile on my Pi)

/*
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/esp32-cam-post-image-photo-server/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files.
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
*/
#include <M5TimerCAM.h>
#include <Arduino.h>
#include <WiFi.h>`
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_camera.h"
#include <ArduinoHttpClient.h>



const char* ssid = "redacted";
const char* password = "redacted";

//String serverName = "192.168.1.XXX";   // REPLACE WITH YOUR Raspberry Pi IP ADDRESS
String serverName = "redacted";   // OR REPLACE WITH YOUR DOMAIN NAME



WiFiClient client;

//const int timerInterval = 900000;    // time between each HTTP POST image 15 mins
//const int timerInterval = 600000;    // time between each HTTP POST image 10 mins
const int timerInterval = 300000;    // time between each HTTP POST image 5 mins
//const int timerInterval = 30000;    // time between each HTTP POST image 30 secs

unsigned long previousMillis = 0;   // last time image was sent

//new section for M5TimerCAM
void setup() {
    Serial.println("");
    Serial.print("Connected to ");
    Serial.println(ssid);
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
}

void wifi_connect() {WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, password);
    WiFi.setSleep(false);
    Serial.println("");
    Serial.print("Connecting to ");
    Serial.println(ssid);
    // Wait for connection
    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
    }
}

void loop() {
}

Check the version of the board package. Are they the same?

sir! you are a superstar! the version of the esp32 boards was very different on my Pi installation (3.x vs 2.x) - I reinstalled to be the same version and the errors are gone...now to make a sketch that actually works! thanks so much for your help, that problem's been driving me mad all weekend!

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