{"id":14967269,"url":"https://github.com/brilliantlabsar/monocle-micropython","last_synced_at":"2026-03-10T18:05:33.977Z","repository":{"id":62233968,"uuid":"549223980","full_name":"brilliantlabsAR/monocle-micropython","owner":"brilliantlabsAR","description":"Micropython ported to the Monocle","archived":false,"fork":false,"pushed_at":"2024-04-06T22:57:37.000Z","size":16858,"stargazers_count":224,"open_issues_count":22,"forks_count":28,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T11:12:58.594Z","etag":null,"topics":["micropython","monocle-ar","nrf52"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brilliantlabsAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-10T21:42:05.000Z","updated_at":"2025-04-02T19:19:35.000Z","dependencies_parsed_at":"2022-10-28T22:45:24.248Z","dependency_job_id":"f5d77eaa-cab1-4ce3-a775-9c2432723ea3","html_url":"https://github.com/brilliantlabsAR/monocle-micropython","commit_stats":{"total_commits":648,"total_committers":6,"mean_commits":108.0,"dds":0.3070987654320988,"last_synced_commit":"4091ae6d61d7f733672557cb6d69b9cce14fbe71"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brilliantlabsAR%2Fmonocle-micropython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brilliantlabsAR%2Fmonocle-micropython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brilliantlabsAR%2Fmonocle-micropython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brilliantlabsAR%2Fmonocle-micropython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brilliantlabsAR","download_url":"https://codeload.github.com/brilliantlabsAR/monocle-micropython/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"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":["micropython","monocle-ar","nrf52"],"created_at":"2024-09-24T13:37:45.720Z","updated_at":"2026-03-10T18:05:33.937Z","avatar_url":"https://github.com/brilliantlabsAR.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroPython for Monocle\n\nA custom deployment of MicroPython designed specifically for Monocle. Check out the user docs [here](https://docs.brilliant.xyz).\n\nFor those of you who want to modify the standard firmware, keep on reading.\n\n## Getting started with development\n\n1. Ensure you have the [ARM GCC Toolchain](https://developer.arm.com/downloads/-/gnu-rm) installed.\n\n1. Ensure you have the [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools) installed.\n\n1. Clone this repository along with submodules and build the mpy-cross toolchain:\n\n    ```sh\n    git clone https://github.com/brilliantlabsAR/monocle-micropython.git\n    cd monocle-micropython\n\n    git submodule update --init\n    git -C micropython submodule update --init lib/micropython-lib\n\n    make -C micropython/mpy-cross\n    ```\n\n1. You should now be able to build the project by calling `make` from the `monocle-micropython` folder.\n\n    ```sh\n    make\n    ```\n\n1. Before flashing an nRF5340, you may need to unlock the chip first.\n\n    ```sh\n    nrfjprog --recover\n    ```\n\n1. You should then be able to flash the device.\n\n    ```sh\n    make flash\n    ```\n\n### Debugging\n\n1. Open the project in [VSCode](https://code.visualstudio.com).\n\n    There are some build tasks already configured within `.vscode/tasks.json`. Access them by pressing `Ctrl-Shift-P` (`Cmd-Shift-P` on MacOS) → `Tasks: Run Task`.\n\n    1. Build\n    1. Build \u0026 Flash Chip\n    1. Erase \u0026 Unlock Chip\n    1. Clean\n\n1. Connect your debugger as described [here](https://docs.brilliant.xyz/monocle/monocle/#manually-programming).\n\n1. You many need to unlock the device by using the `Erase Chip` task before programming or debugging.\n\n1. To enable IntelliSense, be sure to select the correct compiler from within VSCode. `Ctrl-Shift-P` (`Cmd-Shift-P` on MacOS) → `C/C++: Select IntelliSense Configuration` → `Use arm-none-eabi-gcc`.\n\n1. Install the [Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) extension for VSCode in order to enable debugging.\n\n1. A debugging launch is already configured within `.vscode/launch.json`. Run the `J-Link` launch configuration from the `Run and Debug` panel, or press `F5`. The project will automatically build and flash before launching.\n\n1. To monitor the logs, run the task `RTT Console` and ensure the `J-Link` launch configuration is running.\n\n### Generating final release `.hex` and DFU `.zip` files\n\n1. Download and install [nrfutil](https://www.nordicsemi.com/Products/Development-tools/nRF-Util) including the `nrf5sdk-tools` package:\n\n    ```sh\n    chmod +x nrfutil\n    # Make sure to add nrfutil to your path\n    nrfutil install nrf5sdk-tools\n    ```\n\n1. Generate a settings file:\n\n    ```sh\n    nrfutil settings generate --family NRF52 --application build/application.hex --application-version 0 --bootloader-version 0 --bl-settings-version 2 build/settings.hex\n    ```\n\n1. Download and install the `mergehex` tool which is a part of the [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools).\n\n1. Merge the settings, bootloader, softdevice and application hex files:\n\n    ```sh\n    mergehex -m build/settings.hex build/application.hex softdevice/s132_nrf52_7.3.0_softdevice.hex bootloader/build/nrf52832_xxaa_s132.hex -o build/release.hex\n    ```\n\n1. Create the DFU zip package using the command:\n\n    ```sh\n    nrfutil pkg generate --hw-version 52 --application-version 0 --application build/application.hex --sd-req 0x0124 --key-file bootloader/published_privkey.pem build/release.zip\n    ```\n    \n## FPGA\n\nFor information on developing and flashing the FPGA binary. Check the [Monocle FPGA](https://github.com/brilliantlabsAR/monocle-fpga) repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrilliantlabsar%2Fmonocle-micropython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrilliantlabsar%2Fmonocle-micropython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrilliantlabsar%2Fmonocle-micropython/lists"}