{"id":17053131,"url":"https://github.com/bschwind/esp-32-build","last_synced_at":"2025-03-23T05:23:26.976Z","repository":{"id":140637222,"uuid":"71061164","full_name":"bschwind/esp-32-build","owner":"bschwind","description":"A Dockerfile for building and flashing ESP32 applications","archived":false,"fork":false,"pushed_at":"2019-05-18T00:22:20.000Z","size":10,"stargazers_count":34,"open_issues_count":1,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T17:51:48.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/bschwind.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":"2016-10-16T16:02:10.000Z","updated_at":"2024-09-27T21:39:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"978356b7-9788-4290-8771-72eb5ab8d6a6","html_url":"https://github.com/bschwind/esp-32-build","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/bschwind%2Fesp-32-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bschwind%2Fesp-32-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bschwind%2Fesp-32-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bschwind%2Fesp-32-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bschwind","download_url":"https://codeload.github.com/bschwind/esp-32-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245058861,"owners_count":20554183,"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":[],"created_at":"2024-10-14T10:11:25.081Z","updated_at":"2025-03-23T05:23:26.946Z","avatar_url":"https://github.com/bschwind.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"esp-32 Build Environment\n===============================\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/bschwind/esp-32-build.svg)](https://hub.docker.com/r/bschwind/esp-32-build/) [![Docker Stars](https://img.shields.io/docker/stars/bschwind/esp-32-build.svg)](https://hub.docker.com/r/bschwind/esp-32-build/) [![](https://images.microbadger.com/badges/image/bschwind/esp-32-build.svg)](https://microbadger.com/images/bschwind/esp-32-build \"Get your own image badge on microbadger.com\") [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/bschwind/esp-32-build/blob/master/LICENSE)\n\nThis Dockerfile contains the dependencies necessary to build and flash programs for the ESP32 chip.\n\nDependencies\n------------\n- [Docker](https://www.docker.com/products/docker-toolbox)\n- [Virtualbox](https://www.virtualbox.org/wiki/Downloads) (if you're not on Linux)\n\nQuick Setup\n-----------\n\n* `docker pull bschwind/esp-32-build`\n* `cd` to your esp-32 project\n* Without USB flashing support: `docker run --rm -it -v $(PATH_TO_ESP_IDF):/esp/esp-idf -v $(PATH_TO_YOUR_PROJECT):/esp/project bschwind/esp-32-build /bin/bash`\n* With USB flashing support: `docker run --rm -it --privileged -v /dev/bus/usb:/dev/bus/usb -v $(PATH_TO_ESP_IDF):/esp/esp-idf -v $(PATH_TO_YOUR_PROJECT):/esp/project bschwind/esp-32-build /bin/bash`\n\nEither step will put you in an interactive shell inside the container. If you have a Makefile in your project directory, you can immediately\nrun `make` and your source should get compiled. `make flash` will attempt to flash the code to `/dev/ttyUSB0`.\n\nFlashing Images from the Container\n----------------------------------\n\nIf you're on docker-machine (OS X or Windows), you need to forward your USB device within Virtualbox. This is best managed in the VirtualBox GUI.\n\nSteps:\n\n* Stop your docker virtual machine host, if applicable\n* Plug in the USB serial device you will use to flash to the ESP8266\n* Install [virtualbox extensions](https://www.virtualbox.org/wiki/Downloads) to support USB (Ctrl-F \"extension\" on that page)\n  * OS X -\u003e Under \"Virtualbox\" -\u003e Preferences, go to the Extensions tab\n  * Windows -\u003e Same thing?\n  * Click the \"Adds new package\" button and select the extension pack you downloaded\n* Return to the main VirtualBox GUI\n* Right click on your docker VM and select \"Settings\"\n* Select \"Ports\" -\u003e \"USB\"\n* Check the box \"Enable USB Controller\" and select \"USB 2.0 (EHCI) Controller\"\n* Under \"USB Device Filters\" click the USB icon with the green plus sign to add a USB device\n* Select your USB serial device (in my case it was \"FTDI FT232R USB UART [0600]\")\n* Click OK until you're back to the main Virtualbox GUI\n* At this point you can restart your virtual machine with `docker-machine start \u003cYOUR_DOCKER_VM_NAME\u003e`\n* Run docker as we did in Quick Setup: `docker run --rm -it --privileged -v /dev/bus/usb:/dev/bus/usb -v $(PWD):/esp/project bschwind/esp-32-build /bin/bash`\n  * NOTE: With the `-v /dev/bus/usb:/dev/bus/usb` volume, the `/dev/bus/usb` on the lefthand side of the colon refers to docker VM's USB directory, *not* your host machine (you likely won't find that path on OS X)\n* `/dev/ttyUSB0` should now be available\n* Run `make` and then `make flash` on an example project or your own\n\nIf you're on Linux, it should be sufficient to share your USB device either as a docker volume or with the `--device` flag. However, I have not yet tested Linux.\n\nSerial Debugging\n----------------\n\n[Picocom](https://github.com/npat-efault/picocom) is installed in this image by default. Invoke it with `picocom -b 115200 /dev/ttyUSB0` (change the baud rate and device path accordingly)\n\nStop it with `Ctrl-A Ctrl-X`\n\nPRO TIP\n-------\n\nYou can change the baud rate and other properties with `make menuconfig` which will drop you in esp-idf's project configuration menu. I recommend selecting a baud rate of 921600 as it will reduce flashing times to around 4-5 seconds.\n\nUsing ccache\n--------------\n\n* `docker pull bschwind/esp-32-build`\n* `cd` to your esp-32 project\n* create the ccache persistent directory\n  `docker create -v /mnt/ccache:/ccache --name ccache bschwind/esp-32-build`\n* `docker run --rm -it -v $(PATH_TO_ESP_IDF):/esp/esp-idf -v $(PATH_TO_YOUR_PROJECT):/esp/project -e CCACHE_DIR=/ccache --volumes-from ccache bschwind/esp-32-build /bin/bash`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbschwind%2Fesp-32-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbschwind%2Fesp-32-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbschwind%2Fesp-32-build/lists"}