From 8fded1f0bfdc9b66f55534a804746898e3f1bbd7 Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Wed, 5 Jun 2024 20:12:10 -0700 Subject: [PATCH] Add instructions for building locally --- README.md | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f112b0f9..6bc6fbba 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,38 @@ -# Zephyr™ Mechanical Keyboard (ZMK) Firmware +# ZMK -[![Discord](https://img.shields.io/discord/719497620560543766)](https://zmk.dev/community/discord/invite) -[![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) +## Instructions for building -[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. +1. Install devcontainer cli -Check out the website to learn more: https://zmk.dev/. + ```sh + brew install devcontainer + ``` -You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite). +2. Setup the devcontainer + + ```sh + devcontainer up --workspace-path . --docker-path $(which podman) + ``` + +3. Initialize west (this takes a while) + + ```sh + devcontainer exec --workspace-path . --docker-path $(which podman) + west init -l app/ + west update + ``` + +4. Build the firmware + + ```sh + cd app + west build --pristine -b nice_nano_v2 -- -DSHIELD=chrysemys + ``` + +5. Copy the uf2 file onto the root of the USB mass storage for the keyboard. The uf2 file can be found at `app/build/zephyr/zmk.uf2`. + +## Documentation + +- [Docker setup](https://zmk.dev/docs/development/setup/docker) +- [Building](https://zmk.dev/docs/development/build-flash) -To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.