Add instructions for building locally

This commit is contained in:
Tony Grosinger 2024-06-05 20:12:10 -07:00
parent 6b8cb53402
commit 8d870812a3

View File

@ -1,13 +1,41 @@
# 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)
NOTE: Try to keep the repo up to date as much as possible. Pull from the
upstream master and then rebase my branch on top of it.
[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.
## Instructions for building
Check out the website to learn more: https://zmk.dev/.
1. Install devcontainer cli
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
```sh
brew install devcontainer
```
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.