{"id":37020211,"url":"https://github.com/dkaukov/esp32-flash","last_synced_at":"2026-01-14T02:16:34.768Z","repository":{"id":292848914,"uuid":"982140626","full_name":"dkaukov/esp32-flash","owner":"dkaukov","description":"Java library for flashing firmware to ESP32 devices","archived":false,"fork":false,"pushed_at":"2025-09-09T01:38:24.000Z","size":1265,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T18:44:58.560Z","etag":null,"topics":["esp32","expressif","java","library","serial"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkaukov.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-12T12:39:45.000Z","updated_at":"2025-09-30T00:13:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"e58fb700-824b-4c67-a8e3-0a44f55372ad","html_url":"https://github.com/dkaukov/esp32-flash","commit_stats":null,"previous_names":["dkaukov/esp32-flash"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/dkaukov/esp32-flash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaukov%2Fesp32-flash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaukov%2Fesp32-flash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaukov%2Fesp32-flash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaukov%2Fesp32-flash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkaukov","download_url":"https://codeload.github.com/dkaukov/esp32-flash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaukov%2Fesp32-flash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["esp32","expressif","java","library","serial"],"created_at":"2026-01-14T02:16:34.004Z","updated_at":"2026-01-14T02:16:34.750Z","avatar_url":"https://github.com/dkaukov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 Flash\n\n**ESP32 Flash** is a Java library for flashing firmware to ESP32 devices using the serial protocol implemented in the ESP32 ROM bootloader and esptool stub loader. It provides a fluent, modular, and extensible API for embedding ESP flashing logic into your own tools or UIs.\n\n## ✨ Features\n\n* 🧱 **Modular Core Library** — Just bring your own `SerialTransport`.\n* 🔁 **ROM \u0026 Stub Protocol Support** — Handles both ESP32 ROM bootloader and stub loader protocols.\n* 📦 **Fluent API** — Easily script multi-step flashing processes in one expressive chain.\n* 🧪 **Optional Flash Verification** — Built-in MD5 verification for written regions.\n* 📊 **Callback Hooks** — Track progress and status updates during operations.\n\n## 🔧 You Provide the Transport\n\nThis is a library — it does **not** bundle a serial port implementation.\nYou must provide a `SerialTransport` implementation suitable for your environment (e.g., JSSC, RXTX, jSerialComm, or your own).\n\n```java\npublic interface SerialTransport {\n    int read(byte[] buffer, int length);\n    void write(byte[] buffer, int length);\n    void setControlLines(boolean dtr, boolean rts);\n}\n```\n\nThis keeps the core clean, platform-agnostic, and easy to integrate into desktop or embedded Java applications.\n\n## 💡 Example: Fluent API Usage\n\n```java\nEspFlasherApi.connect(getComPort())\n    .withCallBack(getCallBack())\n    .withBaudRate(EspFlasherApi.ESP_ROM_BAUD_HIGH, comPort::setBaudRate)\n    .chipDetect()\n    .loadStub()\n    .eraseFlash()\n    .withStub(stub -\u003e stub\n        .withCompression(false)\n        .writeFlash(stub.getChipId().getRegion(FlashRegion.BOOTLOADER), stub.readResource(\"{chip}/Blink.ino.bootloader.bin\"), true)\n        .writeFlash(stub.getChipId().getRegion(FlashRegion.PARTITION_TABLE), stub.readResource(\"{chip}/Blink.ino.partitions.bin\"), true)\n        .writeFlash(stub.getChipId().getRegion(FlashRegion.APP_BOOTLOADER), stub.readResource(\"{chip}/boot_app0.bin\"), true)\n        .withCompression(true)\n        .writeFlash(stub.getChipId().getRegion(FlashRegion.APP_0), stub.readResource(\"{chip}/Blink.ino.bin\"), true))\n    .reset();\n```\n\n## 📦 Project Structure\n\n* `esp32-flash-lib` — Core flashing library, reusable in any Java app.\n* `esp32-flash-example` — Basic runnable example showing how to integrate the library with a real serial port and flashing flow.\n\n## ▶️ Getting Started\n\n### Requirements\n\n* Java 11+\n* Maven\n\n### Build the Library\n\n```bash\ngit clone https://github.com/dkaukov/esp32-flash.git\ncd esp32-flash\nmvn clean install\n```\n\n### Run the Example\n\n```bash\ncd esp32-flash-example\nmvn exec:java -Dexec.mainClass=\"org.dkaukov.esp32.EspLoader\"\n```\n\nReplace `\"your.Main\"` with the correct entry point in your code.\n\n## 📁 Resources\n\nPlace your binaries (`bootloader.bin`, `partitions.bin`, `app.bin`, etc.) in your resource path or use your own binary loader.\n\n## 📜 License\n\nThis project is licensed under the terms of the [GPL-3.0 License](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaukov%2Fesp32-flash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkaukov%2Fesp32-flash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaukov%2Fesp32-flash/lists"}