{"id":36624016,"url":"https://github.com/memfault/zephyr-esp32-example","last_synced_at":"2026-01-12T09:29:49.670Z","repository":{"id":213609756,"uuid":"733637956","full_name":"memfault/zephyr-esp32-example","owner":"memfault","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-21T17:14:41.000Z","size":54,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-11-21T19:14:52.385Z","etag":null,"topics":["esp32","memfault","sample","zephyr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memfault.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2023-12-19T19:29:42.000Z","updated_at":"2025-09-15T16:18:41.000Z","dependencies_parsed_at":"2024-06-13T16:17:19.164Z","dependency_job_id":"34a6db06-ad1d-4961-a39a-452efb7fb001","html_url":"https://github.com/memfault/zephyr-esp32-example","commit_stats":null,"previous_names":["memfault/zephyr-esp32c3-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/memfault/zephyr-esp32-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memfault%2Fzephyr-esp32-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memfault%2Fzephyr-esp32-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memfault%2Fzephyr-esp32-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memfault%2Fzephyr-esp32-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memfault","download_url":"https://codeload.github.com/memfault/zephyr-esp32-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memfault%2Fzephyr-esp32-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","memfault","sample","zephyr"],"created_at":"2026-01-12T09:29:49.603Z","updated_at":"2026-01-12T09:29:49.665Z","avatar_url":"https://github.com/memfault.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memfault Zephyr + ESP32 Example\n\nThis sample app is based on the Zephyr `samples/net/wifi` example. It\ndemonstrates a Zephyr + ESP32 integration with the Memfault SDK. It has been\ntested on the following boards:\n\n- `esp32s3_devkitm/esp32s3/procpu` (default board)\n- `esp32c3_devkitm`*\n\n\\* _NOTE: Currently does not have support for data upload. Export chunks to memfault with `mflt export` and upload via the [chunks debug log](https://mflt.io/chunks-debug).\n\n## Getting Started\n\nThe Memfault Zephyr integration guide is an excellent reference, and documents\nhow the Memfault SDK was added to the base example app:\n\nhttps://docs.memfault.com/docs/mcu/zephyr-guide\n\nTo try out this example app:\n\n1. Set up the Zephyr prerequisites: https://docs.zephyrproject.org/latest/develop/getting_started/index.html\n2. Create a zephyr workspace and set it up with this project:\n\n   ```bash\n   mkdir zephyr-workspace\n   cd zephyr-workspace\n   west init -m https://github.com/memfault/zephyr-esp32-example\n   west update\n   ```\n\n3. Build the example app:\n\n   ```bash\n   west build zephyr-esp32-example --sysbuild\n   ```\n\n   `--sysbuild` will build the MCUboot image as well, which will also get\n   flashed in the following step. To run sysbuild by default, you can configure\n   your workspace with `west config --local build.sysbuild True`.\n\n4. Flash the example app:\n\n   ```bash\n    west flash\n   ```\n\n5. Open a serial console and interact with the sample app shell. For example\n   using PySerial:\n\n   ```bash\n   # select the correct serial port for your system\n   pyserial-miniterm --raw /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_1cd857b4d5a0eb11bf35cdacdf749906-if00-port0 115200\n\n   uart:~$ mflt get_device_info\n   [00:09:21.911,000] \u003cinf\u003e mflt: S/N: DEMOSERIAL\n   [00:09:21.911,000] \u003cinf\u003e mflt: SW type: zephyr-app\n   [00:09:21.911,000] \u003cinf\u003e mflt: SW version: 0.0.1727a85c\n   [00:09:21.911,000] \u003cinf\u003e mflt: HW version: esp32c3_devkitm\n\n   # connect wifi\n   uart:~$ wifi connect -s \"\u003cssid\u003e\" -k \u003ckey type\u003e -p \"\u003cpw\u003e\"\n\n   # test memfault export over uart\n   uart:~$ mflt export\n   MC:CAKnAgIDAQpqemVwaHlyLWFwcAltMS4wLjArZDU5MmRhOAZvZXNwMzJjM19kZXZraXRtC0Z1sxH2/usEogEABQAISg==:\n   ```\n\n## Testing OTA\n\nThe payload to upload to Memfault is:\n\n```plaintext\nbuild/zephyr-esp32-example/zephyr/zephyr.signed.confirmed.bin\n```\n\nThis file is set as \"confirmed\", so it won't revert after 1 boot cycle (not safe\nagainst bootloops!). See the [Zephyr documentation](https://docs.zephyrproject.org/apidoc/3.6.0/group__mcuboot__api.html#ga95ccc9e1c7460fec16b9ce9ac8ad7a72) for details.\n\nFollow the normal Memfault OTA workflow:\n\n1. build and flash an image with a version like `0.0.1` (see the\n   [`VERSION`](VERSION) file for setting an application version).\n2. rebuild with a newer version, `0.0.2`\n3. upload the `zephyr.signed.confirmed.bin` file to a [Memfault\n   Release](https://mflt.io/releases) named `0.0.2`.\n4. deploy the `0.0.2` release to the cohort with the device (`default` unless\n   changed)\n5. on the device shell, connect wifi with `wifi connect \u003cssid\u003e \u003cpw\u003e`, and\n   trigger the OTA with `mflt get_latest_release`\n6. when the device reboots, confirm the new version is set with `mflt get_device_info`\n\n\u003e [!NOTE]\n\u003e\n\u003e If this error occurs when applying the new image:\n\u003e\n\u003e ```plaintext\n\u003e [00:10:07.255,000] \u003cdbg\u003e mflt: memfault_platform_log: Error requesting upgrade, rv=-14\n\u003e [00:10:07.260,000] \u003cerr\u003e mflt: Error upgrading firmware, rv=-1\n\u003e ```\n\u003e\n\u003e It may be necessary to run `mcuboot erase 2` one time before running the test,\n\u003e to wipe the secondary slot so it's ready to receive the new image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemfault%2Fzephyr-esp32-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemfault%2Fzephyr-esp32-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemfault%2Fzephyr-esp32-example/lists"}