cvonk / OPNpool

Integrates the functionality of a Pentair pool controller into the smart home using ESP32 SoC.
GNU General Public License v3.0
75 stars 5 forks source link

Unable to compile #16

Closed worldspawn00 closed 11 months ago

worldspawn00 commented 11 months ago

Due to massive changes in the ESP-IDF starting with version 5.0, I'm not able to compile. I attempted to install an older version of the extension, but that caused further issues (incorrect dependency versions, install of v4.4 and it's tools crashes during the python install step and cannot be used).

subprocess.CalledProcessError: Command '['D:\\espressif\\bin\\tools\\idf-python\\3.11.2\\python.exe', '-m', 'virtualenv', '--python', 'D:\\espressif\\bin\\tools\\idf-python\\3.11.2\\python.exe', '--seeder', 'pip', 'D:\\espressif\\bin\\python_env\\idf4.4_py3.11_env']' returned non-zero exit status 1.

ESP-IDF now requires components to be specified in the CMakeLists.txt file in order to use them properly. I've added all the ones I could tell it was pulling from, but I'm still not able to compile. I'm left with the following pair of compile issues: In file included from C:/esp/esp-idf/components/vfs/vfs_uart.c:18: D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:52:3: error: conflicting types for 'uart_config_t'; have 'struct <anonymous>' 52 | } uart_config_t;

In file included from D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:21: C:/esp/esp-idf/components/hal/include/hal/uart_types.h:128:3: note: previous declaration of 'uart_config_t' with type 'uart_config_t' 128 | } uart_config_t;

In file included from C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:41: D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:52:3: error: conflicting types for 'uart_config_t'; have 'struct <anonymous>' 52 | } uart_config_t;

In file included from D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:21: C:/Users/necro/esp/esp-idf/components/hal/include/hal/uart_types.h:128:3: note: previous declaration of 'uart_config_t' with type 'uart_config_t' 128 | } uart_config_t;

and

C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:1512:21: error: 'UART_NUM_0' undeclared (first use in this function) 1512 | if (uart_num == UART_NUM_0)

C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:1514:28: error: 'UART_NUM_1' undeclared (first use in this function) 1514 | } else if (uart_num == UART_NUM_1) CMakeLists.txt

I've attached the modified CMakeLists.txt let me know if there's some other component I'm still missing here.

Please update the files and instructions to reflect the changes in the toolpath.

worldspawn00 commented 11 months ago

Is there any way to get a compiled default version of the factory binary to upload to the controller? I don't see why it's necessary for everyone who wants to use this to need to compile it themselves if they're not making changes to the defaults.

cvonk commented 11 months ago

The supported ESP-IDF is mentioned in the README. I have no plan to support other versions, because to do it well all functionality has to be retested.

As customary, the binaries are available at https://github.com/cvonk/OPNpool/releases/

worldspawn00 commented 11 months ago

Thanks, I didn't see the releases, that will work for my needs. I attempted to install the ESP-IDF version mentioned in the instructions, but could not get the install to finish.