{"id":15657604,"url":"https://github.com/tobozo/esp8266sdupdater","last_synced_at":"2025-05-05T15:52:13.910Z","repository":{"id":69123649,"uuid":"130580723","full_name":"tobozo/ESP8266SDUpdater","owner":"tobozo","description":"💾 ESP8266 Prequel to M5Stack-SD-Updater","archived":false,"fork":false,"pushed_at":"2018-05-27T07:15:07.000Z","size":3279,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T22:11:14.321Z","etag":null,"topics":["arduino","esp8266","m5stack-sd-updater","sd-card","spiffs"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobozo.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":"2018-04-22T15:29:53.000Z","updated_at":"2025-01-10T22:25:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5816ac4f-e1c8-4929-89cb-091cbddca241","html_url":"https://github.com/tobozo/ESP8266SDUpdater","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobozo%2FESP8266SDUpdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobozo%2FESP8266SDUpdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobozo%2FESP8266SDUpdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobozo%2FESP8266SDUpdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobozo","download_url":"https://codeload.github.com/tobozo/ESP8266SDUpdater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252526753,"owners_count":21762563,"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":["arduino","esp8266","m5stack-sd-updater","sd-card","spiffs"],"created_at":"2024-10-03T13:08:43.025Z","updated_at":"2025-05-05T15:52:13.868Z","avatar_url":"https://github.com/tobozo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266SDUpdater\nThis is the ESP8266 Prequel to the [M5Stack-SD-Updater](https://github.com/tobozo/M5Stack-SD-Updater).\n\nESP8266Updater is an Arduino library to package you apps on a SD card and load them from different contexts such as a menu app or MQTT message.\n\n\n\u003cimg src=\"https://github.com/tobozo/ESP8266SDUpdater/raw/master/examples/OLEDiFOO/OLEDiESP.jpg\"\u003e\n\n\n\nMinimal Requirements\n--------------------\n- ESP8266 (4M and more)\n- Micro SD Card reader\n\nUsage\n-----\nPut this as early as possible in your sketch:\n\n    #include \"ESP8266SDUpdater.h\"\n    SDUpdater sdUpdater;\n\nUse this from anywhere in your code to trigger the update:\n\n    if(digitalRead(BUTTON_A_PIN) == 0) {\n      Serial.println(\"Will Load menu binary\");\n      sdUpdater.updateFromSD(); // defaults to \"MENU.BIN\"\n      ESP.restart();\n    }\n\nAlso works with filenames:\n\n    sdUpdater.updateFromSD(\"/BATMAN.BIN\");\n    ESP.restart(); // don't forget to restart!\n\nThe [OLEDiFOO example](https://github.com/tobozo/ESP8266SDUpdater/tree/master/examples/OLEDiFOO) should have its binary renamed to MENU.BIN and copied onto the SD Card.\n\nThis will be addressed if practical uses are found for the OLEDiESP build, but other menus should be added for other platforms such as [OLEDiCADE](https://www.tindie.com/products/PhoenixCNC/oledicade-tiny-pac-man-game-console/), [Espresso Lite](http://www.espressolite.com/) or [Lameboy](https://www.tindie.com/products/davedarko/lameboy-esp8266-handheld/?pt=ac_prod_search).\n\nTroubleshooting\n---------------\nUsing this library will create issues in your existing code. This is caused by [SPIFFS and SD fighting for the legitimacy of FS namespace](https://github.com/esp8266/Arduino/issues/2281). ESP8266SDUpdater needs to use both, and this comes with a treat.\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n**Compiler error**: `#error Architecture or board not supported`\n\n\n```\n    In file included from ~/Arduino/libraries/SD/src/utility/Sd2Card.h:26:0,\n        from ~/Arduino/libraries/SD/src/utility/SdFat.h:29,\n        from ~/Arduino/libraries/SD/src/SD.h:20,\n        from ~/Arduino/libraries/ESP8266SDUpdater/ESP8266SDUpdater.h:61,\n        from ~/MySketch/MySketch.ino:xx:~/Arduino/libraries/SD/src/utility/Sd2PinMap.h:510:2: error: #error Architecture or board not supported.\n        #error Architecture or board not supported.\n```\n\n  - Make sure you include the `ESP8266SDUpdater.h` library first. If you can't, make sure you insert `#define FS_NO_GLOBALS` before every `#include \"FS.h\"`. \n\n  - Downgrade the SD library to version 1.1.1\n    \u003cimg src=https://raw.githubusercontent.com/wiki/tobozo/ESP8266SDUpdater/img/library-manager.jpg\u003e\n\n  - If you still get the dreadful `#error Architecture or board not supported`:\n\n    - Double check with the compile logs where it says: \n    ```\n        Multiple libraries were found for \"SD.h\"\n          Used: ~/Arduino/libraries/SD\n          Not used: ~/Arduino/packages/esp8266/hardware/esp8266/2.3.0/libraries/SD\n    ```\n    \n    - Copy the path to the offending SD library folder from the error message.\u003cbr\u003eIn the error message example the path is `~/Arduino/libraries/SD/` but the path may vary depending on the user prefs.\u003cbr\u003e\n    If you only see one path, and it's leading to the esp8266 folder, don't follow the next step and [open an issue](https://github.com/tobozo/ESP8266SDUpdater/issues/new).\n    \n    - Delete the folder `rm -Rf ~/Arduino/libraries/SD/`. By doing this, the sdk will use the built-in ESP8266 SD library instead of the updated version.\n\n  Don't worry, you can still get the other SD.h back by performing a simple update check through the library manager.\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n**Compiler error**: `error XXXX was not declared in this scope` for one of the following objects:\n\n  `FS, File, Dir, SeekMode, SeekSet, SeekCur, SeekEnd, FSInfo`\n\n  - **Solution**: prefix all FS object calls with `fs::` (i.e. `FS` =\u003e `fs::FS`, `File` =\u003e `fs::File`, `FSInfo` =\u003e `fs::FSInfo`) until no further error is found.\n\n\nCredits\n-------\n- [Hayri](https://www.tindie.com/stores/PhoenixCNC/) for providing the [OLEDiESP](https://www.tindie.com/products/PhoenixCNC/olediesp-a-tiny-cube-with-esp07--esp12--oled-iot/) to play with.\n- [Reaper7](https://github.com/reaper7/) for providing inspiration with his [SPIFFS Update Firmware](https://github.com/reaper7/ESP8266SPIFFSUpdateFirmware) project.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobozo%2Fesp8266sdupdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobozo%2Fesp8266sdupdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobozo%2Fesp8266sdupdater/lists"}