{"id":29013896,"url":"https://github.com/armmbed/mbed-os-example-blinky","last_synced_at":"2026-02-04T17:02:30.686Z","repository":{"id":10222316,"uuid":"59878365","full_name":"ARMmbed/mbed-os-example-blinky","owner":"ARMmbed","description":"Blinky example for Mbed OS 6.0","archived":false,"fork":false,"pushed_at":"2023-02-28T15:20:28.000Z","size":370,"stargazers_count":42,"open_issues_count":4,"forks_count":157,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-25T20:12:21.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","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/ARMmbed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2016-05-28T05:09:59.000Z","updated_at":"2024-08-19T19:28:42.000Z","dependencies_parsed_at":"2025-06-25T20:12:25.433Z","dependency_job_id":"25e735d2-2c76-4c93-b5cf-d3ab99ee2f67","html_url":"https://github.com/ARMmbed/mbed-os-example-blinky","commit_stats":null,"previous_names":[],"tags_count":121,"template":false,"template_full_name":null,"purl":"pkg:github/ARMmbed/mbed-os-example-blinky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARMmbed%2Fmbed-os-example-blinky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARMmbed%2Fmbed-os-example-blinky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARMmbed%2Fmbed-os-example-blinky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARMmbed%2Fmbed-os-example-blinky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARMmbed","download_url":"https://codeload.github.com/ARMmbed/mbed-os-example-blinky/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARMmbed%2Fmbed-os-example-blinky/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"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":[],"created_at":"2025-06-25T20:12:19.952Z","updated_at":"2026-02-04T17:02:30.680Z","avatar_url":"https://github.com/ARMmbed.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./resources/official_armmbed_example_badge.png)\n# Blinky Mbed OS example\n\nThe example project is part of the [Arm Mbed OS Official Examples](https://os.mbed.com/code/) and is the [getting started example for Mbed OS](https://os.mbed.com/docs/mbed-os/latest/quick-start/index.html). It contains an application that repeatedly blinks an LED on supported [Mbed boards](https://os.mbed.com/platforms/).\n\nYou can build the project with all supported [Mbed OS build tools](https://os.mbed.com/docs/mbed-os/latest/tools/index.html). However, this example project specifically refers to the command-line interface tools, [Arm Mbed CLI 1](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli) and [Mbed CLI 2](https://github.com/ARMmbed/mbed-tools#installation).\n\n(Note: To see a rendered example you can import into the Arm Online Compiler, please see our [import quick start](https://os.mbed.com/docs/mbed-os/latest/quick-start/online-with-the-online-compiler.html#importing-the-code).)\n\n## Mbed OS build tools\n\n### Mbed CLI 2\nStarting with version 6.5, Mbed OS uses Mbed CLI 2. It uses Ninja as a build system, and CMake to generate the build environment and manage the build process in a compiler-independent manner. If you are working with Mbed OS version prior to 6.5 then check the section [Mbed CLI 1](#mbed-cli-1).\n1. [Install Mbed CLI 2](https://os.mbed.com/docs/mbed-os/latest/build-tools/install-or-upgrade.html).\n1. From the command-line, import the example: `mbed-tools import mbed-os-example-blinky`\n1. Change the current directory to where the project was imported.\n\n### Mbed CLI 1\n1. [Install Mbed CLI 1](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).\n1. From the command-line, import the example: `mbed import mbed-os-example-blinky`\n1. Change the current directory to where the project was imported.\n\n## Application functionality\n\nThe `main()` function is the single thread in the application. It toggles the state of a digital output connected to an LED on the board.\n\n**Note**: This example requires a target with RTOS support, i.e. one with `rtos` declared in `supported_application_profiles` in `targets/targets.json` in [mbed-os](https://github.com/ARMmbed/mbed-os). For non-RTOS targets (usually with small memory sizes), please use [mbed-os-example-blinky-baremetal](https://github.com/ARMmbed/mbed-os-example-blinky-baremetal) instead.\n\n## Building and running\n\n1. Connect a USB cable between the USB port on the board and the host computer.\n1. Run the following command to build the example project and program the microcontroller flash memory:\n\n    * Mbed CLI 2\n\n    ```bash\n    $ mbed-tools compile -m \u003cTARGET\u003e -t \u003cTOOLCHAIN\u003e --flash\n    ```\n\n    * Mbed CLI 1\n\n    ```bash\n    $ mbed compile -m \u003cTARGET\u003e -t \u003cTOOLCHAIN\u003e --flash\n    ```\n\nYour PC may take a few minutes to compile your code.\n\nThe binary is located at:\n* **Mbed CLI 2** - `./cmake_build/\u003cTARGET\u003e/develop/\u003cTOOLCHAIN\u003e/mbed-os-example-blinky.bin`\n* **Mbed CLI 1** - `./BUILD/\u003cTARGET\u003e/\u003cTOOLCHAIN\u003e/mbed-os-example-blinky.bin`\n\nAlternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.\n\n## Expected output\nThe LED on your target turns on and off every 500 milliseconds.\n\n\n## Troubleshooting\nIf you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.\n\n## Related Links\n\n* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).\n* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html).\n* [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html).\n* [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html).\n* [Mbed boards](https://os.mbed.com/platforms/).\n\n### License and contributions\n\nThe software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more info.\n\nThis project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmmbed%2Fmbed-os-example-blinky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmmbed%2Fmbed-os-example-blinky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmmbed%2Fmbed-os-example-blinky/lists"}