Version 2.1.0 Windows 7

9-22-2023
Hello Everyone. I have been building a ESP32 project and all was good. Last night I created a backup after All bugs were fixed. This morning my IDE Libraries were updated just as normal. Now I cannot get it to compile. many compilation warnings and errors. I went back to very basics and still have errors. Here is my basic code and error. Any suggestions would be helpful.
Please note errors show warnings, redefinition and errors from the includes
Thank you.
ERRORS

In file included from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup_Select.h:204,
                 from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:68,
                 from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:5:
c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_Drivers/ST7796_Defines.h:3: warning: "TFT_WIDTH" redefined
 #define TFT_WIDTH  320
 
In file included from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup_Select.h:30,
                 from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:68,
                 from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:5:
c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup.h:15: note: this is the location of the previous definition
 #define TFT_WIDTH  480
 
In file included from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup_Select.h:204,
                 from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:68,
                 from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:5:
c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_Drivers/ST7796_Defines.h:4: warning: "TFT_HEIGHT" redefined
 #define TFT_HEIGHT 480
 
In file included from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup_Select.h:30,
                 from c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:68,
                 from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:5:
c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/User_Setup.h:16: note: this is the location of the previous definition
 #define TFT_HEIGHT 320
 
In file included from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:5:
c:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:955:8: warning: #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available! [-Wcpp]
       #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available!
        ^~~~~~~
In file included from c:\Users\user\Documents\Arduino\libraries\ESP32_PWM\src/ESP32_PWM.h:47,
                 from C:\Users\user\Documents\Arduino\Control_Panel_KR\Control_Panel_KR.ino:7:
c:\Users\user\Documents\Arduino\libraries\ESP32_PWM\src/ESP32_PWM.hpp:103:22: error: "/*" within comment [-Werror=comment]
   TIMER_GROUP_0 = 0, /*!<Hw timer group 0
                       
c:\Users\user\Documents\Arduino\libraries\ESP32_PWM\src/ESP32_PWM.hpp:104:22: error: "/*" within comment [-Werror=comment]
   TIMER_GROUP_1 = 1, /*!<Hw timer group 1
                       
c:\Users\user\Documents\Arduino\libraries\ESP32_PWM\src/ESP32_PWM.hpp:113:16: error: "/*" within comment [-Werror=comment]
   TIMER_0 = 0, /*!<Select timer0 of GROUPx
                 
c:\Users\user\Documents\Arduino\libraries\ESP32_PWM\src/ESP32_PWM.hpp:114:16: error: "/*" within comment [-Werror=comment]
   TIMER_1 = 1, /*!<Select timer1 of GROUPx
                 
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "WiFi.h"
  Used: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.13\libraries\WiFi
  Not used: C:\Users\user\Documents\Arduino\libraries\WiFi
  Not used: C:\Users\user\Documents\Arduino\libraries\WiFiEspAT

CODE______________________________________________________________________

#include <Arduino.h>

#include "FT62XXTouchScreen.h"

#include <SPI.h>

#include <TFT_eSPI.h>

#include <TFT_eWidget.h>

#include "ESP32_PWM.h"

#include "Free_Fonts.h" // Include the header file attached to this sketch

#include <strings.h>

// SDCARD

#include <FSImpl.h>

#include <vfs_api.h>

//#include <sd_defines.h>

#include <sd_diskio.h>

#include "FS.h"

#include "SD.h"

#include <EasyStringStream.h>

// WIFI

#include <WiFi.h>

#include "ESP32Console.h"

#include "ESP32Console/Helpers/PWDHelpers.h"

//#include <ESPHTTPClient.h>

using namespace ESP32Console;

////////////////////////////////////////////////////////////////

//WEB_PAGE

#include <AsyncTCP.h>

#include <ESPAsyncWebServer.h>

#include <ESPDash.h>

void setup() {

// put your setup code here, to run once:

}

void loop() {

// put your main code here, to run repeatedly:

}

Also make a backup of the Arduino libraries and whatever else may be updated.

Turn off automatic updates and make updates only after a backup of your entire system. I could not find any such setting in the 2.1 IDE, it may help to set the affected libraries to read-only?

1 Like

Hi @radkr. The ESP32 boards platform is unique in that the compilation result is affected by the setting of Arduino IDE's "Compiler warnings" preference.

Traditionally this preference has only influenced how many warnings we see in the compilation output, but the Arduino boards platform framework allows each platform developer to decide exactly what effect they want each of the levels of this preference to have. The ESP32 developers decided to add the -Werror=all flag to the compilation command when you set the "Compiler warnings" preference to the "More" or "All" levels. This flag causes compilation to fail when the sketch code produces a compilation warning.

There are two possible approaches to resolve the error:

Fix Warnings

The ESP32 developers configured their boards platform this way to encourage writing code that does not produce warnings. Compiler warnings often indicate a problem with the code so it is a good idea to pay attention to them and fix them.

Even in cases where the warning does not indicate a problem in the code, an accumulation of such warnings makes it difficult to spot the significant warnings in the output so it is a good idea to adjust the code to suppress these warnings as well.

If you would like advice on how to best address specific warnings, the helpers here can assist with that.

You may find that some warnings come from code you didn't write (e.g., a library used by your sketch). If you decide to fix those warnings, it's a good idea to submit the fix to the source of the code (e.g., a pull request to the GitHub repository where it is hosted). This benefits you by avoiding having to fix the warnings all over again whenever you update to a new release of the code. This will also benefit all the other users of the code.

Reduce Warning Level

You should pay attention to warnings and fix them in your own code whenever possible. Unfortunately you may find that some warnings come from code you didn't write (as is the case here since the warnings are coming from the "ESP32_PWM" library's code). These warnings can also be fixed, but you may decide that it isn't worth the effort to fix problems in other people's code. If so, you can reduce the level of the "Compiler warnings" preference to avoid the warnings causing a compilation error:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Select "Default" from the "Compiler warnings" menu in the "Preferences" dialog.
  3. Click the "OK" button.

You are absolutely Right. I must have changed the settings and did not catch it. I am new to the Arduino IDE and am learning. Thank you so much for the clear explanation. Have a great day Kurtis.

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

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