Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build when using latest version of Arduino ESP32 (v3.0.0 and IDF v5.1) #60

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

blackhack
Copy link
Contributor

@blackhack blackhack commented Oct 17, 2023

On the latest version of Arduino ESP32, those headers are not included by default, causing compilation errors, this doesn't cause problems in older versions.

Tested on both Arduino ESP32 and Arduino As Component of IDF 5.1.1.

d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp:59:3: error: #error "GPIO_PIN_COUNT not defined for this version of SDK"
   59 | # error "GPIO_PIN_COUNT not defined for this version of SDK"

d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp: In member function 'void OneWireNg_ArduinoIdfESP32::initDtaGpio(unsigned int, bool)':
d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp:161:12: error: 'GPIO_IS_VALID_GPIO' was not declared in this scope
  161 |     assert(GPIO_IS_VALID_GPIO((int)pin) && GPIO_IS_VALID_OUTPUT_GPIO((int)pin));
      |            ^~~~~~~~~~~~~~~~~~
d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp:161:44: error: 'GPIO_IS_VALID_OUTPUT_GPIO' was not declared in this scope
  161 |     assert(GPIO_IS_VALID_GPIO((int)pin) && GPIO_IS_VALID_OUTPUT_GPIO((int)pin));
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp:63:25: error: 'GPIO' was not declared in this scope; did you mean 'PI'?
   63 | # define REG_GPIO_IN_LO GPIO.in.val
      |                         ^~~~
d:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master\src\platform\OneWireNg_ArduinoIdfESP32.cpp:170:27: note: in expansion of macro 'REG_GPIO_IN_LO'
  170 |         _dtaGpio.inReg = &REG_GPIO_IN_LO;
      |                           ^~~~~~~~~~~~~~
"D:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++" -MMD -c "@D:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/esp32-arduino-libs/esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ARDUINO-ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"esp32\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"espressif:arduino-esp32:esp32:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=debug,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default\"" -DESP32 -DCORE_DEBUG_LEVEL=4 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 "@D:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/esp32-arduino-libs/esp32/flags/defines" "-IC:\\Users\\david\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2023917-5960-1sbg54u.xbywf\\DallasTemperature" -iprefix "D:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/esp32-arduino-libs/esp32/include/" "@D:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/esp32-arduino-libs/esp32/flags/includes" "-ID:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32/tools/esp32-arduino-libs/esp32/qio_qspi/include" "-ID:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32\\cores\\esp32" "-ID:\\JDavid\\Development\\Arduino\\Sketch\\hardware\\espressif\\arduino-esp32\\variants\\esp32" "-Id:\\JDavid\\Development\\Arduino\\Sketch\\libraries\\OneWireNg-master\\src" "@C:\\Users\\david\\AppData\\Local\\Temp\\arduino\\sketches\\364C1B05CE87BB2EF11E96D015E13B20/build_opt.h" "d:\\JDavid\\Development\\Arduino\\Sketch\\libraries\\OneWireNg-master\\src\\platform\\Platform_Delay.cpp" -o "C:\\Users\\david\\AppData\\Local\\Temp\\arduino\\sketches\\364C1B05CE87BB2EF11E96D015E13B20\\libraries\\OneWireNg-master\\platform\\Platform_Delay.cpp.o"

Using library OneWireNg at version 0.13.1 in folder: D:\JDavid\Development\Arduino\Sketch\libraries\OneWireNg-master 

@brentru
Copy link

brentru commented Oct 18, 2023

@pstolarz Please consider merging in and re-releasing.

related: espressif/arduino-esp32#8776

@pstolarz pstolarz merged commit 2a46ba0 into pstolarz:master Oct 19, 2023
42 checks passed
@pstolarz
Copy link
Owner

Thanks for this. I'll need to fix CI/CD environment. I'm a little bit busy now, so give me a while...

@pstolarz
Copy link
Owner

v0.13.2 just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants