From e9c2b84c8258499d7e9f2a05a5b88d71718fdc88 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 4 Aug 2020 13:41:07 -0400 Subject: Initial setup.sh version. --- docs/static/setup.sh | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 docs/static/setup.sh (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh new file mode 100644 index 0000000..c277449 --- /dev/null +++ b/docs/static/setup.sh @@ -0,0 +1,104 @@ +#!/bin/sh + +set -e + +repo_path="https://github.com/zmkfirmware/zmk-config-split-template.git" +title="ZMK Config Setup:" + + +# TODO: Check for git being installed +# TODO: Check for user.name and user.email git configs being set + +prompt="Pick an MCU board:" +options=("nice!nano" "QMK Proton-C") + +echo "$title" +echo "" +echo "MCU Board Selection:" +PS3="$prompt " +select opt in "${options[@]}" "Quit"; do + + case "$REPLY" in + + 1 ) board="nice_nano"; break;; + 2 ) board="proton_c"; break;; + + $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; + *) echo "Invalid option. Try another one.";continue;; + + esac +done + +#read -p "Is this board a complete keyboard [yN]: " complete +#echo "$complete" + +echo "" +echo "Keyboard Shield Selection:" + +prompt="Pick an keyboard:" +options=("Kyria" "Lily58") + +PS3="$prompt " +select opt in "${options[@]}" "Other" "Quit"; do + + case "$REPLY" in + + 1 ) shield_title="Kyria" shield="kyria"; split="y"; break;; + 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; + + # Add link to docs on adding your own custom shield in your ZMK config! + $(( ${#options[@]}+1 )) ) echo "Other!"; break;; + $(( ${#options[@]}+2 )) ) echo "Goodbye!"; exit;; + *) echo "Invalid option. Try another one.";continue;; + + esac +done + +read -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user +if [ -n "$github_user" ]; then + read -p "GitHub Repo Name [zmk-config]: " repo_name + if [ -z "$repo_name" ]; then repo_name="zmk-config"; fi + + read -p "GitHub Repo [https://github.com/${github_user}/${repo_name}.git]: " github_repo + + if [ -z "$github_repo" ]; then github_repo="https://github.com/${github_user}/${repo_name}.git"; fi +else + repo_name="zmk-config" +fi + +echo "" +echo "Preparing a user config for:" +echo "* MCU Board: ${board}" +echo "* Shield: ${shield}" +if [ -n "$github_repo" ]; then + echo "* GitHub Repo To Push (please create this in GH first!): ${github_repo}" +fi + +echo "" +read -p "Continue? [Yn]: " do_it + +if [ -n "$do_it" ] && [ "$do_it" != "y" ]; then + echo "Aborting..." + exit +fi + +git clone --single-branch $repo_path ${repo_name} +cd ${repo_name} + +sed -i \ + -e "s/BOARD_NAME/$board/" \ + -e "s/SHIELD_NAME/$shield/" \ + -e "s/KEYBOARD_TITLE/$shield_title/" \ + .github/workflows/build.yml + +mv config/prj.conf "config/${shield}.conf" + +rm -rf .git +git init . +git add . +git commit -m "Initial User Config." + +if [ -n "$github_repo" ]; then + git remote add origin "$github_repo" + git push --set-upstream origin $(git branch --show-current) +fi -- cgit v1.3.1 From fedd4381c2ac5b76a12d6a6dd07e62af876949c8 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 4 Aug 2020 14:12:10 -0400 Subject: Initial user setup docs, setup script fixes. --- docs/docs/user-setup.md | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ docs/sidebars.js | 2 +- docs/static/setup.sh | 11 +++- 3 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 docs/docs/user-setup.md (limited to 'docs/static') diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md new file mode 100644 index 0000000..fba80ea --- /dev/null +++ b/docs/docs/user-setup.md @@ -0,0 +1,147 @@ +--- +id: user-setup +title: Installing ZMK +sidebar_label: Installing ZMK +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Unless other keyboard firmwares, ZMK Firmware has been built from the ground up to allow users to manage +their own keyboard configurations, including keymaps, specific hardware details, etc. all outside of the +core ZMK Firmware source repository. + +In addition to this, a focus has been made on avoiding requiring end users who don't intend to develop +new ZMK features from having to install a plethora of complicated dependencies just to use ZMK. + +## Summary + +The following steps can be taken to obtain an installable firmware image for your device, without the need +to install any compiler or specialized toolchain. This is possible by leveraging [GitHub Actions](https://github.com/features/actions) +to build your firmware for you in the cloud, which you can then download and flash to your device. + +Following the steps in this guide, you will: + +1. Create a new repository in GitHub that will contain your user config. +1. Download and run a small shell script that will automate most of the setup. The script will: + 1. Prompt you for which board (e.g. nice!nano) and shield (e.g. Lily58 or Kyria) you want to create a configuration for. + 1. Prompt you for your GitHub username and repo where the config should be pushed. + 1. Use `git` to clone a template repository that will be the basis for your user's config repository. + 1. Use the given board and shield to update the included GitHub Action to build for the correct hardware. + 1. Commit the initial version. + 1. (If info was provided) Push the local repo to your GitHub repository. +1. Add your own keymap overlay (`keymap.overlay`) file to the repository, and change your keymap. +1. Update the configuration flags for your user config, to enable/disable any ZMK features you would like to include. +1. Commit and push the updates to trigger a new GitHub Action run. + +## Prerequisites + +The remainder of this guide assumes the following prequisites: + +1. You have an active, working [GitHub](https://github.com/) account. +1. You have installed and configured the [`git`](https://git-scm.com/) version control tool. + +## GitHub Repo + +Before running the setup script, you will first need to create a new GitHub repository to host the config. + +1. Navigate to [https://github.com/new](https://github.com/new) +1. When prompted for the repo name, enter `zmk-config`. +1. The repository can be public or private +1. Do **not** check any of the options to initialize the repository with a README or other files. +1. Click "Create repository" + +## User Config Setup Script + +To start the setup process, run the following from your command line prompt: + + + + +``` +sh -c "$(curl -fsSL https://zmkfirmware.dev/setup.sh)" +``` + + + + +``` +sh -c "$(wget https://zmkfirmware.dev/setup.sh -O -)" +``` + + + + +### MCU Board Selection + +When prompted, enter the number for the corresponding MCU board you would like to target: + +``` +MCU Board Selection: +1) nice!nano +2) QMK Proton-C +3) Quit +Pick an MCU board: +``` + +### Keyboard Shield Selection + +When prompted, enter the number for the corresponding keyboard shield you would like to target: + +``` +Keyboard Shield Selection: +1) Kyria +2) Lily58 +3) Quit +Pick an keyboard: +``` + +### GitHub Details + +In order to have your new configuration automatically pushed, and then built using GitHub Actions, enter +some information about your particular GitHub info: + +``` +GitHub Username (leave empty to skip GitHub repo creation): petejohanson +GitHub Repo Name [zmk-config]: +GitHub Repo [https://github.com/petejohanson/zmk-config.git]: +``` + +Only the GitHub username is required; if you are happy with the defaults offered in the square brackets, you can simply hit `Enter`. + +### Confirming Selections + +The setup script will confirm all of your selections one last time, before performing the setup: + +``` +Preparing a user config for: +* MCU Board: nice_nano +* Shield: kyria +* GitHub Repo To Push (please create this in GH first!): https://github.com/petejohanson/zmk-config.git + +Continue? [Yn]: +``` + +After hitting `Enter` or typing `y`, the script will create an initial config in a directory named after the repo name, +update the GitHub Action YAML file, commit the initial version, and then push to your repo. + +:::info + +If you used the default GitHub repo URL using the `https://` scheme, you may be prompted for your username + password in order to +push the initial commit. + +::: + +## Accessing Built Firmware + +Once the setup script is complete and the new user config repository has been pushed, GitHub will automatically run the action +to build your keyboard firmware files. You can view the actions by clicking on the "Actions" tab on your GitHub repository. + +## Keymap Changes + +TODO: Document how to add your own keymap! diff --git a/docs/sidebars.js b/docs/sidebars.js index 1ed1bdb..f6369a5 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -1,6 +1,6 @@ module.exports = { someSidebar: { - "Getting Started": ["intro", "faq", "hardware"], + "Getting Started": ["intro", "hardware", "user-setup", "faq"], Development: [ "dev-clean-room", "dev-setup", diff --git a/docs/static/setup.sh b/docs/static/setup.sh index c277449..23ab42b 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -39,6 +39,8 @@ prompt="Pick an keyboard:" options=("Kyria" "Lily58") PS3="$prompt " +# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. +# select opt in "${options[@]}" "Other" "Quit"; do select opt in "${options[@]}" "Other" "Quit"; do case "$REPLY" in @@ -47,8 +49,8 @@ select opt in "${options[@]}" "Other" "Quit"; do 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! - $(( ${#options[@]}+1 )) ) echo "Other!"; break;; - $(( ${#options[@]}+2 )) ) echo "Goodbye!"; exit;; + # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; + $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; *) echo "Invalid option. Try another one.";continue;; esac @@ -101,4 +103,9 @@ git commit -m "Initial User Config." if [ -n "$github_repo" ]; then git remote add origin "$github_repo" git push --set-upstream origin $(git branch --show-current) + + # TODO: Support determing the actions URL when non-https:// repo URL is used. + if [ "${github_repo}" != "${github_repo#https://}" ]; then + echo "Your firmware should be available from the GitHub Actions shortly: ${github_url%.git}/actions" + fi fi -- cgit v1.3.1 From ccb9b9309a37f55e0aca3c79aa1d78214a42f701 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 7 Aug 2020 10:02:44 -0400 Subject: Script fixes, ability to prepopulate a keymap. * Use read w/ -i for initial default values. * Prompt for fetching keymap for customization, and grab latest from `main` if opted in. * Don't copy `prj.conf` from the template, pull the `.conf` from `main` also. --- docs/static/setup.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 23ab42b..a122994 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -7,6 +7,7 @@ title="ZMK Config Setup:" # TODO: Check for git being installed +# TODO: Check for curl being installed # TODO: Check for user.name and user.email git configs being set prompt="Pick an MCU board:" @@ -41,7 +42,7 @@ options=("Kyria" "Lily58") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. # select opt in "${options[@]}" "Other" "Quit"; do -select opt in "${options[@]}" "Other" "Quit"; do +select opt in "${options[@]}" "Quit"; do case "$REPLY" in @@ -56,12 +57,16 @@ select opt in "${options[@]}" "Other" "Quit"; do esac done -read -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user +read -e -p "Copy in the stock keymap for customization? [Yn]: " copy_keymap + +if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" ]; then copy_keymap="yes"; fi + +read -e -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user if [ -n "$github_user" ]; then - read -p "GitHub Repo Name [zmk-config]: " repo_name + read -e -i "zmk-config" -p "GitHub Repo Name: " repo_name if [ -z "$repo_name" ]; then repo_name="zmk-config"; fi - read -p "GitHub Repo [https://github.com/${github_user}/${repo_name}.git]: " github_repo + read -e -i "https://github.com/${github_user}/${repo_name}.git" -p "GitHub Repo: " github_repo if [ -z "$github_repo" ]; then github_repo="https://github.com/${github_user}/${repo_name}.git"; fi else @@ -72,6 +77,11 @@ echo "" echo "Preparing a user config for:" echo "* MCU Board: ${board}" echo "* Shield: ${shield}" +if [ "$copy_keymap" == "yes" ]; then + echo "* Copy Keymap?: ✓" +else + echo "* Copy Keymap?: ❌" +fi if [ -n "$github_repo" ]; then echo "* GitHub Repo To Push (please create this in GH first!): ${github_repo}" fi @@ -87,14 +97,22 @@ fi git clone --single-branch $repo_path ${repo_name} cd ${repo_name} +pushd config + +curl -O "https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/shields/${shield}/${shield}.conf" + +if [ "$copy_keymap" == "yes" ]; then + curl -O "https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/shields/${shield}/${shield}.keymap" +fi + +popd + sed -i \ -e "s/BOARD_NAME/$board/" \ -e "s/SHIELD_NAME/$shield/" \ -e "s/KEYBOARD_TITLE/$shield_title/" \ .github/workflows/build.yml -mv config/prj.conf "config/${shield}.conf" - rm -rf .git git init . git add . -- cgit v1.3.1 From 5039a508311bcd74c1aaef7542c3b6e1c6a01929 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 7 Aug 2020 23:35:48 -0400 Subject: Tweak git usage for backwards compatibility. * Closes #76 --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index a122994..1a72224 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -120,7 +120,7 @@ git commit -m "Initial User Config." if [ -n "$github_repo" ]; then git remote add origin "$github_repo" - git push --set-upstream origin $(git branch --show-current) + git push --set-upstream origin $(git symbolic-ref --short HEAD) # TODO: Support determing the actions URL when non-https:// repo URL is used. if [ "${github_repo}" != "${github_repo#https://}" ]; then -- cgit v1.3.1 From e2848c66c305442badd2b21a414c1a8fe89cd4fd Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 8 Aug 2020 17:28:00 -0400 Subject: Fix to archive the .hex files for proton-c build. * Closes #77. --- docs/static/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 1a72224..327fc84 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -113,6 +113,11 @@ sed -i \ -e "s/KEYBOARD_TITLE/$shield_title/" \ .github/workflows/build.yml +if [ "$board" == "proton_c" ]; then + # Proton-C board still fa + sed -i -e "s/uf2/hex/g" .github/workflows/build.yml +fi + rm -rf .git git init . git add . -- cgit v1.3.1 From 851d54ad960cbcb914cef83c9d1f7fcec49ecf21 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 10 Aug 2020 12:37:05 -0400 Subject: Add Corne to setup.sh script. --- docs/static/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 327fc84..4208943 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -37,7 +37,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58") +options=("Kyria" "Lily58" "Corne") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -48,6 +48,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) shield_title="Kyria" shield="kyria"; split="y"; break;; 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; + 3 ) shield_title="Corne" shield="corne"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; -- cgit v1.3.1 From b0c648ad57d138c462fac538c7ea25f88b03e443 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 10 Aug 2020 22:47:18 -0400 Subject: Revert usage of `read -i` for macOS compat. --- docs/static/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 4208943..ce2fe25 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -64,10 +64,10 @@ if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" read -e -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user if [ -n "$github_user" ]; then - read -e -i "zmk-config" -p "GitHub Repo Name: " repo_name + read -p "GitHub Repo Name [zmk-config]: " repo_name if [ -z "$repo_name" ]; then repo_name="zmk-config"; fi - read -e -i "https://github.com/${github_user}/${repo_name}.git" -p "GitHub Repo: " github_repo + read -p "GitHub Repo [https://github.com/${github_user}/${repo_name}.git]: " github_repo if [ -z "$github_repo" ]; then github_repo="https://github.com/${github_user}/${repo_name}.git"; fi else -- cgit v1.3.1 From 47dbba21849a136797014f4691c999de28073bf3 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 11 Aug 2020 08:40:13 -0400 Subject: Fix sed -i usage on macOS, accept 'Y'. --- docs/static/setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index ce2fe25..27dcb0b 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -90,7 +90,7 @@ fi echo "" read -p "Continue? [Yn]: " do_it -if [ -n "$do_it" ] && [ "$do_it" != "y" ]; then +if [ -n "$do_it" ] && [ "$do_it" != "y" ] && [ "$do_it" != "Y" ]; then echo "Aborting..." exit fi @@ -108,7 +108,7 @@ fi popd -sed -i \ +sed -i'.orig' \ -e "s/BOARD_NAME/$board/" \ -e "s/SHIELD_NAME/$shield/" \ -e "s/KEYBOARD_TITLE/$shield_title/" \ @@ -116,9 +116,11 @@ sed -i \ if [ "$board" == "proton_c" ]; then # Proton-C board still fa - sed -i -e "s/uf2/hex/g" .github/workflows/build.yml + sed -i'.orig' -e "s/uf2/hex/g" .github/workflows/build.yml fi +rm .github/workflows/*.yml.orig + rm -rf .git git init . git add . -- cgit v1.3.1 From 23b188330f53c3907802efb091614002ee4237b7 Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 19:30:35 -0400 Subject: Update setup.sh Updated setup.sh --- docs/static/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 27dcb0b..71692ef 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -11,7 +11,7 @@ title="ZMK Config Setup:" # TODO: Check for user.name and user.email git configs being set prompt="Pick an MCU board:" -options=("nice!nano" "QMK Proton-C") +options=("nice!nano" "QMK Proton-C" "bluemicro52840_v1") echo "$title" echo "" @@ -37,7 +37,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne") +options=("Kyria" "Lily58" "Corne" "splitreus62") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -- cgit v1.3.1 From ba1cde94a80e7ecaf8e2a8373b08eb65ef820285 Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 16 Aug 2020 08:43:09 -0400 Subject: Update docs/static/setup.sh Co-authored-by: Pete Johanson --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 71692ef..0717889 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -11,7 +11,7 @@ title="ZMK Config Setup:" # TODO: Check for user.name and user.email git configs being set prompt="Pick an MCU board:" -options=("nice!nano" "QMK Proton-C" "bluemicro52840_v1") +options=("nice!nano" "QMK Proton-C" "BlueMicro52840 (v1)") echo "$title" echo "" -- cgit v1.3.1 From 68da92f4ddb9fab9bc5cc92c96b50578f7b66266 Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 16 Aug 2020 08:45:03 -0400 Subject: Update setup.sh --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 71692ef..ca223a8 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -37,7 +37,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "splitreus62") +options=("Kyria" "Lily58" "Corne") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -- cgit v1.3.1 From 5bb01c802b792dd016b2cd091b0983806b658f43 Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 16 Aug 2020 08:49:17 -0400 Subject: Update setup.sh --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 27dcb0b..45eccd6 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -37,7 +37,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne") +options=("Kyria" "Lily58" "Corne" "Splitreus62") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -- cgit v1.3.1 From 17c43881b8441e3e5c2fe9b5d25cb5ee9536a26a Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 16 Aug 2020 13:43:59 -0400 Subject: Updated select block --- docs/static/setup.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index c4a4f61..72eee0b 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -23,6 +23,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) board="nice_nano"; break;; 2 ) board="proton_c"; break;; + 3 ) board="BlueMicro52840 (v1)"; break;; $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; *) echo "Invalid option. Try another one.";continue;; -- cgit v1.3.1 From abe40f8ef52265f9d807775a82f40ca783622018 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sun, 16 Aug 2020 21:30:45 -0400 Subject: Various fixes. --- app/boards/arm/bluemicro52840_v1/Kconfig.defconfig | 2 +- app/boards/arm/bluemicro52840_v1/board.cmake | 4 ++-- docs/static/setup.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/static') diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig b/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig index e33a655..90a5ed9 100644 --- a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig +++ b/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Electronut Labs Papyr board configuration +# BlueMicro52840 board configuration # Copyright (c) 2020 Pete Johanson, Derek Schmell # SPDX-License-Identifier: MIT diff --git a/app/boards/arm/bluemicro52840_v1/board.cmake b/app/boards/arm/bluemicro52840_v1/board.cmake index c0eed65..fa847d5 100644 --- a/app/boards/arm/bluemicro52840_v1/board.cmake +++ b/app/boards/arm/bluemicro52840_v1/board.cmake @@ -1,5 +1,5 @@ - #SPDX-License-Identifier: MIT - +# SPDX-License-Identifier: MIT + board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 72eee0b..55c96ff 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -23,7 +23,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) board="nice_nano"; break;; 2 ) board="proton_c"; break;; - 3 ) board="BlueMicro52840 (v1)"; break;; + 3 ) board="bluemicro52840_v1"; break;; $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; *) echo "Invalid option. Try another one.";continue;; -- cgit v1.3.1 From 506c3b031e042430149cd663a561a13cd6e5835b Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 19 Aug 2020 16:35:18 -0400 Subject: refactor(boards): Rename to bluemicro840_v1. --- .github/workflows/build.yml | 2 +- app/boards/arm/bluemicro52840_v1/CMakeLists.txt | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig.board | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig.defconfig | 30 ------- .../bluemicro52840_v1/arduino_pro_micro_pins.dtsi | 52 ------------ .../arm/bluemicro52840_v1/bluemicro52840_v1.dts | 96 ---------------------- .../arm/bluemicro52840_v1/bluemicro52840_v1.yaml | 15 ---- .../bluemicro52840_v1/bluemicro52840_v1_defconfig | 20 ----- app/boards/arm/bluemicro52840_v1/board.cmake | 5 -- app/boards/arm/bluemicro840/CMakeLists.txt | 8 ++ app/boards/arm/bluemicro840/Kconfig | 8 ++ app/boards/arm/bluemicro840/Kconfig.board | 8 ++ app/boards/arm/bluemicro840/Kconfig.defconfig | 30 +++++++ .../arm/bluemicro840/arduino_pro_micro_pins.dtsi | 52 ++++++++++++ app/boards/arm/bluemicro840/bluemicro840_v1.dts | 96 ++++++++++++++++++++++ app/boards/arm/bluemicro840/bluemicro840_v1.yaml | 15 ++++ .../arm/bluemicro840/bluemicro840_v1_defconfig | 20 +++++ app/boards/arm/bluemicro840/board.cmake | 5 ++ docs/docs/hardware.md | 2 + docs/static/setup.sh | 4 +- 21 files changed, 247 insertions(+), 245 deletions(-) delete mode 100644 app/boards/arm/bluemicro52840_v1/CMakeLists.txt delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig.board delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig.defconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/board.cmake create mode 100644 app/boards/arm/bluemicro840/CMakeLists.txt create mode 100644 app/boards/arm/bluemicro840/Kconfig create mode 100644 app/boards/arm/bluemicro840/Kconfig.board create mode 100644 app/boards/arm/bluemicro840/Kconfig.defconfig create mode 100644 app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1.dts create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1.yaml create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1_defconfig create mode 100644 app/boards/arm/bluemicro840/board.cmake (limited to 'docs/static') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a2ea9a..0f0e74a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: name: Build Test strategy: matrix: - board: [proton_c, nice_nano, bluemicro52840_v1, nrfmicro_13] + board: [proton_c, nice_nano, bluemicro840_v1, nrfmicro_13] shield: - corne_left - corne_right diff --git a/app/boards/arm/bluemicro52840_v1/CMakeLists.txt b/app/boards/arm/bluemicro52840_v1/CMakeLists.txt deleted file mode 100644 index 00952c3..0000000 --- a/app/boards/arm/bluemicro52840_v1/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set_property(GLOBAL APPEND PROPERTY extra_post_build_commands - COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py - -c - -b 0x26000 - -f 0xADA52840 - -o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2 - ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin -) diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig b/app/boards/arm/bluemicro52840_v1/Kconfig deleted file mode 100644 index 67751a0..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_BLUEMICRO52840_V1 - diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig.board b/app/boards/arm/bluemicro52840_v1/Kconfig.board deleted file mode 100644 index dea0555..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# BlueMicro52840_V1 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -config BOARD_BLUEMICRO52840_V1 - bool "BlueMicro52840_V1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig b/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig deleted file mode 100644 index 90a5ed9..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig +++ /dev/null @@ -1,30 +0,0 @@ -# BlueMicro52840 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -if BOARD_BLUEMICRO52840_V1 - -config BOARD - default "bluemicro52840_v1" - -if USB - -config USB_NRFX - default y - -config USB_DEVICE_STACK - default y - -endif # USB - -config BT_CTLR - default BT - -config ZMK_BLE - default y - -config ZMK_USB - default y - -endif # BOARD_BLUEMICRO52840_V1 diff --git a/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi deleted file mode 100644 index 940d891..0000000 --- a/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2020 Derek Schmell - * - * SPDX-License-Identifier: MIT - */ - -/ { - pro_micro_d: connector_d { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 D2 */ - , <1 0 &gpio0 6 0> /* D1 D3*/ - , <2 0 &gpio0 15 0> /* D2 D1*/ - , <3 0 &gpio0 17 0> /* D3 D0*/ - , <4 0 &gpio0 20 0> /* D4/A6 D4*/ - , <5 0 &gpio0 13 0> /* D5 C6*/ - , <6 0 &gpio0 24 0> /* D6/A7 D7*/ - , <7 0 &gpio0 9 0> /* D7 E6*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 11 0> /* D10/A10 B6*/ - , <16 0 &gpio0 28 0> /* D16 B2*/ - , <14 0 &gpio0 3 0> /* D14 B3*/ - , <15 0 &gpio1 13 0> /* D15 B1*/ - ; - }; - - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 2 0> /* A0 F7*/ - , <1 0 &gpio0 29 0> /* A1 F6*/ - , <2 0 &gpio0 26 0> /* A2 F5*/ - , <3 0 &gpio0 30 0> /* A3 F4*/ - , <6 0 &gpio0 20 0> /* D4/A6 D4*/ - , <7 0 &gpio0 24 0> /* D6/A7 D7*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 13 0> /* D10/A10 B6*/ - ; - }; -}; - -pro_micro_i2c: &i2c0 {}; -pro_micro_spi: &spi0 {}; -pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts deleted file mode 100644 index f8abc66..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson, Derek Schmell - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include -#include "arduino_pro_micro_pins.dtsi" - -/ { - model = "BlueMicro52840_V1"; - compatible = "bluemicro52840,v1"; - - chosen { - zephyr,code-partition = &code_partition; - // zephyr,console = &uart0; - //zephyr,bt-mon-uart = &uart0; - //zephyr,bt-c2h-uart = &uart0; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - }; - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; - -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; -}; - -&uart0 { - compatible = "nordic,nrf-uarte"; - status = "okay"; - current-speed = <115200>; - tx-pin = <39>; - rx-pin = <34>; - rts-pin = <33>; - cts-pin = <12>; -}; - -&usbd { - status = "okay"; -}; - - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot_partition: partition@0 { - label = "adafruit_boot"; - reg = <0x000000000 0x0000C000>; - }; - code_partition: partition@26000 { - label = "code_partition"; - reg = <0x00026000 0x000d2000>; - }; - - /* - * The flash starting at 0x000f8000 and ending at - * 0x000fffff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@f8000 { - label = "storage"; - reg = <0x000f8000 0x00008000>; - }; - }; -}; diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml deleted file mode 100644 index fca969d..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: bluemicro52840_v1 -name: BlueMicro52840_V1 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig deleted file mode 100644 index f87e69d..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BLUEMICRO52840_V1=y - -# Enable MPU -CONFIG_ARM_MPU=y - -# enable GPIO -CONFIG_GPIO=y - -CONFIG_USE_DT_CODE_PARTITION=y - -CONFIG_MPU_ALLOW_FLASH_WRITE=y -CONFIG_NVS=y -CONFIG_SETTINGS_NVS=y -CONFIG_FLASH=y -CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file diff --git a/app/boards/arm/bluemicro52840_v1/board.cmake b/app/boards/arm/bluemicro52840_v1/board.cmake deleted file mode 100644 index fa847d5..0000000 --- a/app/boards/arm/bluemicro52840_v1/board.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: MIT - -board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") -include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) -include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/boards/arm/bluemicro840/CMakeLists.txt b/app/boards/arm/bluemicro840/CMakeLists.txt new file mode 100644 index 0000000..00952c3 --- /dev/null +++ b/app/boards/arm/bluemicro840/CMakeLists.txt @@ -0,0 +1,8 @@ +set_property(GLOBAL APPEND PROPERTY extra_post_build_commands + COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py + -c + -b 0x26000 + -f 0xADA52840 + -o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2 + ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin +) diff --git a/app/boards/arm/bluemicro840/Kconfig b/app/boards/arm/bluemicro840/Kconfig new file mode 100644 index 0000000..0e6743d --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_BLUEMICRO840_V1 + diff --git a/app/boards/arm/bluemicro840/Kconfig.board b/app/boards/arm/bluemicro840/Kconfig.board new file mode 100644 index 0000000..bc271af --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig.board @@ -0,0 +1,8 @@ +# BlueMicro840 board configuration + +# Copyright (c) 2020 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: MIT + +config BOARD_BLUEMICRO840_V1 + bool "BlueMicro840_V1" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/arm/bluemicro840/Kconfig.defconfig new file mode 100644 index 0000000..566b5a4 --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig.defconfig @@ -0,0 +1,30 @@ +# BlueMicro840 board configuration + +# Copyright (c) 2020 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: MIT + +if BOARD_BLUEMICRO840_V1 + +config BOARD + default "bluemicro840_v1" + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config BT_CTLR + default BT + +config ZMK_BLE + default y + +config ZMK_USB + default y + +endif # BOARD_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi new file mode 100644 index 0000000..940d891 --- /dev/null +++ b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + +/ { + pro_micro_d: connector_d { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 D2 */ + , <1 0 &gpio0 6 0> /* D1 D3*/ + , <2 0 &gpio0 15 0> /* D2 D1*/ + , <3 0 &gpio0 17 0> /* D3 D0*/ + , <4 0 &gpio0 20 0> /* D4/A6 D4*/ + , <5 0 &gpio0 13 0> /* D5 C6*/ + , <6 0 &gpio0 24 0> /* D6/A7 D7*/ + , <7 0 &gpio0 9 0> /* D7 E6*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 11 0> /* D10/A10 B6*/ + , <16 0 &gpio0 28 0> /* D16 B2*/ + , <14 0 &gpio0 3 0> /* D14 B3*/ + , <15 0 &gpio1 13 0> /* D15 B1*/ + ; + }; + + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 2 0> /* A0 F7*/ + , <1 0 &gpio0 29 0> /* A1 F6*/ + , <2 0 &gpio0 26 0> /* A2 F5*/ + , <3 0 &gpio0 30 0> /* A3 F4*/ + , <6 0 &gpio0 20 0> /* D4/A6 D4*/ + , <7 0 &gpio0 24 0> /* D6/A7 D7*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 13 0> /* D10/A10 B6*/ + ; + }; +}; + +pro_micro_i2c: &i2c0 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts new file mode 100644 index 0000000..c693662 --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2020 Pete Johanson, Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include +#include "arduino_pro_micro_pins.dtsi" + +/ { + model = "BlueMicro840_V1"; + compatible = "bluemicro840,v1"; + + chosen { + zephyr,code-partition = &code_partition; + // zephyr,console = &uart0; + //zephyr,bt-mon-uart = &uart0; + //zephyr,bt-c2h-uart = &uart0; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <17>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <34>; + rts-pin = <33>; + cts-pin = <12>; +}; + +&usbd { + status = "okay"; +}; + + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "adafruit_boot"; + reg = <0x000000000 0x0000C000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000d2000>; + }; + + /* + * The flash starting at 0x000f8000 and ending at + * 0x000fffff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml b/app/boards/arm/bluemicro840/bluemicro840_v1.yaml new file mode 100644 index 0000000..9e1dd54 --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.yaml @@ -0,0 +1,15 @@ +identifier: bluemicro840_v1 +name: BlueMicro840_V1 +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig new file mode 100644 index 0000000..96f03ca --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_BLUEMICRO840_V1=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y \ No newline at end of file diff --git a/app/boards/arm/bluemicro840/board.cmake b/app/boards/arm/bluemicro840/board.cmake new file mode 100644 index 0000000..fa847d5 --- /dev/null +++ b/app/boards/arm/bluemicro840/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 951cee0..9e6a956 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -17,6 +17,8 @@ That being said, there are currently only a few specific [boards](/docs/faq#what ## Boards - [nice!nano](https://docs.nicekeyboards.com/#/nice!nano/) (`nice_nano`) +- [nrfMicro](https://github.com/joric/nrfmicro) (`nrfmicro_13`, `nrfmicro_11`, `nrfmicro_11_flipped`) +- [BlueMicro840](https://store.jpconstantineau.com/#/group/bluemicro) (`bluemicro840_v1`) - [QMK Proton-C](https://qmk.fm/proton-c/) (`proton_c`) ## Keyboard Shields diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 55c96ff..bb61df6 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -11,7 +11,7 @@ title="ZMK Config Setup:" # TODO: Check for user.name and user.email git configs being set prompt="Pick an MCU board:" -options=("nice!nano" "QMK Proton-C" "BlueMicro52840 (v1)") +options=("nice!nano" "QMK Proton-C" "BlueMicro840 (v1)") echo "$title" echo "" @@ -23,7 +23,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) board="nice_nano"; break;; 2 ) board="proton_c"; break;; - 3 ) board="bluemicro52840_v1"; break;; + 3 ) board="bluemicro840_v1"; break;; $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit;; *) echo "Invalid option. Try another one.";continue;; -- cgit v1.3.1 From 94c7d27f04263b42669ae6d1777765ba811ed6bf Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 20 Aug 2020 15:13:51 -0400 Subject: Updated files as per request Updated --- app/boards/shields/splitreus62/Kconfig.defconfig | 7 ++++++- app/boards/shields/splitreus62/Kconfig.shield | 2 +- app/boards/shields/splitreus62/splitreus62.dtsi | 2 +- app/boards/shields/splitreus62/splitreus62.keymap | 6 ++++++ app/boards/shields/splitreus62/splitreus62_left.overlay | 2 +- app/boards/shields/splitreus62/splitreus62_right.overlay | 4 ++-- docs/static/setup.sh | 1 + 7 files changed, 18 insertions(+), 6 deletions(-) (limited to 'docs/static') diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 1f5b324..6e35b06 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -1,4 +1,9 @@ - +/* + * Copyright (c) 2020 Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + if SHIELD_SPLITREUS62_LEFT config ZMK_KEYBOARD_NAME diff --git a/app/boards/shields/splitreus62/Kconfig.shield b/app/boards/shields/splitreus62/Kconfig.shield index f20f236..762d991 100644 --- a/app/boards/shields/splitreus62/Kconfig.shield +++ b/app/boards/shields/splitreus62/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Pete Johanson +# Copyright (c) 2020 Derek Schmell # SPDX-License-Identifier: MIT config SHIELD_SPLITREUS62_LEFT diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index e1fb40b..c2bfbc4 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson, Derek Schmell + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/splitreus62/splitreus62.keymap b/app/boards/shields/splitreus62/splitreus62.keymap index cd683a2..920e61a 100644 --- a/app/boards/shields/splitreus62/splitreus62.keymap +++ b/app/boards/shields/splitreus62/splitreus62.keymap @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2020 Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + #include #include diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay index 7210ca4..b156d60 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.overlay +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index 35375cc..5db87cc 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -1,9 +1,9 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ - + #include "splitreus62.dtsi" &default_transform { diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 45eccd6..e75b529 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -49,6 +49,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) shield_title="Kyria" shield="kyria"; split="y"; break;; 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; 3 ) shield_title="Corne" shield="corne"; split="y"; break;; + 4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; -- cgit v1.3.1 From ca0f2bb074a103b871a3e0f7f5e1fed8b6b4069b Mon Sep 17 00:00:00 2001 From: CrossR Date: Tue, 1 Sep 2020 18:32:45 +0100 Subject: Add to setup. --- app/boards/shields/sofle/sofle.dtsi | 14 ++++++-------- docs/static/setup.sh | 3 ++- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'docs/static') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 9b3d3c0..653a772 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -47,19 +47,17 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; + a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; + a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; }; sensors { diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 4dc740a..a32718d 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -38,7 +38,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -51,6 +51,7 @@ select opt in "${options[@]}" "Quit"; do 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; 3 ) shield_title="Corne" shield="corne"; split="y"; break;; 4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;; + 5 ) shield_title="Sofle" shield="sofle"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; -- cgit v1.3.1 From 9b1fd1323f4fe4a812a08f0d6b762250f54d191f Mon Sep 17 00:00:00 2001 From: kurtis-lew Date: Wed, 2 Sep 2020 20:53:14 -0700 Subject: Update setup.sh --- docs/static/setup.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index a32718d..ad5416b 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -52,6 +52,7 @@ select opt in "${options[@]}" "Quit"; do 3 ) shield_title="Corne" shield="corne"; split="y"; break;; 4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;; 5 ) shield_title="Sofle" shield="sofle"; split="y"; break;; + 6 ) shield_title="Iris" shield="iris"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; -- cgit v1.3.1 From f738fd7a670994bfbe20601a4de9a64cd98020ad Mon Sep 17 00:00:00 2001 From: Kurtis Lew Date: Wed, 2 Sep 2020 20:57:42 -0700 Subject: Update setup.sh --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index ad5416b..70defdf 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -38,7 +38,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -- cgit v1.3.1 From 80034c007826a026833d85d4fde7fc9be3898229 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 6 Sep 2020 15:51:12 +0100 Subject: Add RoMac / non-split template support --- docs/static/setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 70defdf..83e7451 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -38,7 +38,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "RoMac") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -53,6 +53,7 @@ select opt in "${options[@]}" "Quit"; do 4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;; 5 ) shield_title="Sofle" shield="sofle"; split="y"; break;; 6 ) shield_title="Iris" shield="iris"; split="y"; break;; + 7 ) shield_title="RoMac" shield="romac"; split="n"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; @@ -62,6 +63,10 @@ select opt in "${options[@]}" "Quit"; do esac done +if [ "$split" == "n" ]; then + repo_path="https://github.com/bmcgavin/zmk-config-template.git" +fi + read -e -p "Copy in the stock keymap for customization? [Yn]: " copy_keymap if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" ]; then copy_keymap="yes"; fi -- cgit v1.3.1 From 01da54aadfe1ed9027e71754f9d897f68da900ea Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 6 Sep 2020 17:54:45 +0100 Subject: point setup.sh at upstream --- docs/static/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/static') diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 83e7451..5d203a4 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -64,7 +64,7 @@ select opt in "${options[@]}" "Quit"; do done if [ "$split" == "n" ]; then - repo_path="https://github.com/bmcgavin/zmk-config-template.git" + repo_path="https://github.com/zmkfirmware/zmk-config-template.git" fi read -e -p "Copy in the stock keymap for customization? [Yn]: " copy_keymap -- cgit v1.3.1