{"id":16239750,"url":"https://github.com/nopnop2002/esp32-idf-sqlite3","last_synced_at":"2025-04-11T01:10:28.556Z","repository":{"id":223944047,"uuid":"761971117","full_name":"nopnop2002/esp32-idf-sqlite3","owner":"nopnop2002","description":"sqlite3 for esp-idf","archived":false,"fork":false,"pushed_at":"2025-04-07T12:29:11.000Z","size":20118,"stargazers_count":26,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T13:30:50.691Z","etag":null,"topics":["esp-idf","esp32","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nopnop2002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T20:43:11.000Z","updated_at":"2025-04-07T12:29:16.000Z","dependencies_parsed_at":"2025-04-07T13:38:35.456Z","dependency_job_id":null,"html_url":"https://github.com/nopnop2002/esp32-idf-sqlite3","commit_stats":null,"previous_names":["nopnop2002/esp32-idf-sqlite3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp32-idf-sqlite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp32-idf-sqlite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp32-idf-sqlite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp32-idf-sqlite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nopnop2002","download_url":"https://codeload.github.com/nopnop2002/esp32-idf-sqlite3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322600,"owners_count":21084337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp-idf","esp32","sqlite3"],"created_at":"2024-10-10T13:45:01.750Z","updated_at":"2025-04-11T01:10:28.550Z","avatar_url":"https://github.com/nopnop2002.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp32-idf-sqlite3\nsqlite3 for esp-idf.   \nThe original is [here](https://github.com/siara-cc/esp32-idf-sqlite3).   \nAlthough it is a very nice library, it cannot be built with ESP-IDF Ver5.   \nTherefore, We changed it so that it can also be used with ESP-IDF Ver5.   \nAt the same time, we also changed the sample code so that it can be used with ESP-IDF Ver5.   \n\n# Software requirements   \nESP-IDF V5.0 or later.   \nESP-IDF V4.4 release branch reached EOL in July 2024.   \n\n# Changes from the original   \n- Change to local component   \n- Disable compile warnings   \n- Supports PSRAM   \n- Added fatfs/littlefs example   \n- Added tcp/websocket/mqtt/tusb example   \n- Added query/redirect/ftp example   \n- Moved sqllib.c and sqllib.h to components\n\n# Installation\n```\ngit clone https://github.com/nopnop2002/esp32-idf-sqlite3\ncd esp32-idf-sqlite3/spiffs\nidf.py menuconfig\nidf.py flash monitor\n```\n\n# Using PSRAM   \nEnable PARAM using Menuconfig.   \n![psram-esp32](https://github.com/nopnop2002/esp32-idf-sqlite3/assets/6020549/603cd530-7424-4da6-b395-e0be6de1d6a8)\n\n\nESP32-S3 can now use two types: Quad Mode PSRAM and Octal Mode PSRAM.    \nPlease check the ESP32-S3 data sheet to determine which type of PSRAM your ESP32S3 has.   \n![psram-esp32s3-Quad](https://github.com/nopnop2002/esp32-idf-sqlite3/assets/6020549/ed0533e0-0128-46e1-9ce1-7ffe3515b386)\n![psram-esp32s3-Octal](https://github.com/nopnop2002/esp32-idf-sqlite3/assets/6020549/2ca3cfda-7128-49b9-be2d-bd7c9127488c)\n\n\nsqlite uses CONFIG_SPIRAM to determine whether PSRAM is enabled or disabled.   \nIf PSRAM is enabled, use ps_malloc()/ps_realloc() instead of malloc()/realloc().   \n```\n#if CONFIG_SPIRAM\n#define SQLITE_MALLOC(x) ps_malloc(x)\n#define SQLITE_FREE(x) free(x)\n#define SQLITE_REALLOC(x,y) ps_realloc((x),(y))\n#else\n#define SQLITE_MALLOC(x) malloc (x)\n#define SQLITE_FREE(x) free(x)\n#define SQLITE_REALLOC(x,y) realloc((x),(y))\n#endif\n```\n\n\nIf PSRAM is enabled, it will be automatically mounted at boot time.   \n\n- ESP32-CAM\n```\nI (224) esp_psram: Found 8MB PSRAM device\nI (224) esp_psram: Speed: 40MHz\nI (228) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.\nW (235) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped\n```\n\n- ESP32-S3-WROOM-1 N4R2/N8R2/N16R2(Quad Mode)\n```\nI (172) esp_psram: Found 2MB PSRAM device\nI (172) esp_psram: Speed: 40MHz\n```\n\n- ESP32-S3-WROOM-1 N4R8/N8R8/N8R8/N16R8(Octal Mode)\n```\nI (225) esp_psram: Found 8MB PSRAM device\nI (230) esp_psram: Speed: 40MHz\n```\n\n\n# How to use this component in your project   \nCreate idf_component.yml in the same directory as main.c.   \n```\nYourProject --+-- CMakeLists.txt\n              +-- main --+-- main.c\n                         +-- CMakeLists.txt\n                         +-- idf_component.yml\n```\n\nContents of idf_component.yml.\n```\ndependencies:\n  nopnop2002/sqlite3:\n    path: components/esp32-idf-sqlite3/\n    git: https://github.com/nopnop2002/esp32-idf-sqlite3.git\n```\n\nWhen you build a projects esp-idf will automaticly fetch repository to managed_components dir and link with your code.   \n```\nYourProject --+-- CMakeLists.txt\n              +-- main --+-- main.c\n              |          +-- CMakeLists.txt\n              |          +-- idf_component.yml\n              +-- managed_components ----- nopnop2002__sqlite3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2Fesp32-idf-sqlite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnopnop2002%2Fesp32-idf-sqlite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2Fesp32-idf-sqlite3/lists"}