siara-cc / esp32-idf-sqlite3

Sqlite library for esp-idf (esp32) framework
Apache License 2.0
147 stars 57 forks source link

Compatibility check #21

Open antusystem opened 1 year ago

antusystem commented 1 year ago

The latest stable ESP-IDF version is 5.1.1 so reading the issues and Pull Request I added the necessary changes for the code to support 5.X.X and 4.X.X.

17 I took in consideration both message in the pull request

18 I added the information provided by @KikyTokamuro in this issue

I only have installed ESP-IDF v5.1.1 so I haven't test if this changes work in ESP-IDF v4.X.X, but it should.

Also adding the information in the Readme allows people to understand everything easily

I was able to compile console, sd_mmc, and spiffs, though, I only tested with the board the spiffs example.

For the case of sd_spi example I could not make it work because of changes between version 4.X.X and 5.X.X of ESP-IDF like changing sdspi_slot_config_t to sdspi_device_config_t, which changes the structure and haven't search more on it.

I have been using ESP-IDF Visual Studio Code Extension v1.6.5 for the compilation and for it to work I had to change the main/CMakeLists.txt file commenting the line idf_build_component(esp32-idf-sqlite3). Also, the file CMakeLists.txt (in root) had to be updated, commenting the line include($ENV{IDF_PATH}/tools/cmake/idf.cmake) and decommenting include($ENV{IDF_PATH}/tools/cmake/project.cmake). I also updated the cmake minimum version to 3.16 because the examples from ESP-IDF have that version

Edit: I was able to test successfully console and sd_mmc examples