BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Exit Status 1, cannot compile

Hi All,

Haven’t worked on ESP32 + Blynk since Jan. Back then I made a project to control my garage door. Worked well. Used the new IoT Blynk app. Now I want to make another project and am running into some issues. Basically I am not able to compile this script. I am able to compile the script I made back in Jan. I am also able to compile basic premade examples that don’t use any Blynk commands, such as make LED blink. So my ESP32 uC seems to be working and so is the IDE and settings to compile code. I’m hoping there is some silly mistake in my script :smiley:

Below are relevant details. Appreciate any suggestions to get to the bottom of this.

  1. Using IDE version 1.8.16
  2. Blynk lib v 1.0.1
  3. New IoT blynk App (although the issues appears before even trying to integrate the ESP32 to the app)
  4. I have ESP32 Dev Board selected
  5. Under Preferences I have the proper link to espressif: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
    Also have installed the esp32 lib, version 2.0.3

Output:
There is lots of output as I have verbose enabled. For now I’ll show just what I think is relevant output. FYI, I’ve removed my name from the paths and put “NAMEREMOVED”.

In file included from C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\OneWire.cpp:144:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function ‘void directModeInput(uint32_t)’:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:161:26: error: ‘rtc_gpio_desc’ was not declared in this scope
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:161:26: note: suggested alternative: ‘rtc_io_desc’
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
rtc_io_desc
In file included from C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:36,
from C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\OneWire.cpp:142:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:178:38: error: ‘esp32_gpioMux’ was not declared in this scope
ESP_REG(DR_REG_IO_MUX_BASE + esp32_gpioMux[pin].reg) = pinFunction;
^~~~~~~~~~~~~
C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/esp32-hal.h:73:47: note: in definition of macro ‘ESP_REG’
#define ESP_REG(addr) *((volatile uint32_t *)(addr))
^~~~
In file included from C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\OneWire.cpp:144:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function ‘void directModeOutput(uint32_t)’:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:189:26: error: ‘rtc_gpio_desc’ was not declared in this scope
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:189:26: note: suggested alternative: ‘rtc_io_desc’
uint32_t rtc_reg(rtc_gpio_desc[pin].reg);
^~~~~~~~~~~~~
rtc_io_desc
In file included from C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:36,
from C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\OneWire.cpp:142:
C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:206:38: error: ‘esp32_gpioMux’ was not declared in this scope
ESP_REG(DR_REG_IO_MUX_BASE + esp32_gpioMux[pin].reg) = pinFunction;
^~~~~~~~~~~~~
C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/esp32-hal.h:73:47: note: in definition of macro ‘ESP_REG’
#define ESP_REG(addr) *((volatile uint32_t *)(addr))
^~~~
Using library Blynk at version 1.0.1 in folder: C:\Users\NAMEREMOVED\Documents\Arduino\libraries\Blynk
Using library WiFiClientSecure at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WiFiClientSecure
Using library WiFi at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WiFi
Using library Preferences at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\Preferences
Using library WebServer at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WebServer
Using library DNSServer at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\DNSServer
Using library Update at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\Update
Using library HTTPClient at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\HTTPClient
Using library OneWire at version 2.3.5 in folder: C:\Users\NAMEREMOVED\Documents\Arduino\libraries\OneWire
Using library DallasTemperature at version 3.9.0 in folder: C:\Users\NAMEREMOVED\Documents\Arduino\libraries\DallasTemperature
Using library FS at version 2.0.0 in folder: C:\Users\NAMEREMOVED\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\FS
exit status 1
Error compiling for board ESP32 Dev Module.

Code below:

#define BLYNK_DEVICE_NAME "GreenhouseNet"
#define BLYNK_FIRMWARE_VERSION "0.1.1"
#define BLYNK_PRINT Serial
#define APP_DEBUG
#include "BlynkEdgent.h" 
#include <OneWire.h>
#include <DallasTemperature.h>

BlynkTimer timer; // Announcing the timer

#define ONE_WIRE_BUS 27

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

// Address of DS18B20
uint8_t sensor1[8] = { 0x28, 0x04, 0xC6, 0x07, 0xD6, 0x01, 0x3C, 0xEB };

void setup() {
  Serial.begin(115200);
  sensors.begin();

  BlynkEdgent.begin();

  timer.setInterval(1000L, printTemperature);
}

void loop() {
  BlynkEdgent.run();
  timer.run();        
}

void printTemperature(){
  sensors.requestTemperatures();
  float tempC = sensors.getTempC(sensor1);
  Serial.println(tempC);
  Blynk.virtualWrite(V0, tempC); 
}

It doesn’t seem to like your OneWire library.

Pete.

Hi Pete,

I tried re-installing the library but no luck. I’ve not had issues with OneWire in the past. Do you have any suggestion on what I can try?

Thanks!

I got it to work by changing to a different lib … the OneWireNg lib. Something not working right in the OneWire and the ESP32.