{"id":21070730,"url":"https://github.com/microbit-foundation/mbedos-microbit-v2-starter","last_synced_at":"2025-07-22T17:02:56.418Z","repository":{"id":43316643,"uuid":"186435490","full_name":"microbit-foundation/mbedos-microbit-v2-starter","owner":"microbit-foundation","description":"Starter project for Mbed OS with the micro:bit V2","archived":false,"fork":false,"pushed_at":"2022-04-21T16:16:55.000Z","size":203,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-16T05:37:28.915Z","etag":null,"topics":["microbit"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microbit-foundation.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}},"created_at":"2019-05-13T14:24:45.000Z","updated_at":"2023-09-15T17:31:25.000Z","dependencies_parsed_at":"2022-09-15T17:40:43.153Z","dependency_job_id":null,"html_url":"https://github.com/microbit-foundation/mbedos-microbit-v2-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/microbit-foundation/mbedos-microbit-v2-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fmbedos-microbit-v2-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fmbedos-microbit-v2-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fmbedos-microbit-v2-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fmbedos-microbit-v2-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microbit-foundation","download_url":"https://codeload.github.com/microbit-foundation/mbedos-microbit-v2-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fmbedos-microbit-v2-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266535676,"owners_count":23944274,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["microbit"],"created_at":"2024-11-19T18:48:08.393Z","updated_at":"2025-07-22T17:02:56.391Z","avatar_url":"https://github.com/microbit-foundation.png","language":"C","funding_links":[],"categories":["©️ C/C++"],"sub_categories":["🗿 JavaScript Tools"],"readme":"# Example micro:bit V2 project for Mbed OS\n\n## Table of contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Building This Project](#building-this-project)\n- [Visual Studio Code](#visual-studio-code)\n- [Using NFC](#using-nfc)\n- [License](#license)\n- [Code of Conduct](#code-of-conduct)\n\n\n## Features\n\nThis is a basic Mbed OS project for [micro:bit V2](https://microbit.org/new-microbit/).\n\n\n## Requirements\n\n- [Git](https://git-scm.com/downloads)\n- [Mercurial](https://www.mercurial-scm.org/downloads)\n- [Arm GCC](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)\n    - v7.3.1 is the oldest and v10.2.1 the last tested versions\n- Python 3\n    - Tested with Python 3.7.12\n- [Mbed CLI](https://github.com/ARMmbed/mbed-cli)\n    - v1.10.2, and v1.10.5 are the last tested versions\n    - Can be installed using one of the methods from the official documentation:\n      https://os.mbed.com/docs/mbed-os/v6.15/build-tools/install-and-set-up.html\n    - The installers are outdated and not recommended\n    - If installed via pip a virtual environment is recommended\n\n\n## Building This Project\n\n### Available Targets\n\nThis project contains multiple Mbed OS \"targets\" for different versions of the\nmicro:bit V2 board and for the Nordic nRF52833 DK development board.\n\n- `nrf52_microbit_v2`: Target for all production micro:bit V2 board versions.\n- `nrf52833_dk`: For the Nordic nRF52833 DK board (useful for testing).\n\nOther targets are available for micro:bit V2 prototype boards, and their\nnames can be found in the [mbed_app.json](mbed_app.json) file.\nThese are essentially the same as the `nrf52_microbit_v2` target, but for code\nto support multiple boards it is useful to have different target names to be\nable to do conditional compilation of pins, I2C addresses, etc, as shown in the\n[sensors.cpp example](examples/sensors.cpp) code.\n\nEven older prototype targets can be found in the `mbedos-softdevice` branch.\n\nThe version of the micro:bit V2 board can be seen on the silkscreen at the\nback, near the right side of the edge connector.\n\n#### Interface MCU\n\nThe micro:bit V2.2 contains an nRF52 microcontroller as the\n[Interface MCU](https://tech.microbit.org/software/daplink-interface/) and Mbed\nOS targets has been created to be able to create Mbed OS project for these\nmicrocontrollers as well.\n\n- `nrf52_microbit_v2_if_820`: Target for micro:bit V2.2 with a nRF52820\n  Interface MCU.\n- `nrf52_microbit_v2_if_833`: For a micro:bit V2.2 with a nRF52833 Interface\n  MCU. This target is configured to be identical to the nrf52820 builds\n  (including reduced RAM \u0026 Flash), with the only difference being some pin\n  assignments.\n\n### Initialise the Project\n\nNote that for the `mbed target ...` line you should select the right target\nfor your board.\n\n```\ngit clone https://github.com/microbit-foundation/mbedos-microbit-v2-starter.git\ncd mbedos-microbit-v2-starter\nmbed config root .\nmbed target nrf52_microbit_v2\nmbed toolchain GCC_ARM\nmbed deploy\n```\n\nIf it fails to install some of the Python dependencies on the last command\n(`mbed deploy`) you can try to install them manually.\n\nRun this command in the Python environment that has `mbed-cli` installed:\n\n```\npip install -r mbed-os/requirements.txt\n```\n\n**Warning:** Do not use `mbed new .` as it can update MbedOS to the latest\nversion, and this is often unwanted.\n\n### Build\n\n```\nmbed compile\n```\n\nOr if you want to manually add the flags previously configured in the project\non the \"Initialise\" section:\n\n```\nmbed compile -m nrf52_microbit_v2 -t GCC_ARM\n```\n\nBuild output can be found in: `./BUILD/NRF52_MICROBIT_V2/GCC_ARM/mbedos-microbit-v2-starter.hex`\n\nIf `mbed` cannot find the tools directory in mbed-os, then you may have to\ndelete the mbed cache by removing `~/.mbed/`.\n\n### Mbed OS Version\n\nThis repo is currently configured Mbed OS to version\n[6.13.0](https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-6.13.0).\n\nThe branch `mbedos-softdevice` (commit\n`9e185e9388cdd634ac4cc38f92a0bbf73af9c5b3`) is configured to\n[v5.12.4](https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.12.4), as\nthis is the last Mbed OS version to support the Nordic Soft Device BLE stack\nbefore it was switched to the Cordio BLE stack.\n\n### Mbed OS RTOS\n\nThis section needs to be updated to work with the Mbed OS v6 bare metal\nprofile.\n\nmbed_app.json:\n```\n{\n    \"requires\": [\n        \"bare-metal\",\n        \"drivers-usb\",\n        \"events\"\n    ],\n    \"target_overrides\": {\n        \"*\": {\n            \"target.c_lib\": \"small\"\n        }\n    }\n}\n```\n\n\n## Using NFC\n\nThe Mbed board target created for the micro:bit configures the NFC pins as GPIO\nas they are exposed via the Edge Connector to be used as normal GPIOs.\n\nTo change this and use them for NFC you can perform the following changes:\n- Mbed: Update the `mbed_app.json` file to include a remove macro entry in the micro:bit target.\n    ```\n    \"NRF52_MICROBIT_V2\": {\n        \"target.macros_remove\": [\"CONFIG_NFCT_PINS_AS_GPIOS\"]\n    }\n    ```\n\n\n## License\n\nAll files specific to this project are Apache License Version 2.0.\nPlease see the [LICENSE](LICENSE) file.\n\nSome files originated from the\n[Mbed OS project](https://github.com/ARMmbed/mbed-os), their copyright and\nlicense has been preserved in each file header.\n\n\n## Code of Conduct\n\nTrust, partnership, simplicity and passion are our core values we live and\nbreathe in our daily work life and within our projects. Our open-source projects\nare no exception. We have an active community which spans the globe and we\nwelcome and encourage participation and contributions to our projects by\neveryone. We work to foster a positive, open, inclusive and supportive\nenvironment and trust that our community respects the micro:bit code of conduct.\n\nPlease see our [code of conduct](https://microbit.org/safeguarding/) which\noutlines our expectations for all those that participate in our community and\ndetails on how to report any concerns and what would happen should breaches\noccur.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrobit-foundation%2Fmbedos-microbit-v2-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrobit-foundation%2Fmbedos-microbit-v2-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrobit-foundation%2Fmbedos-microbit-v2-starter/lists"}