ESP32 C V2, on Arduino IDE - Problems with "OneWire" library

Espstarter
Posts: 3
Joined: Wed Jun 01, 2022 5:28 am

ESP32 C V2, on Arduino IDE - Problems with "OneWire" library

Postby Espstarter » Fri Jun 03, 2022 6:35 am

Hallo experts,
I am using ESP32 C V2 kit under Arduino IDE.
As a learning example I have taken the original raw code from the Rui Santos' Simple Temperature measurement sketch". Have installed the recommended "Onewire" lib (by Paul Stoffregen) and "Dallas Temperature" lib (by Miles Burton).

The compilation generated a substential error list shown below though.

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"

In file included from C:\Users\xxxx\Documents\Arduino\libraries\OneWire\OneWire.cpp:144:

C:\Users\xxxx\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function 'void directModeInput(uint32_t)':

C:\Users\xxxx\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\xxxx\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\xxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:36,
from C:\Users\xxxx\Documents\Arduino\libraries\OneWire\OneWire.cpp:142:

C:\Users\xxxx\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\xxxx\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\xxxx\Documents\Arduino\libraries\OneWire\OneWire.cpp:144:

C:\Users\xxxx\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function 'void directModeOutput(uint32_t)':

C:\Users\xxxx\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\xxxx\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\xxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:36,
from C:\Users\xxxx\Documents\Arduino\libraries\OneWire\OneWire.cpp:142:

C:\Users\xxxx\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\xxxx\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))
^~~~
exit status 1
Error compiling for board ESP32 Dev Module.[/color][/i]

The latest version of "OneWire" and "DallasTemperatue" libs have been installed.

I am the very begining of the Arduino IDE and ESP32 learning curve. Any help, suggestions or tips to overcome the problem would most welcome.
Many thanks in advance and best regards

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 C V2, on Arduino IDE - Problems with "OneWire" library

Postby lbernstone » Fri Jun 03, 2022 4:32 pm


Who is online

Users browsing this forum: Baidu [Spider] and 63 guests