Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .devcontainer/build.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .devcontainer/devcontainer.json

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build ZMK firmware for Blank Slate
on: [workflow_dispatch]
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.3.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
zmk
# West
.west/
zephyr/
Expand Down
142 changes: 142 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Schritte:
# 1. make base
# ========================================
# FileName: Makefile
# Date: 16.12.2025
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: Makefile for ZMK firmware with Docker
# Shields: lpgalaxy_blank_slate
# Boards: nice_nano_v2 puchi_ble_v1 seeeduino_xiao_ble lpgalaxy_blank_slate
# =========================================
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝

### CONFIG ###
zmk_studio= -S studio-rpc-usb-uart
extra_modules_dir=${PWD}
# add a submodule automatic :)
# git submodule add https://github.com/petejohanson/blank-slate-zmk-module.git module/blank-slate-zmk-module
extra_modules= -DZMK_EXTRA_MODULES="/boards"
extra_snippet= /boards/snippets
config=${PWD}/config
nice_mount=/Volumes/NICENANO
puchi_mount=/Volumes/NRF52BOOT
xiao_mount=/Volumes/XIAO-SENSE
zmk_image=zmkfirmware/zmk-dev-arm:3.5
nice=nice_nano_v2
puchi=puchi_ble_v1
xiao=seeeduino_xiao_ble
slate=lpgalaxy_blank_slate
default=zmk-base
docker_opts= \
--interactive \
--tty \
--name zmk-$@ \
--workdir /zmk \
--volume "${config}:/zmk-config:Z" \
--volume "${PWD}/zmk:/zmk:Z" \
--volume "${extra_modules_dir}:/boards:Z" \
${zmk_image}

### KEYBOARD NAME ###
keyboard_name_slate= '-DCONFIG_ZMK_KEYBOARD_NAME="SLATE"'
keyboard_name_felerius_blank_slate= '-DCONFIG_ZMK_KEYBOARD_NAME="F_SLATE"'

### WEST ###
west_built_puchi= \
west build /zmk/app \
--pristine --board "${puchi}"

west_built_nice= \
west build /zmk/app \
--pristine --board "${nice}"

west_built_xiao= \
west build /zmk/app \
--pristine --board "${xiao}"

west_built_slate= \
west build /zmk/app \
--pristine --board "${slate}"

### SHIELDS ###
shield_settings_reset= \
-- -DSHIELD="settings_reset" -DZMK_CONFIG="/zmk-config"

### ARTIFACT ###
artifact_name_slate=/zmk/build/zephyr/zmk.uf2 \
firmware/blank-slate.uf2
artifact_name_felerius_blank_slate=/zmk/build/zephyr/zmk.uf2 \
firmware/felerius_blank_slate.uf2

clone_zmk:
if [ ! -d zmk.git ]; then git clone https://github.com/zmkfirmware/zmk -b v0.3.0; fi

base: clone_zmk
docker run ${docker_opts} sh -c '\
west init -l /zmk/app/; \
west update'

### BASE START
extra_cmake_args_slate= -DCONFIG_ZMK_SLEEP=y \
-DCONFIG_ZMK_IDLE_TIMEOUT=60000 \
-DCONFIG_ZMK_IDLE_SLEEP_TIMEOUT=2200000

extra_cmake_args_felerius_blank_slate= -DCONFIG_ZMK_SLEEP=y \
-DCONFIG_ZMK_IDLE_TIMEOUT=60000 \
-DCONFIG_ZMK_IDLE_SLEEP_TIMEOUT=2200000 \
-DZMK_KEYMAP=/zmk-config/felerius_blank_slate.keymap \
-DEXTRA_CONF_FILE=/zmk-config/felerius_blank_slate.conf

only_slate:
docker run --rm ${docker_opts} \
${west_built_slate} \
${zmk_studio} \
${extra_modules} ${extra_cmake_args_slate} \
${keyboard_name_slate}
docker cp ${default}:${artifact_name_slate}

only_felerius_blank_slate:
docker run --rm ${docker_opts} \
${west_built_slate} \
${zmk_studio} \
${extra_modules} ${extra_cmake_args_felerius_blank_slate} \
${keyboard_name_felerius_blank_slate}
docker cp ${default}:${artifact_name_felerius_blank_slate}

my_slate: only_slate \
only_felerius_blank_slate

### OPEN A SHELL WITHIN THE ZMK ENVIRONMENT ###
shell:
docker run --rm ${docker_opts} /bin/bash

### FLASH THE APPROPRIATE FIRMWARE TO THE BOOTLOADER ###
flash_slate:
@ printf "Waiting for ${slate} bootloader to appear at ${nice_mount}.."
@ while [ ! -d ${nice_mount} ]; do sleep 1; printf "."; done; printf "\n"
cp -av firmware/blank-slate.uf2 ${nice_mount}

### CLEAN ###
clean_firmware:
find firmware/*.uf2 -type f -delete

clean_zmk:
if [ -d zmk ]; then rm -rfv zmk; fi

clean: clean_zmk
docker ps -aq --filter name='^zmk' | xargs -r docker container rm
docker volume list -q --filter name='zmk' | xargs -r docker volume rm

clean_all: clean clean_firmware
@echo "cleaning all"

# vim: set ft=make fdm=marker:
8 changes: 8 additions & 0 deletions boards/arm/lpgalaxy_blank_slate/Kconfig
Original file line number Diff line number Diff line change
@@ -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_LPGALAXY_BLANK_SLATE

9 changes: 9 additions & 0 deletions boards/arm/lpgalaxy_blank_slate/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Blank Slate board configuration

# Copyright (c) 2021 Pete Johanson
# SPDX-License-Identifier: MIT

config BOARD_LPGALAXY_BLANK_SLATE
bool "LP Galaxy Blank Slate"
depends on SOC_NRF52840_QIAA

31 changes: 31 additions & 0 deletions boards/arm/lpgalaxy_blank_slate/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT

if BOARD_LPGALAXY_BLANK_SLATE

config BOARD
default "lpgalaxy_blank_slate"

config ZMK_KEYBOARD_NAME
default "Blank Slate"

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_LPGALAXY_BLANK_SLATE
5 changes: 5 additions & 0 deletions boards/arm/lpgalaxy_blank_slate/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT

board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

#include <layouts/common/ortho_4x12/all1u.dtsi>
#include <layouts/common/ortho_4x12/1x2u.dtsi>
#include <layouts/common/ortho_4x12/2x2u.dtsi>
Loading