0

I am developing with VisualStudio Code and Platform.IO installed.

I am using ESP32 / TTGO T-CALL with Arduino Framework and added the RTCLib.h Adafruit v 1.11.0 Unfortunately the software is not compiling because I got the following error:

    Building in release mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Compiling .pio\build\esp32dev\libfa0\TinyWireM\USI_TWI_Master.cpp.o
C:\Users\aleil\.platformio\lib\TinyWireM\USI_TWI_Master.cpp:28:27: fatal error: avr/interrupt.h: No such file or directory
compilation terminated.
Archiving .pio\build\esp32dev\lib46d\libRTClib.a
*** [.pio\build\esp32dev\libfa0\TinyWireM\USI_TWI_Master.cpp.o] Error 1
============================================ [FAILED] Took 8.69 seconds ============================================
The terminal process "C:\Users\aleil\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Here there is the INCLUDING code:

#include <Arduino.h>
#include <StreamDebugger.h>
#include <ArduinoHttpClient.h>
#include <ArduinoJson.h>
#include <OneWire.h>                // x ds18b20 temperature sensors
#include <DallasTemperature.h>      // x ds18b20 temperature sensors
#include <esp_task_wdt.h>
#include "SPI.h" // Used to define SPI on SPI1
#include "SD.h"
#include <Wire.h>
#include <RTClib.h>

So I try to find a solution but I cannot find one. Does someone have some hint or solutions?

3
  • It looks like this libfa0/TinyWireM library is using headers specific to the AVR architecture. You will need to adapt it to ESP32. In the best case that is a simple preprocessor definition, in the worst case you will need to edit the library. Commented Jul 31, 2020 at 9:09
  • What is your platformio.ini setting? TinyWire is the dependency of RTClib, but it should only be included when the MCU is ATtiny, you can see from RTClib.cpp that Wire.h will be use if the MCU is not __AVR_ATtiny85__. Commented Jul 31, 2020 at 13:57
  • 2
    Thanks, I added this in platformio.ini "lib_ignore = TinyWireM" and it work well Commented Aug 18, 2020 at 8:02

1 Answer 1

1

I had the same problem, but uninstalling the TinyWireM library (PlatformIO > Libraries > Installed) solved the problem.

I think the TinyWireM library is installed automatically with the RTClib library.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.