ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Using your DS18x20_Temperature example.
Windows 10
ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1
Arduino IDE 2.3.6
OneWire 2.3.8
compilation error 1
In file included from c:\Users\HR\Documents\Arduino\libraries\OneWire\OneWire.cpp:149:
c:\Users\HR\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function 'uint32_t directRead(uint32_t)':
c:\Users\HR\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:174:25: error: no match for 'operator>>' (operand types are 'volatile gpio_in_reg_t' and 'uint32_t' {aka 'long unsigned int'})
174 | return (GPIO.in >> pin) & 0x1;
| ~~~~~~~ ^~ ~~~
| | |
| | uint32_t {aka long unsigned int}
| volatile gpio_in_reg_t
Any solution or succession?
Windows 10
ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1
Arduino IDE 2.3.6
OneWire 2.3.8
compilation error 1
In file included from c:\Users\HR\Documents\Arduino\libraries\OneWire\OneWire.cpp:149:
c:\Users\HR\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h: In function 'uint32_t directRead(uint32_t)':
c:\Users\HR\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:174:25: error: no match for 'operator>>' (operand types are 'volatile gpio_in_reg_t' and 'uint32_t' {aka 'long unsigned int'})
174 | return (GPIO.in >> pin) & 0x1;
| ~~~~~~~ ^~ ~~~
| | |
| | uint32_t {aka long unsigned int}
| volatile gpio_in_reg_t
Any solution or succession?
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Thank you, I found the solution of the problem,
which can be found in the file OneWire_direct_gpio.h at https://github.com/devastar/esp32c6-zig ... emperature
OneWire has the problematic file in library directory at C:\Users\user\Documents\Arduino\libraries\OneWire\util on a windows10 notebook.
I tested the updated OneWire_direct_gpio.h file of devastar in the program directory and changed the directory in the OneWire.cpp in the C:\Users\HR\Documents\Arduino\libraries\OneWire directory as follows:
#include "C:/Users/HR/Documents/Arduino/Projects/esp32c6-zigbee-ds18b20-temperature/OneWire_direct_gpio.h"
//#include "util/OneWire_direct_gpio.h"
After that the program had no issue anymore with the ESP32-C6-WROOM-1 and compiled without any problems.
The sensor then worked fine in zigbee2MQTT.
OneWire_direct_gpio.h in OneWire/util needs to be replaced until the next update of the OneWire library is happening.
which can be found in the file OneWire_direct_gpio.h at https://github.com/devastar/esp32c6-zig ... emperature
OneWire has the problematic file in library directory at C:\Users\user\Documents\Arduino\libraries\OneWire\util on a windows10 notebook.
I tested the updated OneWire_direct_gpio.h file of devastar in the program directory and changed the directory in the OneWire.cpp in the C:\Users\HR\Documents\Arduino\libraries\OneWire directory as follows:
#include "C:/Users/HR/Documents/Arduino/Projects/esp32c6-zigbee-ds18b20-temperature/OneWire_direct_gpio.h"
//#include "util/OneWire_direct_gpio.h"
After that the program had no issue anymore with the ESP32-C6-WROOM-1 and compiled without any problems.
The sensor then worked fine in zigbee2MQTT.
OneWire_direct_gpio.h in OneWire/util needs to be replaced until the next update of the OneWire library is happening.
-
PaulUitWijchen
- Posts: 1
- Joined: Wed May 28, 2025 7:12 pm
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Hi,
I'm having the same issue. But I don't quite understand the solution you propose. I have a OneWire module installed. (version 2.3.8).
Should I only replace the 'OneWire_direct_gpio.h' in the util directory? Or am I misunderstanding you.
-- Paul
I'm having the same issue. But I don't quite understand the solution you propose. I have a OneWire module installed. (version 2.3.8).
Should I only replace the 'OneWire_direct_gpio.h' in the util directory? Or am I misunderstanding you.
-- Paul
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Hi Paul, correct.
Just rename the old OneWire_direct_gpio.h file in the Arduino\libraries\OneWire\util directory to, for example OneWire_direct_gpio.h.ori , just in case.
Copy the new file with the same name from https://github.com/devastar/esp32c6-zig ... emperature into your Arduino\libraries\OneWire\util directory, where you just have renamed OneWire_direct_gpio.h.
Check and compare file ownership depending of your system.
Check also in the OneWire directory file the OneWire.cpp has the #include "util/OneWire_direct_gpio.h"
In the Arduino IDE with that setting, I have been able to compile ESP32-C6-WROOM-1 ino programs without any errors.
Installed a temp sensor with zigbee2mqtt.
However, I still have issues to compile ino files with the ESP32-H2-DevKitM-1 Module.
When you compare the 2 OneWire_direct_gpio.h files you may notice the improvement of some of the declarations done by https://github.com/devastar.
Anyhow I hope this helps for the time being until the next update by OneWire
Greetings Heinz
Just rename the old OneWire_direct_gpio.h file in the Arduino\libraries\OneWire\util directory to, for example OneWire_direct_gpio.h.ori , just in case.
Copy the new file with the same name from https://github.com/devastar/esp32c6-zig ... emperature into your Arduino\libraries\OneWire\util directory, where you just have renamed OneWire_direct_gpio.h.
Check and compare file ownership depending of your system.
Check also in the OneWire directory file the OneWire.cpp has the #include "util/OneWire_direct_gpio.h"
In the Arduino IDE with that setting, I have been able to compile ESP32-C6-WROOM-1 ino programs without any errors.
Installed a temp sensor with zigbee2mqtt.
However, I still have issues to compile ino files with the ESP32-H2-DevKitM-1 Module.
When you compare the 2 OneWire_direct_gpio.h files you may notice the improvement of some of the declarations done by https://github.com/devastar.
Anyhow I hope this helps for the time being until the next update by OneWire
Greetings Heinz
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Hello,
I'm having this issue when using the ESP32-H2-DevkitM-1. It seems that you have solved the issue for the ESP32-C6 - has anyone managed to get the H2 board working?
Bradley
I'm having this issue when using the ESP32-H2-DevkitM-1. It seems that you have solved the issue for the ESP32-C6 - has anyone managed to get the H2 board working?
Bradley
-
Deepak Kumar
- Posts: 5
- Joined: Tue May 27, 2025 3:44 pm
Please help
"I'm working on an ESP32-C6 project with ESP-IDF (version 5.4.1) to implement an IR remote receiver and transmitter for controlling my AC. The provided esp/v5.4.1/esp-idf/examples/peripherals/rmt/ir_nec_transceiver example is helpful for understanding RMT, but it only supports the NEC protocol. Since I'm unsure of my AC remote's exact IR protocol, I'm looking for guidance or a code example that can act as a universal IR receiver (to learn the signal) and transmitter (to send it) for common AC units. Any assistance would be greatly appreciated."
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
Just for anyone following this thread, I managed to get the OneWire library working on my ESP32-H2-DevkitM-1 board by modifying the OneWire_direct_gpio.h file. Wherever there is the directive "#if CONFIG_IDF_TARGET_ESPC3" replace it with "#if (CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C3)". The original file seems to not know about the H2 version. It is now successfully reading temperatures from the DS18B20 sensor.
Bradley
Bradley
Re: ESP32-C6-WROOM-1 or ESP32-H2-DevKitM-1 Modules create compilation error: exit status 1
I have the same problem with the esp32-c6 and, after reading your solutions i found out that Paul Stoffregen updated the One Wire repository with the gpio file you talked about. You can download it from https://github.com/PaulStoffregen/OneWi ... aster/util
I tried it and fortunately it worked! Thank you for all your responses! It's clear that we still need these forums even with ChatGpt being everywhere, because he didn't know how to resolve this problem. He just managed to tell me that esp32 c6 is not supported and that i just need to change to another board. Soo, please just keep helping the ones in need, like me
))
I tried it and fortunately it worked! Thank you for all your responses! It's clear that we still need these forums even with ChatGpt being everywhere, because he didn't know how to resolve this problem. He just managed to tell me that esp32 c6 is not supported and that i just need to change to another board. Soo, please just keep helping the ones in need, like me
Who is online
Users browsing this forum: ChatGPT-User, Google [Bot], PerplexityBot, PetalBot and 2 guests