Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 711e8b968b | |||
| 3c10cf81ee | |||
| e28bc93a0c | |||
| 6d53f61608 | |||
| d154237847 | |||
| 6e2d02852c | |||
| bdcf3c69c9 | |||
| 37fcefb0e8 | |||
| 21e231ef48 | |||
| 708d7f03b4 | |||
| d9cf993f1c | |||
| 0b62a4ef72 | |||
| c55c7fed83 | |||
| 40380c2684 | |||
| a68b620112 | |||
| aa7628641c | |||
| ea4136bc2b | |||
| cdf640578b | |||
| 7138fa4582 | |||
| ccb37b155c | |||
| 64b84385cd | |||
| e90d9fcfff | |||
| d61a5f4343 | |||
| 713427c086 | |||
| e1afcda1c0 | |||
| ab4013a69e | |||
| 974c01b4f8 | |||
| f2d4dace06 | |||
| 387b64a79b | |||
| 9dc53f6cd2 | |||
| 6d8a1aa676 | |||
| 7ce0874617 | |||
| fc5eb10822 | |||
| 952cdc7be5 | |||
| db9f5c6013 | |||
| fff2249a7c | |||
| f48a88fc72 | |||
| 29f2e9f19a | |||
| d2c755c3dd | |||
| 40a4ee5114 | |||
| bb8c5cd54a | |||
| 2cef3465e8 | |||
| e0a09ff728 | |||
| 990ee8075e | |||
| 697f53a154 | |||
| cefef18ceb | |||
| 6e5ff018e3 | |||
| 75b7140cbd | |||
| 28c11ed348 | |||
| d732b0b849 | |||
| 6d965d486c | |||
| ce417226b2 | |||
| 0382a25e35 | |||
| 83dcbefeed | |||
| 18335ddda5 | |||
| 051485c579 | |||
| 5012dfd719 | |||
| 641698d356 | |||
| 75edefe541 | |||
| 7e6eba674a | |||
| 26b35a54cf | |||
| 38700f7e3f | |||
| ed72c423be | |||
| bc6db2823c | |||
| fb706f42a2 | |||
| 9132c64389 | |||
| 6e0acf0548 | |||
| 2c375e6478 | |||
| a5e68e5f74 | |||
| e9b36bebb2 | |||
| df7b56e0ea | |||
| 2e766a9c7a | |||
| 4ba3fdfad2 | |||
| 655c24d29d | |||
| eab2b8faa0 | |||
| d058091d0b | |||
| 596319c92f | |||
| 4d17fe2a99 | |||
| 1d045e854b | |||
| f7176f070f | |||
| 687883cf7d | |||
| f56cf93fa1 | |||
| 1fd30b3391 | |||
| 37f205ec1a | |||
| 26e0bfd494 | |||
| a434507ab4 | |||
| ee8c86702e | |||
| 246cf99b4b | |||
| eb52984a94 | |||
| a5272a1575 | |||
| d06ce0153b | |||
| c58610bea3 | |||
| 12de0297ed | |||
| 4992df56b8 | |||
| f3f0bf6dbe | |||
| 8a5e8ed88e | |||
| fb6557acf1 | |||
| 2d7240f730 | |||
| 1d1c407e4e | |||
| 9152928f02 | |||
| 15a106b1ef | |||
| ac9f9f9efb | |||
| ec83c0b185 | |||
| d300811009 | |||
| 27e6e27d3a | |||
| 5687fc7646 | |||
| ebe36ea83c | |||
| 6b205c3064 | |||
| b5d0c44690 | |||
| d0e0b9e583 | |||
| b0dc99fbd8 | |||
| 5b8dae0d61 | |||
| fd56a2a1dc | |||
| be9f6e679b | |||
| b53356f7ab | |||
| c402bac023 | |||
| a030e8094f |
@@ -31,7 +31,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@1.61.0
|
||||
uses: anothrNick/github-tag-action@1.62.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DEFAULT_BUMP: 'patch'
|
||||
|
||||
@@ -4,22 +4,27 @@ permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0,12 * * *'
|
||||
inputs:
|
||||
branch:
|
||||
type: choice
|
||||
description: 'Branch to build'
|
||||
options: [master, develop]
|
||||
|
||||
concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
ci_builds:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
name: "CI Build"
|
||||
runs-on: self-hosted
|
||||
timeout-minutes: 1380
|
||||
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: [master, develop]
|
||||
keymap: [default, via]
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
@@ -31,7 +36,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ matrix.branch }}
|
||||
ref: ${{ github.event.inputs.branch || github.ref }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements.txt
|
||||
@@ -51,10 +56,19 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
|
||||
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
*.bin
|
||||
*.hex
|
||||
*.uf2
|
||||
.build/failed.*
|
||||
|
||||
- name: 'CI Discord Notification'
|
||||
if: always()
|
||||
working-directory: util/ci/
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
|
||||
run: |
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
@@ -27,12 +27,16 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync nodejs npm doxygen
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
- name: Build doxygen docs
|
||||
run: |
|
||||
qmk --verbose generate-docs
|
||||
|
||||
@@ -42,5 +46,5 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
BRANCH: gh-pages
|
||||
FOLDER: .build/docs
|
||||
FOLDER: .build/docs/build
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
@@ -30,6 +30,9 @@ quantum/version.h
|
||||
*.qmk
|
||||
*.uf2
|
||||
|
||||
# DD config at wrong location
|
||||
/keyboards/**/keymaps/*/info.json
|
||||
|
||||
# Old-style QMK Makefiles
|
||||
/keyboards/**/Makefile
|
||||
|
||||
@@ -52,12 +55,9 @@ quantum/version.h
|
||||
.history/
|
||||
build/
|
||||
cmake-build-debug
|
||||
# CMakeLists.txt
|
||||
CMakeLists.txt
|
||||
*.pdf
|
||||
|
||||
# cmake toolchain downloads
|
||||
/toolchains
|
||||
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
*.code-workspace
|
||||
.stfolder
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "AVR GCC",
|
||||
"compilers": {
|
||||
"CC": "C:\\QMK_MSYS\\mingw64\\bin\\avr-gcc.exe",
|
||||
"CXX": "C:\\QMK_MSYS\\mingw64\\bin\\avr-g++.exe"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,10 +1,11 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig",
|
||||
"editorconfig.editorconfig",
|
||||
"xaver.clang-format",
|
||||
"ms-vscode.cpptools",
|
||||
"bierner.github-markdown-preview",
|
||||
"donjayamanne.git-extension-pack"
|
||||
"donjayamanne.git-extension-pack",
|
||||
"kevgo.vscode-markdown-ide"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// Configure glob patterns for excluding files and folders.
|
||||
"files.exclude": {
|
||||
"**/.build": true,
|
||||
// "**/*.hex": true,
|
||||
// "**/*.bin": true,
|
||||
"**/*.hex": true,
|
||||
"**/*.bin": true,
|
||||
"**/*.uf2": true
|
||||
},
|
||||
"files.associations": {
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Load Keyboard",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn":[
|
||||
"Only Load Keyboard",
|
||||
"Configure CMake"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Only Load Keyboard",
|
||||
"type": "shell",
|
||||
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -D QMK_KEYMAP_FOLDER=\"${input:keyboard_keymap}\" -P ${workspaceFolder}/cmake/ConfigureKeyboard.cmake",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Configure CMake",
|
||||
"type": "cmake",
|
||||
"command": "configure"
|
||||
},
|
||||
{
|
||||
"label": "Build",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"base": "$gcc",
|
||||
"fileLocation": ["relative", "${workspaceFolder}/build"]
|
||||
},
|
||||
],
|
||||
"options": {
|
||||
"environment": {
|
||||
"CLICOLOR_FORCE": "1"
|
||||
}
|
||||
},
|
||||
"type": "cmake",
|
||||
"command": "build",
|
||||
"targets":[
|
||||
"${input:keyboard_target}"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
},
|
||||
// {
|
||||
// "label": "Rebuild",
|
||||
// "problemMatcher": [
|
||||
// {
|
||||
// "base": "$gcc",
|
||||
// "fileLocation": ["relative", "${workspaceFolder}/build"]
|
||||
// },
|
||||
// ],
|
||||
// "options": {
|
||||
// "environment": {
|
||||
// "CLICOLOR_FORCE": "1"
|
||||
// }
|
||||
// },
|
||||
// "type": "cmake",
|
||||
// "command": "cleanRebuild",
|
||||
// "targets":[
|
||||
// "${input:keyboard_target}"
|
||||
// ],
|
||||
// "group": {
|
||||
// "kind": "build",
|
||||
// "isDefault": true
|
||||
// },
|
||||
// }
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "keyboard_target",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "type build\\targets",
|
||||
"description": "Target:",
|
||||
"fieldSeparator": "|"
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "all_keyboards",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "type build\\all_keyboards",
|
||||
"description": "Keyboard:",
|
||||
"default": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "keymap",
|
||||
"description": "Keymap:",
|
||||
"type": "pickString",
|
||||
"options":[
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "keyboard_keymap",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -P ${workspaceFolder}/cmake/GetKeymaps.cmake && type build\\keyboard_keymaps",
|
||||
"description": "Keymap:",
|
||||
"default": ""
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(UpdateSubmodule)
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
include(ProcessKeyboard)
|
||||
|
||||
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
|
||||
|
||||
function(_get_all_cmake_targets out_var current_dir)
|
||||
get_property(targets DIRECTORY ${current_dir} PROPERTY BUILDSYSTEM_TARGETS)
|
||||
get_property(subdirs DIRECTORY ${current_dir} PROPERTY SUBDIRECTORIES)
|
||||
|
||||
foreach(subdir ${subdirs})
|
||||
_get_all_cmake_targets(subdir_targets ${subdir})
|
||||
list(APPEND targets ${subdir_targets})
|
||||
endforeach()
|
||||
|
||||
set(${out_var} ${targets} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(NOT DEFINED QMK_KEYBOARD)
|
||||
# configure step - populate targets
|
||||
project(qmk_firmware)
|
||||
|
||||
add_subdirectory(keyboards)
|
||||
|
||||
else()
|
||||
# build step
|
||||
if(NOT DEFINED QMK_KEYMAP_FOLDER)
|
||||
set(QMK_KEYMAP_FOLDER "default")
|
||||
endif()
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} QMK_KEYBOARD_FOLDER_ABS)
|
||||
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${QMK_KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
|
||||
resolve_config_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_CONFIG_H)
|
||||
process_keyboard()
|
||||
resolve_keyboard_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_H)
|
||||
resolve_keymap_c(${QMK_KEYBOARD_FOLDER_ABS} ${QMK_KEYMAP_FOLDER} QMK_KEYMAP_C)
|
||||
|
||||
message(STATUS "config.h: ${QMK_KEYBOARD_CONFIG_H}")
|
||||
message(STATUS "keyboard.h: ${QMK_KEYBOARD_H}")
|
||||
message(STATUS "keymap.c: ${QMK_KEYMAP_C}")
|
||||
|
||||
|
||||
project(${QMK_KEYBOARD}
|
||||
LANGUAGES C CXX ASM
|
||||
HOMEPAGE_URL ${URL}
|
||||
VERSION ${DEVICE_VER})
|
||||
|
||||
# add_compile_options(
|
||||
# -include ${QMK_KEYBOARD_CONFIG_H}
|
||||
# )
|
||||
add_compile_definitions(
|
||||
QMK_KEYBOARD_H="${QMK_KEYBOARD_H}"
|
||||
KEYBOARD_${QMK_KEYBOARD}
|
||||
KEYMAP_C="${QMK_KEYMAP_C}"
|
||||
MATRIX_ROWS=8
|
||||
MATRIX_COLS=6
|
||||
)
|
||||
|
||||
if(DEFINED DIODE_DIRECTION)
|
||||
add_compile_definitions(DIODE_DIRECTION=${DIODE_DIRECTION})
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
||||
# if(EXISTS ${QMK_KEYBOARD_FOLDER_ABS}/CMakeLists.txt)
|
||||
# add_subdirectory(${QMK_KEYBOARD_FOLDER_ABS})
|
||||
# else()
|
||||
file(GLOB KEYBOARD_SRC "${QMK_KEYBOARD_FOLDER_ABS}/*.c")
|
||||
list(REMOVE_ITEM KEYBOARD_SRC "${QMK_KEYMAP_C}")
|
||||
add_qmk_executable(${TARGET_NAME} ${KEYBOARD_SRC})
|
||||
|
||||
# endif()
|
||||
# add_library(qmk)
|
||||
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${QMK_KEYBOARD_CONFIG_H}
|
||||
)
|
||||
|
||||
resolve_keyboard_includes(${QMK_KEYBOARD_FOLDER_ABS})
|
||||
|
||||
add_subdirectory(quantum)
|
||||
add_subdirectory(platforms)
|
||||
add_subdirectory(tmk_core/protocol)
|
||||
|
||||
include(features/oled)
|
||||
include(features/backlight)
|
||||
include(features/eeprom)
|
||||
include(features/matrix)
|
||||
include(features/fnv)
|
||||
endif()
|
||||
@@ -21,7 +21,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "QMK Firmware"
|
||||
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
|
||||
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
|
||||
OUTPUT_DIRECTORY = .build/doxygen
|
||||
OUTPUT_DIRECTORY = docs/static
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
@@ -183,7 +183,7 @@ IGNORE_PREFIX =
|
||||
# Configuration options related to disabled outputs
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
GENERATE_HTML = NO
|
||||
GENERATE_HTML = YES
|
||||
GENERATE_LATEX = NO
|
||||
GENERATE_RTF = NO
|
||||
GENERATE_MAN = NO
|
||||
@@ -191,11 +191,18 @@ GENERATE_DOCBOOK = NO
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
GENERATE_PERLMOD = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
HTML_OUTPUT = doxygen
|
||||
# HTML_FILE_EXTENSION =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
GENERATE_XML = YES
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
/static/doxygen
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
@@ -0,0 +1,285 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require("prism-react-renderer/themes/github");
|
||||
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: "QMK Firmware",
|
||||
tagline: "The full documentation of the open-source firmware",
|
||||
favicon: "img/favicon.ico",
|
||||
url: "https://docs.qmk.fm",
|
||||
baseUrl: "/",
|
||||
organizationName: "qmk",
|
||||
projectName: "qmk_firmware",
|
||||
deploymentBranch: "gh-pages",
|
||||
onBrokenLinks: "warn",
|
||||
onBrokenMarkdownLinks: "warn",
|
||||
i18n: {
|
||||
defaultLocale: "en",
|
||||
locales: ["en"], //, 'ja', 'zh-cn'],
|
||||
},
|
||||
themes: [
|
||||
[
|
||||
"classic",
|
||||
{
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
}
|
||||
],
|
||||
[
|
||||
require.resolve("@easyops-cn/docusaurus-search-local"),
|
||||
{
|
||||
indexBlog: false,
|
||||
docsRouteBasePath: '/',
|
||||
searchResultLimits: 12,
|
||||
searchBarShortcut: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
"@docusaurus/plugin-content-docs",
|
||||
{
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
path: "../../docs",
|
||||
routeBasePath: "/",
|
||||
exclude: [
|
||||
"node_modules",
|
||||
"src",
|
||||
"static",
|
||||
"ja",
|
||||
"zh-cn",
|
||||
"gitbook",
|
||||
// "ChangeLog"
|
||||
],
|
||||
editUrl:
|
||||
"https://github.com/qmk/qmk_firmware/edit/master/docs/",
|
||||
},
|
||||
],
|
||||
[
|
||||
"@docusaurus/plugin-client-redirects",
|
||||
{
|
||||
// fromExtensions: ['md', 'html'],
|
||||
redirects: [
|
||||
// from index.html
|
||||
{
|
||||
from: '/adding_a_keyboard_to_qmk',
|
||||
to: '/hardware_keyboard_guidelines',
|
||||
},
|
||||
{
|
||||
from: '/build_environment_setup',
|
||||
to: '/newbs_getting_started',
|
||||
},
|
||||
{
|
||||
from: '/cli_dev_configuration',
|
||||
to: '/cli_configuration',
|
||||
},
|
||||
{
|
||||
from: '/dynamic_macros',
|
||||
to: '/feature_dynamic_macros',
|
||||
},
|
||||
{
|
||||
from: '/feature_common_shortcuts',
|
||||
to: '/feature_advanced_keycodes',
|
||||
},
|
||||
{
|
||||
from: '/glossary',
|
||||
to: '/reference_glossary',
|
||||
},
|
||||
{
|
||||
from: '/key_lock',
|
||||
to: '/feature_key_lock',
|
||||
},
|
||||
{
|
||||
from: '/make_instructions',
|
||||
to: '/getting_started_make_guide',
|
||||
},
|
||||
{
|
||||
from: ['/space_cadet_shift', '/feature_space_cadet_shift'],
|
||||
to: '/feature_space_cadet',
|
||||
},
|
||||
{
|
||||
from: '/getting_started_getting_help',
|
||||
to: '/support',
|
||||
},
|
||||
{
|
||||
from: '/tap_dance',
|
||||
to: '/feature_tap_dance',
|
||||
},
|
||||
{
|
||||
from: '/unicode',
|
||||
to: '/feature_unicode',
|
||||
},
|
||||
{
|
||||
from: '/python_development',
|
||||
to: '/cli_development',
|
||||
},
|
||||
{
|
||||
from: '/getting_started_build_tools',
|
||||
to: '/newbs_getting_started',
|
||||
},
|
||||
{
|
||||
from: '/tutorial',
|
||||
to: '/newbs',
|
||||
},
|
||||
// from redirects.json
|
||||
// {
|
||||
// from: "/adding_a_keyboard_to_qmk",
|
||||
// to: "/hardware_keyboard_guidelines"
|
||||
// },
|
||||
// {
|
||||
// from: "/build_environment_setup",
|
||||
// to: "/getting_started_build_tools"
|
||||
// },
|
||||
// {
|
||||
// from: "/dynamic_macros",
|
||||
// to: "/feature_dynamic_macros"
|
||||
// },
|
||||
// {
|
||||
// from: "/feature_common_shortcuts",
|
||||
// to: "/feature_advanced_keycodes"
|
||||
// },
|
||||
// {
|
||||
// from: "/glossary",
|
||||
// to: "/reference_glossary"
|
||||
// },
|
||||
// {
|
||||
// from: "/key_lock",
|
||||
// to: "/feature_key_lock"
|
||||
// },
|
||||
// {
|
||||
// from: "/make_instructions",
|
||||
// to: "/getting_started_make_guide"
|
||||
// },
|
||||
// {
|
||||
// from: "/porting_your_keyboard_to_qmk",
|
||||
// to: "/hardware_avr"
|
||||
// },
|
||||
// {
|
||||
// from: "/space_cadet_shift",
|
||||
// to: "/feature_space_cadet_shift"
|
||||
// },
|
||||
// {
|
||||
// from: "/tap_dance",
|
||||
// to: "/feature_tap_dance"
|
||||
// },
|
||||
// {
|
||||
// from: "/unicode",
|
||||
// to: "/feature_unicode"
|
||||
// },
|
||||
// {
|
||||
// from: "/python_development",
|
||||
// to: "/cli_development"
|
||||
// }
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
image: "img/qmk-social-card.jpg",
|
||||
navbar: {
|
||||
title: "QMK Firmware Docs",
|
||||
logo: {
|
||||
alt: "QMK Firmware",
|
||||
src: "img/qmk-new-light.svg",
|
||||
srcDark: "img/qmk-new-dark.svg",
|
||||
width: 32,
|
||||
height: 32,
|
||||
},
|
||||
items: [
|
||||
// {
|
||||
// type: 'localeDropdown',
|
||||
// position: 'right',
|
||||
// },
|
||||
{
|
||||
href: "https://github.com/qmk/qmk_firmware",
|
||||
label: "GitHub",
|
||||
position: "right",
|
||||
},
|
||||
],
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
autoCollapseCategories: false,
|
||||
},
|
||||
},
|
||||
footer: {
|
||||
style: "dark",
|
||||
links: [
|
||||
{
|
||||
title: "Docs",
|
||||
items: [
|
||||
{
|
||||
label: "Docs",
|
||||
to: "/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Community",
|
||||
items: [
|
||||
{
|
||||
label: "Discord",
|
||||
href: "https://discord.gg/Uq7gcHh",
|
||||
},
|
||||
{
|
||||
label: "Reddit",
|
||||
href: "https://reddit.com/r/olkb",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "More",
|
||||
items: [
|
||||
{
|
||||
label: "GitHub",
|
||||
href: "https://github.com/qmk/qmk_firmware",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} QMK. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
// applied for - will fill out once we hear back
|
||||
//
|
||||
// algolia: {
|
||||
// // The application ID provided by Algolia
|
||||
// appId: 'YOUR_APP_ID',
|
||||
|
||||
// // Public API key: it is safe to commit it
|
||||
// apiKey: 'YOUR_SEARCH_API_KEY',
|
||||
|
||||
// indexName: 'YOUR_INDEX_NAME',
|
||||
|
||||
// // Optional: see doc section below
|
||||
// contextualSearch: true,
|
||||
|
||||
// // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
|
||||
// externalUrlRegex: 'external\\.com|domain\\.com',
|
||||
|
||||
// // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
|
||||
// replaceSearchResultPathname: {
|
||||
// from: '/docs/', // or as RegExp: /\/docs\//
|
||||
// to: '/',
|
||||
// },
|
||||
|
||||
// // Optional: Algolia search parameters
|
||||
// searchParameters: {},
|
||||
|
||||
// // Optional: path for search page that enabled by default (`false` to disable it)
|
||||
// searchPagePath: 'search',
|
||||
|
||||
// //... other Algolia params
|
||||
// },
|
||||
}),
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "qmk_firmware_docs",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start --host 0.0.0.0 --port 8936",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve --host 0.0.0.0 --port 8936",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.4.0",
|
||||
"@docusaurus/plugin-client-redirects": "^2.4.0",
|
||||
"@docusaurus/preset-classic": "2.4.0",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.35.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.4.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
summary: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "README",
|
||||
label: "About QMK",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Tutorial",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "newbs",
|
||||
},
|
||||
items: [
|
||||
"newbs",
|
||||
"newbs_getting_started",
|
||||
"newbs_building_firmware",
|
||||
"newbs_flashing",
|
||||
"support",
|
||||
"newbs_building_firmware_workflow",
|
||||
"newbs_learn_more_resources",
|
||||
"syllabus",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "FAQs",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "faq_general",
|
||||
},
|
||||
items: [
|
||||
"faq_general",
|
||||
"faq_build",
|
||||
"faq_misc",
|
||||
"faq_debug",
|
||||
"faq_keymap",
|
||||
"squeezing_avr",
|
||||
"reference_glossary",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Configurator",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "newbs_building_firmware_configurator",
|
||||
},
|
||||
items: [
|
||||
"newbs_building_firmware_configurator",
|
||||
"configurator_step_by_step",
|
||||
"configurator_troubleshooting",
|
||||
"configurator_architecture",
|
||||
{
|
||||
type: "category",
|
||||
label: "QMK API",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "api_overview",
|
||||
},
|
||||
items: [
|
||||
"api_overview",
|
||||
"api_docs",
|
||||
"reference_configurator_support",
|
||||
"configurator_default_keymaps",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "CLI",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "cli",
|
||||
},
|
||||
items: [
|
||||
"cli",
|
||||
"cli_configuration",
|
||||
"cli_commands",
|
||||
"cli_tab_complete",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
collapsed: false,
|
||||
label: "Using QMK",
|
||||
items: [
|
||||
{
|
||||
Guides: [
|
||||
"custom_quantum_functions",
|
||||
"driver_installation_zadig",
|
||||
"keymap",
|
||||
{
|
||||
"Development Environments": [
|
||||
"getting_started_docker",
|
||||
"getting_started_vagrant",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Flashing",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "flashing",
|
||||
},
|
||||
items: ["flashing", "flashing_bootloadhid"],
|
||||
},
|
||||
{
|
||||
IDEs: ["other_eclipse", "other_vscode"],
|
||||
"Git Best Practices": [
|
||||
"newbs_git_best_practices",
|
||||
"newbs_git_using_your_master_branch",
|
||||
"newbs_git_resolving_merge_conflicts",
|
||||
"newbs_git_resynchronize_a_branch",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"Simple Keycodes": [
|
||||
"keycodes",
|
||||
"keycodes_basic",
|
||||
"reference_keymap_extras",
|
||||
"feature_advanced_keycodes",
|
||||
"quantum_keycodes",
|
||||
"keycodes_magic",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Advanced Keycodes": [
|
||||
"feature_command",
|
||||
"feature_dynamic_macros",
|
||||
"feature_grave_esc",
|
||||
"feature_leader_key",
|
||||
"mod_tap",
|
||||
"feature_macros",
|
||||
"feature_mouse_keys",
|
||||
"feature_programmable_button",
|
||||
"feature_space_cadet",
|
||||
"keycodes_us_ansi_shifted",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Software Features": [
|
||||
"feature_auto_shift",
|
||||
"feature_autocorrect",
|
||||
"feature_caps_word",
|
||||
"feature_combo",
|
||||
"feature_debounce_type",
|
||||
"feature_eeprom",
|
||||
"feature_key_lock",
|
||||
"feature_key_overrides",
|
||||
"feature_layers",
|
||||
"one_shot_keys",
|
||||
"feature_os_detection",
|
||||
"feature_rawhid",
|
||||
"feature_secure",
|
||||
"feature_send_string",
|
||||
"feature_sequencer",
|
||||
"feature_swap_hands",
|
||||
"feature_tap_dance",
|
||||
"tap_hold",
|
||||
"feature_tri_layer",
|
||||
"feature_unicode",
|
||||
"feature_userspace",
|
||||
"feature_wpm",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Hardware Features": [
|
||||
{
|
||||
Displays: [
|
||||
"quantum_painter",
|
||||
"quantum_painter_lvgl",
|
||||
"feature_hd44780",
|
||||
"feature_st7565",
|
||||
"feature_oled_driver",
|
||||
],
|
||||
Lighting: [
|
||||
"feature_backlight",
|
||||
"feature_led_matrix",
|
||||
"feature_rgblight",
|
||||
"feature_rgb_matrix",
|
||||
],
|
||||
},
|
||||
"feature_audio",
|
||||
"feature_bluetooth",
|
||||
"feature_bootmagic",
|
||||
"feature_converters",
|
||||
"custom_matrix",
|
||||
"feature_digitizer",
|
||||
"feature_dip_switch",
|
||||
"feature_encoders",
|
||||
"feature_haptic_feedback",
|
||||
"feature_joystick",
|
||||
"feature_led_indicators",
|
||||
"feature_midi",
|
||||
"feature_pointing_device",
|
||||
"feature_ps2_mouse",
|
||||
"feature_split_keyboard",
|
||||
"feature_stenography",
|
||||
"feature_velocikey",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Keyboard Building": [
|
||||
"easy_maker",
|
||||
"porting_your_keyboard_to_qmk",
|
||||
"hand_wire",
|
||||
"isp_flashing_guide",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: "Developing QMK",
|
||||
collapsed: false,
|
||||
items: [
|
||||
"pr_checklist",
|
||||
{
|
||||
type: "category",
|
||||
label: "Breaking Changes",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "breaking_changes",
|
||||
},
|
||||
items: [
|
||||
"breaking_changes",
|
||||
"breaking_changes_instructions",
|
||||
// "ChangeLog/20230226",
|
||||
// "breaking_changes_history",
|
||||
{
|
||||
type: 'category',
|
||||
label: "Past Breaking Changes",
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
title: 'Past Breaking Changes',
|
||||
slug: '/breaking_changes/all',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: "autogenerated",
|
||||
dirName: "ChangeLog",
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"C Development": [
|
||||
"arm_debugging",
|
||||
"coding_conventions_c",
|
||||
"compatible_microcontrollers",
|
||||
"hardware_drivers",
|
||||
"adc_driver",
|
||||
"audio_driver",
|
||||
"i2c_driver",
|
||||
"spi_driver",
|
||||
"ws2812_driver",
|
||||
"eeprom_driver",
|
||||
"flash_driver",
|
||||
"serial_driver",
|
||||
"uart_driver",
|
||||
"gpio_control",
|
||||
"hardware_keyboard_guidelines",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Python Development": [
|
||||
"coding_conventions_python",
|
||||
"cli_development",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Configurator Development": [
|
||||
{
|
||||
"QMK API": [
|
||||
"api_development_environment",
|
||||
"api_development_overview",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"Hardware Platform Development": [
|
||||
{
|
||||
"Arm/ChibiOS": [
|
||||
"platformdev_selecting_arm_mcu",
|
||||
"platformdev_chibios_earlyinit",
|
||||
"platformdev_rp2040",
|
||||
"platformdev_proton_c",
|
||||
"platformdev_blackpill_f4x1",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"QMK Reference": [
|
||||
"contributing",
|
||||
"translating",
|
||||
"config_options",
|
||||
"data_driven_config",
|
||||
"getting_started_make_guide",
|
||||
"documentation_best_practices",
|
||||
"documentation_templates",
|
||||
"feature_layouts",
|
||||
"unit_testing",
|
||||
"ref_functions",
|
||||
"reference_info_json",
|
||||
],
|
||||
},
|
||||
{
|
||||
"For a Deeper Understanding": [
|
||||
"how_keyboards_work",
|
||||
"how_a_matrix_works",
|
||||
"understanding_qmk",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Doxygen Documentation',
|
||||
// needs to be an external link to be unmanaged by docusaurus
|
||||
// other solutions: https://stackoverflow.com/a/63365741/1530201
|
||||
href: 'https://docusaurus.qmk.fm/doxygen/'
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
||||
@@ -0,0 +1,22 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
function removeHashSlash(url) {
|
||||
return url.replace(/\/#\//, '/');
|
||||
}
|
||||
|
||||
export default function DocsifyForwarder(props) {
|
||||
const history = useHistory();
|
||||
|
||||
useEffect(() => {
|
||||
const currentUrl = window.location.href;
|
||||
if (currentUrl.includes('/#/')) {
|
||||
const newUrl = removeHashSlash(currentUrl);
|
||||
window.history.replaceState({}, '', newUrl);
|
||||
const relativePath = new URL(newUrl).pathname;
|
||||
history.push(relativePath);
|
||||
}
|
||||
}, [history]);
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #2d6fc5;
|
||||
--ifm-color-primary-dark: #294e78;
|
||||
--ifm-color-primary-darker: #274d71;
|
||||
--ifm-color-primary-darkest: #20355d;
|
||||
--ifm-color-primary-light: #335c92;
|
||||
--ifm-color-primary-lighter: #355899;
|
||||
--ifm-color-primary-lightest: #3c60ad;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #c26e25;
|
||||
--ifm-color-primary-dark: #af7621;
|
||||
--ifm-color-primary-darker: #a5641f;
|
||||
--ifm-color-primary-darkest: #885a1a;
|
||||
--ifm-color-primary-light: #d58229;
|
||||
--ifm-color-primary-lighter: #d88232;
|
||||
--ifm-color-primary-lightest: #dd964f;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 793 B |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 281 281" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-597.647,-5630.35)">
|
||||
<g id="qmk-new-dark" transform="matrix(0.632083,0,0,0.627831,726.192,4200.78)">
|
||||
<rect x="-203.366" y="2277" width="443" height="446" style="fill:none;"/>
|
||||
<g transform="matrix(1.58207,0,0,1.59279,-651.083,-6690.94)">
|
||||
<path d="M342,5738.86L321.5,5738.86C317.361,5738.86 314,5735.49 314,5731.36C314,5727.22 317.361,5723.86 321.5,5723.86L342,5723.86L342,5715.47C342,5700.78 353.924,5688.86 368.61,5688.86L376.567,5688.86L376.567,5668.86C376.567,5664.75 379.897,5661.42 384,5661.42C388.103,5661.42 391.433,5664.75 391.433,5668.86L391.433,5688.86L416.067,5688.86L416.067,5668.86C416.067,5664.75 419.397,5661.42 423.5,5661.42C427.603,5661.42 430.933,5664.75 430.933,5668.86L430.933,5688.86L454.567,5688.86L454.567,5668.86C454.567,5664.75 457.897,5661.42 462,5661.42C466.103,5661.42 469.433,5664.75 469.433,5668.86L469.433,5688.86L477.39,5688.86C492.076,5688.86 504,5700.78 504,5715.47L504,5723.86L524.5,5723.86C528.639,5723.86 532,5727.22 532,5731.36C532,5735.49 528.639,5738.86 524.5,5738.86L504,5738.86L504,5762.36L524.5,5762.36C528.639,5762.36 532,5765.72 532,5769.86C532,5773.99 528.639,5777.36 524.5,5777.36L504,5777.36L504,5801.86L524.5,5801.86C528.639,5801.86 532,5805.22 532,5809.36C532,5813.49 528.639,5816.86 524.5,5816.86L504,5816.86L504,5824.25C504,5838.93 492.076,5850.86 477.39,5850.86L469.5,5850.86L469.5,5871.86C469.5,5875.99 466.139,5879.36 462,5879.36C457.861,5879.36 454.5,5875.99 454.5,5871.86L454.5,5850.86L431,5850.86L431,5871.86C431,5875.99 427.639,5879.36 423.5,5879.36C419.361,5879.36 416,5875.99 416,5871.86L416,5850.86L391.5,5850.86L391.5,5871.86C391.5,5875.99 388.139,5879.36 384,5879.36C379.861,5879.36 376.5,5875.99 376.5,5871.86L376.5,5850.86L368.61,5850.86C353.924,5850.86 342,5838.93 342,5824.25L342,5816.86L321.5,5816.86C317.361,5816.86 314,5813.49 314,5809.36C314,5805.22 317.361,5801.86 321.5,5801.86L342,5801.86L342,5777.36L321.5,5777.36C317.361,5777.36 314,5773.99 314,5769.86C314,5765.72 317.361,5762.36 321.5,5762.36L342,5762.36L342,5738.86Z" style="fill:white;"/>
|
||||
</g>
|
||||
<g transform="matrix(1.58207,0,0,1.59279,-651.083,-6690.94)">
|
||||
<path d="M416.067,5800.49C402.166,5799.34 393.38,5795 387.738,5790.24C376.29,5780.57 376.567,5768.36 376.567,5768.36L376.567,5731.36C376.567,5727.25 379.897,5723.92 384,5723.92C388.103,5723.92 391.433,5727.25 391.433,5731.36L391.433,5768.36C391.434,5768.36 391.712,5774.14 397.326,5778.88C401.148,5782.1 407.068,5784.67 416.067,5785.57L416.067,5731.36C416.067,5727.25 419.397,5723.92 423.5,5723.92C427.603,5723.92 430.933,5727.25 430.933,5731.36L430.933,5785.55C439.5,5784.63 445.157,5782.11 448.818,5778.94C454.317,5774.18 454.567,5768.36 454.567,5768.36L454.567,5731.36C454.567,5727.25 457.897,5723.92 462,5723.92C466.103,5723.92 469.433,5727.25 469.433,5731.36L469.433,5768.36C469.433,5768.36 469.685,5780.53 458.55,5790.18C453.039,5794.95 444.473,5799.3 430.933,5800.48L430.933,5809.36C430.933,5813.46 427.603,5816.79 423.5,5816.79C419.397,5816.79 416.067,5813.46 416.067,5809.36L416.067,5800.49Z" style="fill:rgb(16,16,16);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 281 281" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-282.994,-5630.35)">
|
||||
<g id="qmk-new-light" transform="matrix(0.632083,0,0,0.627831,411.538,4200.78)">
|
||||
<rect x="-203.366" y="2277" width="443" height="446" style="fill:none;"/>
|
||||
<g transform="matrix(1.58207,0,0,1.59279,-651.083,-6690.94)">
|
||||
<path d="M342,5738.86L321.5,5738.86C317.361,5738.86 314,5735.49 314,5731.36C314,5727.22 317.361,5723.86 321.5,5723.86L342,5723.86L342,5715.47C342,5700.78 353.924,5688.86 368.61,5688.86L376.567,5688.86L376.567,5668.86C376.567,5664.75 379.897,5661.42 384,5661.42C388.103,5661.42 391.433,5664.75 391.433,5668.86L391.433,5688.86L416.067,5688.86L416.067,5668.86C416.067,5664.75 419.397,5661.42 423.5,5661.42C427.603,5661.42 430.933,5664.75 430.933,5668.86L430.933,5688.86L454.567,5688.86L454.567,5668.86C454.567,5664.75 457.897,5661.42 462,5661.42C466.103,5661.42 469.433,5664.75 469.433,5668.86L469.433,5688.86L477.39,5688.86C492.076,5688.86 504,5700.78 504,5715.47L504,5723.86L524.5,5723.86C528.639,5723.86 532,5727.22 532,5731.36C532,5735.49 528.639,5738.86 524.5,5738.86L504,5738.86L504,5762.36L524.5,5762.36C528.639,5762.36 532,5765.72 532,5769.86C532,5773.99 528.639,5777.36 524.5,5777.36L504,5777.36L504,5801.86L524.5,5801.86C528.639,5801.86 532,5805.22 532,5809.36C532,5813.49 528.639,5816.86 524.5,5816.86L504,5816.86L504,5824.25C504,5838.93 492.076,5850.86 477.39,5850.86L469.5,5850.86L469.5,5871.86C469.5,5875.99 466.139,5879.36 462,5879.36C457.861,5879.36 454.5,5875.99 454.5,5871.86L454.5,5850.86L431,5850.86L431,5871.86C431,5875.99 427.639,5879.36 423.5,5879.36C419.361,5879.36 416,5875.99 416,5871.86L416,5850.86L391.5,5850.86L391.5,5871.86C391.5,5875.99 388.139,5879.36 384,5879.36C379.861,5879.36 376.5,5875.99 376.5,5871.86L376.5,5850.86L368.61,5850.86C353.924,5850.86 342,5838.93 342,5824.25L342,5816.86L321.5,5816.86C317.361,5816.86 314,5813.49 314,5809.36C314,5805.22 317.361,5801.86 321.5,5801.86L342,5801.86L342,5777.36L321.5,5777.36C317.361,5777.36 314,5773.99 314,5769.86C314,5765.72 317.361,5762.36 321.5,5762.36L342,5762.36L342,5738.86Z" style="fill:rgb(16,16,16);"/>
|
||||
</g>
|
||||
<g transform="matrix(1.58207,0,0,1.59279,-651.083,-6690.94)">
|
||||
<path d="M416.067,5800.49C402.166,5799.34 393.38,5795 387.738,5790.24C376.29,5780.57 376.567,5768.36 376.567,5768.36L376.567,5731.36C376.567,5727.25 379.897,5723.92 384,5723.92C388.103,5723.92 391.433,5727.25 391.433,5731.36L391.433,5768.36C391.434,5768.36 391.712,5774.14 397.326,5778.88C401.148,5782.1 407.068,5784.67 416.067,5785.57L416.067,5731.36C416.067,5727.25 419.397,5723.92 423.5,5723.92C427.603,5723.92 430.933,5727.25 430.933,5731.36L430.933,5785.55C439.5,5784.63 445.157,5782.11 448.818,5778.94C454.317,5774.18 454.567,5768.36 454.567,5768.36L454.567,5731.36C454.567,5727.25 457.897,5723.92 462,5723.92C466.103,5723.92 469.433,5727.25 469.433,5731.36L469.433,5768.36C469.433,5768.36 469.685,5780.53 458.55,5790.18C453.039,5794.95 444.473,5799.3 430.933,5800.48L430.933,5809.36C430.933,5813.46 427.603,5816.79 423.5,5816.79C419.397,5816.79 416.067,5813.46 416.067,5809.36L416.067,5800.49Z" style="fill:white;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"MKL26Z64" : {
|
||||
"MCU" : "cortex-m0plus",
|
||||
"ARMV": 6,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "KL2x",
|
||||
"MCU_LDSCRIPT": "MKL26Z64",
|
||||
"MCU_STARTUP": "kl2x",
|
||||
"BOARD": "PJRC_TEENSY_LC"
|
||||
},
|
||||
"MK20DX128" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "K20x",
|
||||
"MCU_LDSCRIPT": "MK20DX128",
|
||||
"MCU_STARTUP": "k20x5",
|
||||
"BOARD": "PJRC_TEENSY_3"
|
||||
},
|
||||
"MK20DX256" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "K20x",
|
||||
"MCU_LDSCRIPT": "MK20DX256",
|
||||
"MCU_STARTUP": "k20x7",
|
||||
"BOARD": "PJRC_TEENSY_3_1"
|
||||
},
|
||||
"STM32F303" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "STM32",
|
||||
"MCU_SERIES": "STM32F3xx",
|
||||
"MCU_LDSCRIPT": "STM32F303xC",
|
||||
"MCU_STARTUP": "stm32f3xx",
|
||||
"BOARD": "GENERIC_STM32_F303XC",
|
||||
"USE_FPU": true,
|
||||
"UF2_FAMILY": "STM32F3",
|
||||
"STM32_BOOTLOADER_ADDRESS": "0x1FFFD800"
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
include(ResolveToolchain)
|
||||
|
||||
macro(add_keyboard KEYBOARD_FOLDER KEYMAP_FOLDER)
|
||||
# not entirely sure why this is necessary
|
||||
# set(TEMP_PATH ${KEYBOARD_FOLDER})
|
||||
# cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
# if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
# set(KEYBOARD_FOLDER_ABS ${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD_FOLDER})
|
||||
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
|
||||
# # message(FATAL_ERROR "Keyboard does not exist in QMK - try using an absolute path to the keyboard folder")
|
||||
# resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
# endif()
|
||||
# else()
|
||||
# set(KEYBOARD_FOLDER_ABS ${KEYBOARD_FOLDER})
|
||||
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
|
||||
# message(FATAL_ERROR "Absolute path to keyboard does not exist")
|
||||
# endif()
|
||||
# endif()
|
||||
|
||||
resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
|
||||
set(TEMP_PATH ${KEYBOARD_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
|
||||
set(TEMP_PATH ${KEYMAP_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
|
||||
if(${IS_KEYMAP_FOLDER_RELATIVE})
|
||||
set(KEYMAP_NAME ${KEYMAP_FOLDER})
|
||||
else()
|
||||
if(WIN32)
|
||||
set(KEYMAP_NAME $ENV{USERNAME})
|
||||
else()
|
||||
set(KEYMAP_NAME $ENV{USE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# find the right toolchain
|
||||
|
||||
# not sure we need to validate here
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
|
||||
|
||||
string(JSON PROCESSOR GET ${JSON_STRING} processor)
|
||||
resolve_toolchain(${PROCESSOR} TOOLCHAIN)
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
|
||||
if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_FOLDER} KEYBOARD_SLUG)
|
||||
else()
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
|
||||
endif()
|
||||
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
|
||||
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
|
||||
ExternalProject_Add(${TARGET_NAME}
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}
|
||||
# PREFIX ${CMAKE_SOURCE_DIR}/build/keyboards/${KEYBOARD_FOLDER}
|
||||
TMP_DIR ${CMAKE_SOURCE_DIR}/build/tmp
|
||||
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/build/download
|
||||
BINARY_DIR ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}
|
||||
STAMP_DIR ${CMAKE_SOURCE_DIR}/build/stamp
|
||||
LOG_DIR ${CMAKE_SOURCE_DIR}/build/log
|
||||
INSTALL_DIR ${CMAKE_SOURCE_DIR}/build/install
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/${TARGET_NAME}${QMK_EXTENSION} ${CMAKE_SOURCE_DIR}/${TARGET_NAME}${QMK_EXTENSION}
|
||||
# this seems to work well for all systems so far - not sure if it'd be useful to customize
|
||||
CMAKE_GENERATOR "Unix Makefiles"
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchains/${TOOLCHAIN}.cmake
|
||||
-DQMK_KEYBOARD=${KEYBOARD_SLUG}
|
||||
-DQMK_KEYBOARD_FOLDER=${KEYBOARD_FOLDER}
|
||||
-DQMK_KEYMAP_FOLDER=${KEYMAP_FOLDER}
|
||||
-DTARGET_NAME=${TARGET_NAME}
|
||||
)
|
||||
ExternalProject_Add_Step(${TARGET_NAME} copy_compile_commands
|
||||
DEPENDEES configure
|
||||
DEPENDERS build
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}/compile_commands.json ${CMAKE_SOURCE_DIR}/compile_commands.json
|
||||
# BYPRODUCTS ${CMAKE_SOURCE_DIR}/compile_commands.json
|
||||
ALWAYS TRUE
|
||||
)
|
||||
|
||||
# file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${KEYMAP_FOLDER}|${KEYBOARD_FOLDER}|Made by: ${MANUFACTURER}\n")
|
||||
endmacro(add_keyboard)
|
||||
@@ -1,44 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJSON)
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
|
||||
|
||||
if(NOT DEFINED QMK_KEYMAP_FOLDER)
|
||||
set(QMK_KEYMAP_FOLDER default)
|
||||
endif()
|
||||
|
||||
set(TEMP_PATH ${QMK_KEYBOARD_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
|
||||
set(TEMP_PATH ${QMK_KEYMAP_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
|
||||
|
||||
if(${IS_KEYMAP_FOLDER_RELATIVE})
|
||||
set(KEYMAP_NAME ${QMK_KEYMAP_FOLDER})
|
||||
else()
|
||||
if(WIN32)
|
||||
set(KEYMAP_NAME $ENV{USERNAME})
|
||||
else()
|
||||
set(KEYMAP_NAME $ENV{USE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
|
||||
|
||||
if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
string(MAKE_C_IDENTIFIER ${QMK_KEYBOARD_FOLDER} KEYBOARD_SLUG)
|
||||
else()
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
|
||||
endif()
|
||||
|
||||
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
|
||||
|
||||
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${QMK_KEYMAP_FOLDER}|${QMK_KEYBOARD_FOLDER}:${QMK_KEYMAP_FOLDER}|Made by: ${MANUFACTURER}\n")
|
||||
|
||||
message(STATUS "Added keyboard '${QMK_KEYBOARD_FOLDER}' with keymap '${QMK_KEYMAP_FOLDER}'")
|
||||
@@ -1,14 +0,0 @@
|
||||
macro(find_arm_toolchain)
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
include(GetARMToolchain)
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
endif()
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
message(FATAL_ERROR "ARM Toolchain could not be found")
|
||||
endif()
|
||||
|
||||
message(STATUS "ARM toolchain found: ${TOOLCHAIN_ROOT}")
|
||||
endmacro()
|
||||
@@ -1,20 +0,0 @@
|
||||
macro(find_avr_toolchain)
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
include(GetAVRToolchain)
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
endif()
|
||||
|
||||
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
|
||||
if(${DFU_PROGRAMMER} STREQUAL "DFU_PROGRAMMER-NOTFOUND")
|
||||
include(GetDfuProgrammer)
|
||||
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
|
||||
endif()
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
message(FATAL_ERROR "AVR Toolchain could not be found")
|
||||
endif()
|
||||
|
||||
message(STATUS "AVR toolchain found: ${TOOLCHAIN_ROOT}")
|
||||
endmacro()
|
||||
@@ -1,282 +0,0 @@
|
||||
include(ParseMakefile)
|
||||
|
||||
# STM32F303
|
||||
|
||||
set(MCU "cortex-m4")
|
||||
set(ARMV 7)
|
||||
set(MCU_FAMILY "STM32")
|
||||
set(MCU_SERIES "STM32F3xx")
|
||||
string(TOUPPER ${MCU_SERIES} MCU_SERIES_UPPER)
|
||||
set(MCU_LDSCRIPT "STM32F303xC")
|
||||
set(MCU_STARTUP "stm32f3xx")
|
||||
set(BOARD "GENERIC_STM32_F303XC")
|
||||
set(USE_FPU TRUE)
|
||||
set(UF2_FAMILY "STM32F3")
|
||||
set(STM32_BOOTLOADER_ADDRESS 0x1FFFD800)
|
||||
set(EEPROM_DRIVER "wear_leveling" FORCE)
|
||||
set(WEAR_LEVELING_DRIVER "embedded_flash" FORCE)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
QMK_MCU_FAMILY_${MCU_FAMILY}
|
||||
QMK_MCU_SERIES_${MCU_SERIES_UPPER}
|
||||
)
|
||||
|
||||
target_compile_options(qmk PUBLIC
|
||||
-march=armv7-m
|
||||
)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
MCU_${MCU_FAMILY}
|
||||
__ARM_ARCH_7M__
|
||||
)
|
||||
|
||||
# platforms/chibios/platform.mk
|
||||
|
||||
if(NOT DEFINED USE_PROCESS_STACKSIZE)
|
||||
set(USE_PROCESS_STACKSIZE 0x800)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED USE_EXCEPTIONS_STACKSIZE)
|
||||
set(USE_EXCEPTIONS_STACKSIZE 0x400)
|
||||
endif()
|
||||
|
||||
target_link_options(qmk PUBLIC
|
||||
-Wl,--defsym=__process_stack_size__=${USE_PROCESS_STACKSIZE},--defsym=__main_stack_size__=${USE_EXCEPTIONS_STACKSIZE}
|
||||
)
|
||||
|
||||
if(NOT DEFINED MCU_PORT_NAME)
|
||||
set(MCU_PORT_NAME ${MCU_FAMILY})
|
||||
endif()
|
||||
set(MCU_ARCH ${MCU})
|
||||
if(NOT DEFINED CHIBIOS_PORT)
|
||||
set(CHIBIOS_PORT "ARMv${ARMV}-M")
|
||||
endif()
|
||||
if(NOT DEFINED PLATFORM_NAME)
|
||||
set(PLATFORM_NAME platform)
|
||||
endif()
|
||||
|
||||
set(CHIBIOS ${CMAKE_SOURCE_DIR}/lib/chibios)
|
||||
set(CHIBIOS_CONTRIB ${CMAKE_SOURCE_DIR}/lib/chibios-contrib)
|
||||
|
||||
# port*.mk
|
||||
include(chibios/ports/${CHIBIOS_PORT})
|
||||
|
||||
# platform.mk
|
||||
include(chibios/ports/${MCU_SERIES})
|
||||
|
||||
# startup_*.mk - might need to convert these
|
||||
find_file(STARTUP_MK startup_${MCU_STARTUP}.mk
|
||||
${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/mk
|
||||
${CHIBIOS}/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
${CHIBIOS_CONTRIB}/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
)
|
||||
get_filename_component(STARTUP_DIR ${STARTUP_MK} DIRECTORY)
|
||||
ParseMakefile(${STARTUP_MK})
|
||||
target_sources(qmk PUBLIC ${STARTUPSRC})
|
||||
target_sources(qmk PUBLIC ${STARTUPASM})
|
||||
target_include_directories(qmk PUBLIC ${STARTUPINC})
|
||||
|
||||
# board paths - we should just standardize these
|
||||
find_path(BOARD_PATH
|
||||
NAMES
|
||||
boards/${BOARD}/board.mk
|
||||
board/board.mk
|
||||
PATHS
|
||||
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}
|
||||
${CHIBIOS}/os/hal/
|
||||
${CHIBIOS_CONTRIB}/os/hal/
|
||||
)
|
||||
# if(EXISTS ${BOARD_PATH}/rules.mk)
|
||||
# ParseMakefile(${BOARD_PATH}/rules.mk)
|
||||
# endif()
|
||||
|
||||
if(EXISTS ${BOARD_PATH}/configs/config.h)
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${BOARD_PATH}/configs/config.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(EXISTS ${BOARD_PATH}/configs/post_config.h)
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${BOARD_PATH}/configs/post_config.h
|
||||
)
|
||||
endif()
|
||||
|
||||
find_file(BOARD_MK board.mk
|
||||
${BOARD_PATH}/boards/${BOARD}
|
||||
${BOARD_PATH}/board
|
||||
)
|
||||
ParseMakefile(${BOARD_MK})
|
||||
|
||||
target_sources(qmk PUBLIC ${BOARDSRC})
|
||||
target_include_directories(qmk PUBLIC ${BOARDINC})
|
||||
|
||||
# allow board.c to be overriden
|
||||
file(RELATIVE_PATH INIT_HOOK_RELATIVE ${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_SOURCE_DIR}/tmk_core/protocol/chibios/init_hooks.h")
|
||||
set_source_files_properties(${BOARDSRC} TARGET_DIRECTORY qmk PROPERTIES
|
||||
# COMPILE_OPTIONS "-include ../../../tmk_core/protocol/chibios/init_hooks.h"
|
||||
COMPILE_OPTIONS "-include ${INIT_HOOK_RELATIVE}"
|
||||
)
|
||||
|
||||
# bootloader
|
||||
if(DEFINED STM32_BOOTLOADER_ADDRESS)
|
||||
target_compile_definitions(qmk PUBLIC STM32_BOOTLOADER_ADDRESS=${STM32_BOOTLOADER_ADDRESS})
|
||||
endif()
|
||||
if(DEFINED WB32_BOOTLOADER_ADDRESS)
|
||||
target_compile_definitions(qmk PUBLIC WB32_BOOTLOADER_ADDRESS=${WB32_BOOTLOADER_ADDRESS})
|
||||
endif()
|
||||
|
||||
find_file(BOOTLOADER_DEFS_H bootloader_defs.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
|
||||
${BOARD_PATH}/configs
|
||||
)
|
||||
if(EXISTS ${BOOTLOADER_DEFS_H})
|
||||
target_compile_options(qmk PUBLIC -include ${BOOTLOADER_DEFS_H})
|
||||
endif()
|
||||
|
||||
# chconf directories
|
||||
find_path(CHCONFDIR chconf.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHCONFDIR})
|
||||
|
||||
# halconf directories
|
||||
find_path(HALCONFDIR halconf.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${HALCONFDIR})
|
||||
|
||||
# linker script
|
||||
find_file(LDSCRIPT ${MCU_LDSCRIPT}.ld
|
||||
${QMK_KEYBOARD_FOLDER}/ld
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/ld
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/ld
|
||||
${STARTUPLD}
|
||||
${STARTUPLD_CONTRIB}
|
||||
)
|
||||
get_filename_component(LDSCRIPT_PATH ${LDSCRIPT} DIRECTORY)
|
||||
target_link_options(qmk PUBLIC
|
||||
-T ${LDSCRIPT}
|
||||
-L ${LDSCRIPT_PATH}
|
||||
)
|
||||
|
||||
# os/hal/hal.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/src/hal.c
|
||||
${CHIBIOS}/os/hal/src/hal_st.c
|
||||
${CHIBIOS}/os/hal/src/hal_buffers.c
|
||||
${CHIBIOS}/os/hal/src/hal_queues.c
|
||||
${CHIBIOS}/os/hal/src/hal_flash.c
|
||||
${CHIBIOS}/os/hal/src/hal_mmcsd.c
|
||||
${CHIBIOS}/os/hal/src/hal_adc.c
|
||||
${CHIBIOS}/os/hal/src/hal_can.c
|
||||
${CHIBIOS}/os/hal/src/hal_crypto.c
|
||||
${CHIBIOS}/os/hal/src/hal_dac.c
|
||||
${CHIBIOS}/os/hal/src/hal_efl.c
|
||||
${CHIBIOS}/os/hal/src/hal_gpt.c
|
||||
${CHIBIOS}/os/hal/src/hal_i2c.c
|
||||
${CHIBIOS}/os/hal/src/hal_i2s.c
|
||||
${CHIBIOS}/os/hal/src/hal_icu.c
|
||||
${CHIBIOS}/os/hal/src/hal_mac.c
|
||||
${CHIBIOS}/os/hal/src/hal_mmc_spi.c
|
||||
${CHIBIOS}/os/hal/src/hal_pal.c
|
||||
${CHIBIOS}/os/hal/src/hal_pwm.c
|
||||
${CHIBIOS}/os/hal/src/hal_rtc.c
|
||||
${CHIBIOS}/os/hal/src/hal_sdc.c
|
||||
${CHIBIOS}/os/hal/src/hal_serial.c
|
||||
${CHIBIOS}/os/hal/src/hal_serial_usb.c
|
||||
${CHIBIOS}/os/hal/src/hal_sio.c
|
||||
${CHIBIOS}/os/hal/src/hal_spi.c
|
||||
${CHIBIOS}/os/hal/src/hal_trng.c
|
||||
${CHIBIOS}/os/hal/src/hal_uart.c
|
||||
${CHIBIOS}/os/hal/src/hal_usb.c
|
||||
${CHIBIOS}/os/hal/src/hal_wdg.c
|
||||
${CHIBIOS}/os/hal/src/hal_wspi.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/include
|
||||
)
|
||||
|
||||
# os/hal/osal/rt-nil/osal.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/osal/rt-nil/osal.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/osal/rt-nil
|
||||
)
|
||||
|
||||
# os/rt/rt.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/rt/src/chsys.c
|
||||
${CHIBIOS}/os/rt/src/chrfcu.c
|
||||
${CHIBIOS}/os/rt/src/chdebug.c
|
||||
${CHIBIOS}/os/rt/src/chtrace.c
|
||||
${CHIBIOS}/os/rt/src/chvt.c
|
||||
${CHIBIOS}/os/rt/src/chschd.c
|
||||
${CHIBIOS}/os/rt/src/chinstances.c
|
||||
${CHIBIOS}/os/rt/src/chthreads.c
|
||||
${CHIBIOS}/os/rt/src/chsys.c
|
||||
${CHIBIOS}/os/rt/src/chrfcu.c
|
||||
${CHIBIOS}/os/rt/src/chdebug.c
|
||||
${CHIBIOS}/os/rt/src/chtrace.c
|
||||
${CHIBIOS}/os/rt/src/chvt.c
|
||||
${CHIBIOS}/os/rt/src/chschd.c
|
||||
${CHIBIOS}/os/rt/src/chinstances.c
|
||||
${CHIBIOS}/os/rt/src/chthreads.c
|
||||
${CHIBIOS}/os/rt/src/chtm.c
|
||||
${CHIBIOS}/os/rt/src/chstats.c
|
||||
${CHIBIOS}/os/rt/src/chregistry.c
|
||||
${CHIBIOS}/os/rt/src/chsem.c
|
||||
${CHIBIOS}/os/rt/src/chmtx.c
|
||||
${CHIBIOS}/os/rt/src/chcond.c
|
||||
${CHIBIOS}/os/rt/src/chevents.c
|
||||
${CHIBIOS}/os/rt/src/chmsg.c
|
||||
${CHIBIOS}/os/rt/src/chdynamic.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/rt/include
|
||||
)
|
||||
|
||||
# os/oslib/oslib.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/oslib/src/chmboxes.c
|
||||
${CHIBIOS}/os/oslib/src/chmemcore.c
|
||||
${CHIBIOS}/os/oslib/src/chmemheaps.c
|
||||
${CHIBIOS}/os/oslib/src/chmempools.c
|
||||
${CHIBIOS}/os/oslib/src/chpipes.c
|
||||
${CHIBIOS}/os/oslib/src/chobjcaches.c
|
||||
${CHIBIOS}/os/oslib/src/chdelegates.c
|
||||
${CHIBIOS}/os/oslib/src/chfactory.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/oslib/include
|
||||
)
|
||||
|
||||
# os/hal/lib/streams/streams.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/lib/streams/chprintf.c
|
||||
${CHIBIOS}/os/hal/lib/streams/chscanf.c
|
||||
${CHIBIOS}/os/hal/lib/streams/memstreams.c
|
||||
${CHIBIOS}/os/hal/lib/streams/nullstreams.c
|
||||
${CHIBIOS}/os/hal/lib/streams/bufstreams.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/lib/streams
|
||||
)
|
||||
|
||||
# resume platform.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/various/syscalls.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/license
|
||||
${CHIBIOS}/os/oslib/include
|
||||
${CHIBIOS}/os/various
|
||||
)
|
||||
@@ -1,27 +0,0 @@
|
||||
include(UpdateSubmodule)
|
||||
update_submodule(lib/lufa)
|
||||
set(LUFA_PATH ${CMAKE_SOURCE_DIR}/lib/lufa)
|
||||
set(LUFA_ROOT_PATH ${LUFA_PATH}/LUFA)
|
||||
target_sources(qmk PUBLIC
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBController_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBInterrupt_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/ConfigDescriptors.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/Events.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/USBTask.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Class/Common/HIDParser.c
|
||||
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Host_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Pipe_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/PipeStream_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/HostStandardReq.c
|
||||
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Device_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Endpoint_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/EndpointStream_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/DeviceStandardReq.c
|
||||
${LUFA_PATH}/LUFA/Drivers/USB/USB.h
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${LUFA_PATH})
|
||||
# target_link_libraries(lufa ${QMK_TARGET})
|
||||
# target_link_libraries(lufa tmk_core_protocol)
|
||||
# target_link_libraries(lufa tmk_core_protocol_lufa)
|
||||
@@ -1,24 +0,0 @@
|
||||
message("Downloading gcc-arm-none-eabi")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip?rev=8f4a92e2ec2040f89912f372a55d8cf3&hash=8A9EAF77EF1957B779C59EADDBF2DAC118170BBF
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
|
||||
EXPECTED_HASH MD5=2bc8f0c4c4659f8259c8176223eeafc1
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2?rev=78196d3461ba4c9089a67b5f33edf82a&hash=D484B37FF37D6FC3597EBE2877FB666A41D5253B
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
|
||||
EXPECTED_HASH MD5=3fe3d8bb693bd0a6e4615b6569443d0d
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
endif()
|
||||
@@ -1,24 +0,0 @@
|
||||
message("Downloading avr-gcc")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-windows.zip
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
|
||||
EXPECTED_HASH SHA256=e921a964fdeaedbe963352d0f26c6520a0a3eb8effc6ff232f3824b06c4ea0e2
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-linux.tar.bz2
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
|
||||
EXPECTED_HASH SHA256=feb034f4b85237032da8bac1f03765af5ebc4a8939b69bed57ff31bc482ca1a6
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
endif()
|
||||
@@ -1,22 +0,0 @@
|
||||
message("Downloading dfu-programmer")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-x64-1.0.0.7z
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-linux-1.0.0.7z
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
|
||||
)
|
||||
endif()
|
||||
@@ -1,51 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
|
||||
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
|
||||
set(CMAKE_MESSAGE_INDENT "")
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STR)
|
||||
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
|
||||
|
||||
file(WRITE "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "")
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
file(GLOB KEYMAPS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/*/keymap.c")
|
||||
foreach(KEYMAP ${KEYMAPS})
|
||||
file(RELATIVE_PATH KEYMAP_C "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps" "${KEYMAP}")
|
||||
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
|
||||
# message(STATUS "${KEYMAP_FOLDER}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
|
||||
endforeach()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymap.c" PARENT_SCOPE)
|
||||
elseif(EXISTS "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(JSON COMMUNITY_LAYOUTS ERROR_VARIABLE NO_COMMUNITY_LAYOUTS GET ${JSON_STR} community_layouts)
|
||||
|
||||
if(${NO_COMMUNITY_LAYOUTS} STREQUAL "NOTFOUND")
|
||||
string(JSON NUM_LAYOUTS LENGTH ${COMMUNITY_LAYOUTS})
|
||||
math(EXPR MAX "${NUM_LAYOUTS} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON LAYOUT GET ${COMMUNITY_LAYOUTS} ${IDX})
|
||||
file(GLOB KEYMAPS "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/*/keymap.c")
|
||||
foreach(KEYMAP ${KEYMAPS})
|
||||
file(RELATIVE_PATH KEYMAP_C "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}" "${KEYMAP}")
|
||||
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
|
||||
# message(STATUS "${KEYMAP_FOLDER}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -1,64 +0,0 @@
|
||||
# Simple CMake utility to read variables from MK files
|
||||
# - Gets contents from given file (name or path)
|
||||
# - Parses the assignment statements
|
||||
# - Makes the same assignments in the PARENT_SCOPE
|
||||
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
endif()
|
||||
|
||||
function(ParseHeader HeaderFile Prefix)
|
||||
_ParseHeader(${HeaderFile} ${Prefix})
|
||||
endfunction()
|
||||
|
||||
macro(_ParseHeader HeaderFile Prefix)
|
||||
message(CHECK_START "Parsing Header")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
message(STATUS "Reading \"${HeaderFile}\"")
|
||||
|
||||
file(READ "${HeaderFile}" FileContents)
|
||||
string(REGEX REPLACE "/\\*.*\\*/" "" FileContents ${FileContents})
|
||||
# replace the \ newlines with spaces
|
||||
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
|
||||
# turn each line into an item in a list
|
||||
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
|
||||
list(REMOVE_ITEM FileLines "")
|
||||
|
||||
foreach(line ${FileLines})
|
||||
# remove comments from the ends of each line
|
||||
string(REGEX REPLACE "//.*" "" line ${line})
|
||||
|
||||
# remove now-empty lines
|
||||
if("${line}" STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# try to process includes, if the file exists
|
||||
if(line MATCHES "^#include \"(.+)\"")
|
||||
set(INCLUDED_HEADER ${CMAKE_MATCH_1})
|
||||
if(EXISTS ${INCLUDED_HEADER})
|
||||
_ParseHeader("${INCLUDED_HEADER}" ${Prefix})
|
||||
else()
|
||||
message(STATUS "Could not read ${INCLUDED_HEADER}")
|
||||
endif()
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# array
|
||||
if(line MATCHES "#define ([A-Za-z0-9_]+) {(.*)}")
|
||||
set(VARIABLE_NAME ${CMAKE_MATCH_1})
|
||||
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
|
||||
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
|
||||
endif()
|
||||
|
||||
# regular variable
|
||||
if(line MATCHES "#define ([A-Za-z0-9_]+) (.*)")
|
||||
set(VARIABLE_NAME ${CMAKE_MATCH_1})
|
||||
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
|
||||
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "Complete")
|
||||
endmacro()
|
||||
@@ -1,98 +0,0 @@
|
||||
# Simple CMake utility to read variables from MK files
|
||||
# - Gets contents from given file (name or path)
|
||||
# - Parses the assignment statements
|
||||
# - Makes the same assignments in the PARENT_SCOPE
|
||||
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
endif()
|
||||
|
||||
function(ParseMakefile MKFile)
|
||||
_ParseMakefile(${MKFile} ${ARGN})
|
||||
endfunction()
|
||||
|
||||
macro(_ParseMakefile MKFile)
|
||||
message(CHECK_START "Parsing Makefile")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
message(STATUS "Reading \"${MKFile}\"")
|
||||
|
||||
file(READ "${MKFile}" FileContents)
|
||||
# replace the \ newlines with spaces
|
||||
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
|
||||
# turn each line into an item in a list
|
||||
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
|
||||
list(REMOVE_ITEM FileLines "")
|
||||
|
||||
foreach(line ${FileLines})
|
||||
# remove comments from the ends of each line
|
||||
string(REGEX REPLACE "#.*" "" line ${line})
|
||||
|
||||
# remove now-empty lines
|
||||
if("${line}" STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# try to process includes, if the file exists
|
||||
if(line MATCHES "^-?include (.+)$")
|
||||
set(MAKE_CHILD ${CMAKE_MATCH_1})
|
||||
if(EXISTS ${MAKE_CHILD})
|
||||
_ParseMakefile("${MAKE_CHILD}" ${ARGN})
|
||||
else()
|
||||
message(STATUS "Could not read ${MAKE_CHILD}")
|
||||
endif()
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# turn the assignment into a list with the first item being the variable name
|
||||
string(REPLACE "=" ";" line_split ${line})
|
||||
list(LENGTH line_split count)
|
||||
|
||||
if(count LESS 2)
|
||||
message(STATUS "Skipping ${line}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list(GET line_split -1 value)
|
||||
string(STRIP ${value} value)
|
||||
# separate_arguments(value)
|
||||
# string(REPLACE " " ";" value ${value})
|
||||
list(REMOVE_AT line_split -1)
|
||||
|
||||
foreach(var_name ${line_split})
|
||||
string(STRIP ${var_name} var_name)
|
||||
# replace $(?) with the variable ? from cmake
|
||||
if(value MATCHES "\\$\\(([^\\(\\)]+)\\)")
|
||||
set(MAKE_VARIABLE "${CMAKE_MATCH_1}")
|
||||
string(REPLACE "$(${MAKE_VARIABLE})" "${${MAKE_VARIABLE}}" value ${value})
|
||||
endif()
|
||||
|
||||
# look for +, assuming it used to be +=
|
||||
if(${var_name} MATCHES "([^ \\+]+) *\\+")
|
||||
message(STATUS "Appending \"${CMAKE_MATCH_1}\" with \"${value}\"")
|
||||
# read parent variable in local & append
|
||||
set(LOCAL_${CMAKE_MATCH_1} ${CMAKE_MATCH_1})
|
||||
# APPEND accepts spaces between values
|
||||
list(APPEND LOCAL_${CMAKE_MATCH_1} ${value})
|
||||
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}})
|
||||
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}} PARENT_SCOPE)
|
||||
else()
|
||||
# set needs ; between elements to be considered a list
|
||||
string(REGEX REPLACE " +" ";" value ${value})
|
||||
# try to find variable in cache and FORCE wtih INTERNAL if it exists
|
||||
if(DEFINED CACHE${${var_name}})
|
||||
message(STATUS "Caching \"${var_name}\" to \"${value}\"")
|
||||
# set locally so replacement still work
|
||||
set(${var_name} ${value})
|
||||
set(${var_name} ${value} CACHE INTERNAL "")
|
||||
else()
|
||||
message(STATUS "Setting \"${var_name}\" to \"${value}\"")
|
||||
set(${var_name} ${value})
|
||||
set(${var_name} ${value} PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "Complete")
|
||||
endmacro()
|
||||
@@ -1,78 +0,0 @@
|
||||
include(ParseMakefile)
|
||||
include(Utils)
|
||||
|
||||
macro(process_keyboard)
|
||||
message(CHECK_START "Processing keyboard")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
|
||||
validate_json(${QMK_KEYBOARD_FOLDER_ABS}/info.json keyboard QMK_KEYBOARD_INFO_JSON_STRING)
|
||||
|
||||
# process rules from info.json
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_rules.hjson JSON_STRING)
|
||||
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${MAPPING_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON RULE_KEY MEMBER ${JSON_STRING} ${IDX})
|
||||
# string(JSON INFO_KEY GET ${JSON_STRING} ${RULE_KEY} info_key)
|
||||
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${RULE_KEY} info_key)
|
||||
string(REPLACE "." " " INFO_KEYS ${INFO_KEY})
|
||||
string(JSON RULE_VALUE ERROR_VARIABLE RULE_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
|
||||
if(${RULE_KEY_NOT_FOUND} STREQUAL "NOTFOUND")
|
||||
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${RULE_KEY} value_type)
|
||||
if(${VALUE_TYPE} STREQUAL "list")
|
||||
string(JSON NUM_VALUES LENGTH ${RULE_VALUE})
|
||||
math(EXPR MAX "${NUM_VALUES} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON VALUE GET ${RULE_VALUE} ${IDX})
|
||||
list(APPEND ${RULE_KEY} ${VALUE})
|
||||
endforeach()
|
||||
message(STATUS "Found rule '${INFO_KEY}': '${${RULE_KEY}}' assigned to '${RULE_KEY}'")
|
||||
else()
|
||||
set(${RULE_KEY} ${RULE_VALUE})
|
||||
message(STATUS "Found rule '${INFO_KEY}': '${RULE_VALUE}' assigned to '${RULE_KEY}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# process definitions from info.json
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_config.hjson JSON_STRING)
|
||||
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${MAPPING_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON CONFIG_KEY MEMBER ${JSON_STRING} ${IDX})
|
||||
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${CONFIG_KEY} info_key)
|
||||
string(REPLACE "." ";" INFO_KEYS ${INFO_KEY})
|
||||
# string(JSON CONFIG_VALUE ERROR_VARIABLE CONFIG_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
|
||||
json_get_with_default(CONFIG_VALUE ${QMK_KEYBOARD_INFO_JSON_STRING} NOTFOUND ${INFO_KEYS})
|
||||
if(NOT CONFIG_VALUE STREQUAL "NOTFOUND")
|
||||
set(${CONFIG_KEY} ${CONFIG_VALUE})
|
||||
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${CONFIG_KEY} value_type)
|
||||
if(${VALUE_TYPE} STREQUAL "str")
|
||||
add_compile_definitions(${CONFIG_KEY}="${CONFIG_VALUE}")
|
||||
message(STATUS "Found definition '${INFO_KEY}': '\"${CONFIG_VALUE}\"' assigned to '${CONFIG_KEY}'")
|
||||
elseif(${VALUE_TYPE} STREQUAL "bcd_version")
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSION_MATCH ${CONFIG_VALUE})
|
||||
set(VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
math(EXPR BCD_VERSION "${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}" OUTPUT_FORMAT HEXADECIMAL)
|
||||
add_compile_definitions(${CONFIG_KEY}=${BCD_VERSION})
|
||||
message(STATUS "Found definition '${INFO_KEY}': '${BCD_VERSION}' assigned to '${CONFIG_KEY}'")
|
||||
else()
|
||||
add_compile_definitions(${CONFIG_KEY}=${CONFIG_VALUE})
|
||||
message(STATUS "Found definition '${INFO_KEY}': '${CONFIG_VALUE}' assigned to '${CONFIG_KEY}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${QMK_KEYBOARD_INFO_JSON_STRING} keyboard_name)
|
||||
string(JSON MANUFACTURER GET ${QMK_KEYBOARD_INFO_JSON_STRING} manufacturer)
|
||||
string(JSON URL GET ${QMK_KEYBOARD_INFO_JSON_STRING} url)
|
||||
string(JSON QMK_MCU GET ${QMK_KEYBOARD_INFO_JSON_STRING} processor)
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "info.json validated and loaded")
|
||||
|
||||
|
||||
ParseMakefile(${QMK_KEYBOARD_FOLDER_ABS}/rules.mk)
|
||||
endmacro()
|
||||
@@ -1,146 +0,0 @@
|
||||
include(Utils)
|
||||
|
||||
function(resolve_keyboard KEYBOARD KEYBOAD_FOLDER_ABS_STR)
|
||||
message(VERBOSE "Resolving ${KEYBOARD}")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD}")
|
||||
message(VERBOSE "Found in repo: ${KEYBOARD}")
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}")
|
||||
message(VERBOSE "Already checked out: ${KEYBOARD}")
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/keyboards.json KEYBOARDS_JSON)
|
||||
string(JSON KEYBOARD_SLUG ERROR_VARIABLE JSON_ERROR GET ${KEYBOARDS_JSON} ${KEYBOARD})
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
message(VERBOSE "Found ${KEYBOARD_SLUG}")
|
||||
if(${KEYBOARD_SLUG} MATCHES "^@([0-9a-zA-Z_]+/[0-9a-zA-Z_]+)")
|
||||
# keyboard slug is mapped to a github repo
|
||||
set(GIT_SLUG ${CMAKE_MATCH_1})
|
||||
# string(MAKE_C_IDENTIFIER ${KEYBOARD} KEYBOARD_NAME)
|
||||
message(VERBOSE "Cloning ${GIT_SLUG}")
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} clone "https://github.com/${GIT_SLUG}.git" .
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}"
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git clone failed with ${GIT_SUBMOD_RESULT}")
|
||||
endif()
|
||||
else()
|
||||
message("Git not found - skipping submodule update")
|
||||
endif()
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Didn't match")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find")
|
||||
# set(${RESULT_STR} "NOTFOUND" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_config_h KEYBOARD_FOLDER_ABS CONFIG_H_STR)
|
||||
set(${CONFIG_H_STR} PARENT_SCOPE)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest config.h
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h")
|
||||
parent_list(PREPEND ${CONFIG_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h")
|
||||
# set(${CONFIG_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h" PARENT_SCOPE)
|
||||
# return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
# message(FATAL_ERROR "Could not find config.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/config.h")
|
||||
set(${CONFIG_H_STR} "${KEYBOARD_FOLDER_ABS}/config.h" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find config.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_keyboard_h KEYBOARD_FOLDER_ABS KEYBOARD_H_STR)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest header
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
get_filename_component(LAST_PART ${RELATIVE_KEYBOARD_FOLDER} NAME)
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/${LAST_PART}.h")
|
||||
set(${KEYBOARD_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/${LAST_PART}.h" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
message(FATAL_ERROR "Could not find *.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keyboard.h")
|
||||
set(${KEYBOARD_H_STR} "${KEYBOARD_FOLDER_ABS}/keyboard.h" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find keyboard.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_keymap_c KEYBOARD_FOLDER_ABS KEYMAP_FOLDER KEYMAP_C_STR)
|
||||
if(IS_ABSOLUTE ${KEYMAP_FOLDER})
|
||||
if(EXISTS "${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest keymap.c
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
elseif(EXISTS "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# string(JSON COMMUNITY_LAYOUTS ERROR_VARIABLE NO_COMMUNITY_LAYOUTS GET ${QMK_KEYBOARD_INFO_JSON_STRING} community_layouts)
|
||||
|
||||
# if(${NO_COMMUNITY_LAYOUTS} STREQUAL "NOTFOUND")
|
||||
# string(JSON NUM_LAYOUTS LENGTH ${COMMUNITY_LAYOUTS})
|
||||
# math(EXPR MAX "${NUM_LAYOUTS} - 1")
|
||||
foreach(LAYOUT ${LAYOUTS})
|
||||
# foreach(IDX RANGE ${MAX})
|
||||
# string(JSON LAYOUT GET ${COMMUNITY_LAYOUTS} ${IDX})
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
# endif()
|
||||
message(FATAL_ERROR "Could not resolve keymap '${KEYMAP_FOLDER}'")
|
||||
endfunction()
|
||||
|
||||
function(resolve_keyboard_includes KEYBOARD_FOLDER_ABS)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
target_include_directories(qmk PUBLIC "${CMAKE_SOURCE_DIR}/keyboards/${RELATIVE_KEYBOARD_FOLDER}")
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
target_include_directories(qmk PUBLIC "${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1,60 +0,0 @@
|
||||
function(resolve_toolchain PROCESSOR TOOLCHAIN_STR)
|
||||
unset(${TOOLCHAIN_STR} PARENT_SCOPE)
|
||||
if(
|
||||
${PROCESSOR} MATCHES "^at.*"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "avr" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".hex" PARENT_SCOPE)
|
||||
include(FindAVRToolchain)
|
||||
find_avr_toolchain()
|
||||
elseif(
|
||||
${PROCESSOR} MATCHES "^STM.*" OR
|
||||
${PROCESSOR} MATCHES "^WB32.*" OR
|
||||
${PROCESSOR} MATCHES "^MK.*" OR
|
||||
${PROCESSOR} MATCHES "RP2040" OR
|
||||
${PROCESSOR} MATCHES "^GD32.*"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "arm-none-eabi" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".bin" PARENT_SCOPE)
|
||||
include(FindARMToolchain)
|
||||
find_arm_toolchain()
|
||||
elseif(
|
||||
${PROCESSOR} MATCHES "risc-v"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "riscv32-unknown-elf" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".bin" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find toolchain for ${PROCESSOR}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(find_toolchain TOOLCHAIN TOOLCHAIN_ROOT_STR)
|
||||
unset(${TOOLCHAIN_STR} PARENT_SCOPE)
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
find_path(TOOLCHAIN_ROOT
|
||||
NAMES
|
||||
${TOOLCHAIN}-gcc${OS_SUFFIX}
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/gcc-arm-none-eabi-10.3-2021.10/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
find_path(TOOLCHAIN_ROOT
|
||||
NAMES
|
||||
${TOOLCHAIN}-gcc${OS_SUFFIX}
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/gcc-arm-none-eabi-10.3-2021.10/bin/"
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsure how to handle this OS")
|
||||
endif(UNIX)
|
||||
set(${TOOLCHAIN_ROOT_STR} ${TOOLCHAIN_ROOT} PARENT_SCOPE)
|
||||
endfunction(find_toolchain)
|
||||
@@ -1,22 +0,0 @@
|
||||
# can be passed a relative path (to CMAKE_SOURCE_DIR) to update/checkout that submodule
|
||||
macro(update_submodule SUBMODULE)
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
option(GIT_SUBMODULE "Check submodules during build" ON)
|
||||
if(GIT_SUBMODULE)
|
||||
message(STATUS "Updating submoudle ${SUBMODULE}")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update ${SUBMODULE}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git submodule update ${SUBMODULE} failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message("Git not found - skipping submodule update")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/${SUBMODULE}/.git")
|
||||
message(FATAL_ERROR "The submodule was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,25 +0,0 @@
|
||||
macro(json_get_with_default KEY_STR JSON_STR DEFAULT)
|
||||
# message(STATUS "Getting ${ARGN} for ${KEY_STR}")
|
||||
string(JSON ${KEY_STR} ERROR_VARIABLE JSON_ERROR GET ${JSON_STR} ${ARGN})
|
||||
if(NOT ${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(${KEY_STR} ${DEFAULT})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(json_get KEY_STR JSON_STR)
|
||||
# message(STATUS "Getting ${ARGN} for ${KEY_STR}")
|
||||
string(JSON ${KEY_STR} ERROR_VARIABLE JSON_ERROR GET ${JSON_STR} ${ARGN})
|
||||
if(NOT ${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
unset(${KEY_STR})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(parent_list ACTION LIST_STR)
|
||||
set(ARGS ${ARGN})
|
||||
string(REPLACE ";" " " ARGS ${ARGS})
|
||||
set(LOCAL_LIST ${${LIST_STR}})
|
||||
list(${ACTION} LOCAL_LIST ${ARGS})
|
||||
# set in current scope too
|
||||
set(${LIST_STR} ${LOCAL_LIST})
|
||||
set(${LIST_STR} ${LOCAL_LIST} PARENT_SCOPE)
|
||||
endmacro()
|
||||
@@ -1,199 +0,0 @@
|
||||
function(validate_json JSON_FILE SCHEMA_NAME JSON_STRING_STR)
|
||||
unset(${JSON_STRING_STR} PARENT_SCOPE)
|
||||
message(VERBOSE "Validating ${JSON_FILE} with '${SCHEMA_NAME}' schema")
|
||||
file(READ ${JSON_FILE} JSON_STRING)
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/schemas/${SCHEMA_NAME}.jsonschema SCHEMA_STRING)
|
||||
string(JSON SCHEMA_ID GET ${SCHEMA_STRING} $id)
|
||||
|
||||
set(DEFINITIONS "{}")
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/schemas/definitions.jsonschema DEFINITIONS_STRING)
|
||||
string(JSON DEFINITION_ID GET ${DEFINITIONS_STRING} $id)
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "${DEFINITION_ID}#" ${DEFINITIONS_STRING})
|
||||
|
||||
string(JSON SCHEMA_DEFINITIONS ERROR_VARIABLE JSON_ERROR GET ${SCHEMA_STRING} definitions)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "#" "{}")
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "#" definitions ${SCHEMA_DEFINITIONS})
|
||||
# string(JSON DEFINITIONS_LENGTH LENGTH ${SCHEMA_DEFINITIONS})
|
||||
# math(EXPR MAX "${DEFINITIONS_LENGTH} - 1")
|
||||
# foreach(IDX RANGE ${MAX})
|
||||
# string(JSON DEFINITION_NAME MEMBER ${SCHEMA_DEFINITIONS} ${IDX})
|
||||
# string(JSON DEFINITION GET ${SCHEMA_DEFINITIONS} ${DEFINITION_NAME})
|
||||
# message(VERBOSE "Loading local definition '${DEFINITION_NAME}'")
|
||||
# string(JSON DEFINITIONS_STRING SET ${DEFINITIONS_STRING} ${DEFINITION_NAME} ${DEFINITION})
|
||||
# endforeach()
|
||||
endif()
|
||||
|
||||
validate_object(${JSON_STRING} ${SCHEMA_STRING} OBJECT_ERROR)
|
||||
if(DEFINED OBJECT_ERROR)
|
||||
message(FATAL_ERROR ${OBJECT_ERROR})
|
||||
else()
|
||||
set(${JSON_STRING_STR} ${JSON_STRING} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(validate_object JSON_STRING SCHEMA_STRING OBJECT_ERROR_STR)
|
||||
unset(${OBJECT_ERROR_STR} PARENT_SCOPE)
|
||||
set(OBJECT_ERROR)
|
||||
string(JSON PROPERTY_NAME_SCHEMA ERROR_VARIABLE PROPERTY_NAMES_ERROR GET ${SCHEMA_STRING} propertyNames)
|
||||
string(JSON REQUIRED_PROPERTIES ERROR_VARIABLE REQUIRED_PROPERTIES_ERROR GET ${SCHEMA_STRING} required)
|
||||
set(REQUIRED_LIST)
|
||||
if(${REQUIRED_PROPERTIES_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON REQUIRED_LENGTH LENGTH ${REQUIRED_PROPERTIES})
|
||||
math(EXPR MAX "${REQUIRED_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON REQUIRED GET ${REQUIRED_PROPERTIES} ${IDX})
|
||||
list(APPEND REQUIRED_LIST ${REQUIRED})
|
||||
endforeach()
|
||||
endif()
|
||||
string(JSON NUM_PROPERTIES LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${NUM_PROPERTIES} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON PROPERTY_NAME MEMBER ${JSON_STRING} ${IDX})
|
||||
list(REMOVE_ITEM REQUIRED_LIST ${PROPERTY_NAME})
|
||||
message(VERBOSE "Validating property '${PROPERTY_NAME}'")
|
||||
if(${PROPERTY_NAMES_ERROR} STREQUAL "NOTFOUND")
|
||||
validate_property(${PROPERTY_NAME} ${PROPERTY_NAME_SCHEMA} PROPERTY_NAME_ERROR)
|
||||
if(DEFINED PROPERTY_NAME_ERROR)
|
||||
list(APPEND OBJECT_ERROR "${PROPERTY_NAME_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
string(JSON PROPERTY GET ${JSON_STRING} ${PROPERTY_NAME})
|
||||
string(JSON SCHEMA_PROPERTIES ERROR_VARIABLE PROPERTIES_ERROR GET ${SCHEMA_STRING} properties ${PROPERTY_NAME})
|
||||
if(${PROPERTIES_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON PROPERTY_SCHEMA GET ${SCHEMA_STRING} properties ${PROPERTY_NAME})
|
||||
else()
|
||||
string(JSON PROPERTY_SCHEMA ERROR_VARIABLE ADDITIONAL_PROPERTIES_ERROR GET ${SCHEMA_STRING} additionalProperties)
|
||||
if(NOT ${ADDITIONAL_PROPERTIES_ERROR} STREQUAL "NOTFOUND" OR "${PROPERTY_SCHEMA}" STREQUAL "OFF")
|
||||
list(APPEND OBJECT_ERROR "Additional properties like '${PROPERTY_NAME}' not permitted in '${JSON_STRING}'")
|
||||
endif()
|
||||
endif()
|
||||
validate_property(${PROPERTY} ${PROPERTY_SCHEMA} PROPERTY_ERROR)
|
||||
if(DEFINED PROPERTY_ERROR)
|
||||
list(APPEND OBJECT_ERROR "${PROPERTY_ERROR}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(LENGTH REQUIRED_LIST REQUIRED_REMAINING_LENGTH)
|
||||
if(${REQUIRED_REMAINING_LENGTH} GREATER 0)
|
||||
list(APPEND OBJECT_ERROR "Required properties not found: ${REQUIRED_LIST}")
|
||||
endif()
|
||||
set(${OBJECT_ERROR_STR} ${OBJECT_ERROR} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(validate_property PROPERTY PROPERTY_SCHEMA PROPERTY_ERROR_STR)
|
||||
unset(${PROPERTY_ERROR_STR} PARENT_SCOPE)
|
||||
set(PROPERTY_ERROR)
|
||||
string(JSON PROPERTY_REF ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} $ref)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
string(REPLACE "/" ";" REF_COMPONENTS "${PROPERTY_REF}")
|
||||
string(JSON PROPERTY_SCHEMA GET ${DEFINITIONS} ${REF_COMPONENTS})
|
||||
endif()
|
||||
string(JSON PROPERTY_TYPE ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} type)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
message(VERBOSE "Validating property type '${PROPERTY_TYPE}'")
|
||||
if(${PROPERTY_TYPE} STREQUAL "object")
|
||||
validate_object(${PROPERTY} ${PROPERTY_SCHEMA} OBJECT_ERROR)
|
||||
if(DEFINED OBJECT_ERROR)
|
||||
list(APPEND PROPERTY_ERROR ${OBJECT_ERROR})
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "array")
|
||||
string(JSON ARRAY_LENGTH LENGTH ${PROPERTY})
|
||||
string(JSON MAX_ITEMS ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maxItems)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${ARRAY_LENGTH} GREATER ${MAX_ITEMS})
|
||||
list(APPEND PROPERTY_ERROR "Number of items in '${PROPERTY}' exceeds maximum ${MAX_ITEMS}")
|
||||
endif()
|
||||
string(JSON MIN_ITEMS ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minItems)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${ARRAY_LENGTH} LESS ${MIN_ITEMS})
|
||||
list(APPEND PROPERTY_ERROR "Number of items in '${PROPERTY}' is less than ${MIN_ITEMS}")
|
||||
endif()
|
||||
string(JSON ITEM_SCHEMA ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} items)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
math(EXPR MAX "${ARRAY_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON ITEM GET ${PROPERTY} ${IDX})
|
||||
validate_property(${ITEM} ${ITEM_SCHEMA} ITEM_ERROR)
|
||||
if(DEFINED ITEM_ERROR)
|
||||
list(APPEND PROPERTY_ERROR ${ITEM_ERROR})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "null")
|
||||
if(NOT "${PROPERTY}" STREQUAL "null")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not null'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "boolean")
|
||||
if(NOT "${PROPERTY}" STREQUAL "OFF" AND NOT "${PROPERTY}" STREQUAL "ON")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not a boolean'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "number")
|
||||
if(NOT "${PROPERTY}" MATCHES "-?[0-9]+\\.?[0-9]*")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not a number'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "integer")
|
||||
if(NOT "${PROPERTY}" MATCHES "-?[0-9]+")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not an integer'")
|
||||
endif()
|
||||
string(JSON MIN ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minimum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${PROPERTY} LESS ${MIN})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is less than the minimum of ${MIN}")
|
||||
endif()
|
||||
string(JSON MAX ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maximum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${PROPERTY} GREATER ${MAX})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is greater than the maximum of ${MAX}")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "string")
|
||||
# cmake regex doesn't support {}, so other options might be needed here
|
||||
string(JSON PATTERN ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} pattern)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND NOT "${PROPERTY}" MATCHES "${PATTERN}")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' does not match '${PATTERN}'")
|
||||
endif()
|
||||
string(LENGTH ${PROPERTY} STRING_LENGTH)
|
||||
string(JSON MIN_LENGTH ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minLength)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${STRING_LENGTH} LESS ${MIN_LENGTH})
|
||||
list(APPEND PROPERTY_ERROR "Length of property '${PROPERTY}' is less than the minimum of ${MIN_LENGTH}")
|
||||
endif()
|
||||
string(JSON MAX_LENGTH ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maxLength)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${STRING_LENGTH} GREATER ${MAX_LENGTH})
|
||||
list(APPEND PROPERTY_ERROR "Length of property '${PROPERTY}' is greater than the maximum of ${MAX_LENGTH}")
|
||||
endif()
|
||||
string(JSON ENUM_LIST ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} enum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(FOUND_IN_ENUM_LIST FALSE)
|
||||
string(JSON ENUM_LENGTH LENGTH ${ENUM_LIST})
|
||||
math(EXPR MAX "${ENUM_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON ENUM GET ${PROPERTY_SCHEMA} enum ${IDX})
|
||||
if(${ENUM} STREQUAL ${PROPERTY})
|
||||
set(FOUND_IN_ENUM_LIST TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT ${FOUND_IN_ENUM_LIST})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not defined in the schema's enum: ${ENUM_LIST}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(VERBOSE "Unknown type '${PROPERTY_TYPE}'")
|
||||
endif()
|
||||
else()
|
||||
string(JSON PROPERTY_ONEOF ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} oneOf)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(TYPE_SUCCESS FALSE)
|
||||
string(JSON NUM_ONEOF LENGTH ${PROPERTY_ONEOF})
|
||||
math(EXPR MAX "${NUM_ONEOF} - 1")
|
||||
set(ONEOF_ERRORS)
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON PROPERTY_SCHEMA GET ${PROPERTY_ONEOF} ${IDX})
|
||||
validate_property(${PROPERTY} ${PROPERTY_SCHEMA} ONEOF_ERROR)
|
||||
if(NOT DEFINED ONEOF_ERROR)
|
||||
set(TYPE_SUCCESS TRUE)
|
||||
else()
|
||||
list(APPEND ONEOF_ERRORS "${ONEOF_ERROR}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT TYPE_SUCCESS)
|
||||
list(APPEND PROPERTY_ERROR "Could not validate oneOf type '${PROPERTY}' :\n${ONEOF_ERRORS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(${PROPERTY_ERROR_STR} ${PROPERTY_ERROR} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/ADCv3/hal_adc_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/ADCv3)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/CANv1/hal_can_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/CANv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DACv1/hal_dac_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DACv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DMAv1/stm32_dma.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DMAv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/EXTIv1/stm32_exti.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/EXTIv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/GPIOv2/hal_pal_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/GPIOv2)
|
||||
@@ -1,7 +0,0 @@
|
||||
if(${USE_HAL_I2C_FALLBACK})
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2C/hal_i2c_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2C)
|
||||
else()
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2Cv2/hal_i2c_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2Cv2)
|
||||
endif()
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/RTCv2/hal_rtc_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/RTCv2)
|
||||
@@ -1,5 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2/hal_i2s_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2/hal_spi_v2_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SYSTICKv1/hal_st_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SYSTICKv1)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_gpt_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_icu_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_pwm_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1)
|
||||
@@ -1,9 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_serial_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_sio_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_uart_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USART
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USBv1/hal_usb_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USBv1
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/xWDGv1/hal_wdg_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/xWDGv1
|
||||
)
|
||||
@@ -1,10 +0,0 @@
|
||||
# os/common/ports/ARMv7/compilers/GCC/mk/port.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M/chcore.c
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/common/portability/GCC
|
||||
${CHIBIOS}/os/common/ports/ARM-common
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M
|
||||
)
|
||||
@@ -1,25 +0,0 @@
|
||||
# os/hal/ports/STM32/STM32F3xx/platform.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/stm32_isr.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/hal_lld.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/hal_efl_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/common/ARMCMx
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx
|
||||
)
|
||||
include(chibios/LLD/ADCv3)
|
||||
include(chibios/LLD/CANv1)
|
||||
include(chibios/LLD/DACv1)
|
||||
include(chibios/LLD/DMAv1)
|
||||
include(chibios/LLD/EXTIv1)
|
||||
include(chibios/LLD/GPIOv2)
|
||||
include(chibios/LLD/I2Cv2)
|
||||
include(chibios/LLD/RTCv2)
|
||||
include(chibios/LLD/SPIv2)
|
||||
include(chibios/LLD/SYSTICKv1)
|
||||
include(chibios/LLD/TIMv1)
|
||||
include(chibios/LLD/USARTv2)
|
||||
include(chibios/LLD/USBv1)
|
||||
include(chibios/LLD/xWDGv1)
|
||||
@@ -1,32 +0,0 @@
|
||||
option(BACKLIGHT_ENABLE "" TRUE)
|
||||
set(BACKLIGHT_DRIVER "pwm" CACHE STRING "Backlight driver")
|
||||
set_property(CACHE BACKLIGHT_DRIVER PROPERTY STRINGS pwm timer software custom)
|
||||
|
||||
string(JSON BACKLIGHT_PIN ERROR_VARIABLE NO_BACKLIGHT_PIN GET ${QMK_KEYBOARD_INFO_JSON_STRING} backlight pin)
|
||||
if(${BACKLIGHT_ENABLE} AND NOT ${BACKLIGHT_PIN} STREQUAL "backlight-NOTFOUND")
|
||||
target_sources(qmk PUBLIC
|
||||
quantum/backlight/backlight.c
|
||||
quantum/process_keycode/process_backlight.c
|
||||
)
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
BACKLIGHT_ENABLE
|
||||
BACKLIGHT_PIN=${BACKLIGHT_PIN}
|
||||
)
|
||||
if(${BACKLIGHT_DRIVER} STREQUAL "custom")
|
||||
target_compile_definitions(qmk PUBLIC BACKLIGHT_CUSTOM_DRIVER)
|
||||
else()
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_driver_common.c)
|
||||
if(${BACKLIGHT_DRIVER} STREQUAL "pwm")
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_${QMK_PLATFORM}.c)
|
||||
else()
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_${BACKLIGHT_DRIVER}.c)
|
||||
endif()
|
||||
endif()
|
||||
target_include_directories(qmk PUBLIC quantum/backlight)
|
||||
target_include_directories(qmk PUBLIC drivers/oled)
|
||||
# target_link_libraries(backlight qmk)
|
||||
# target_include_directories(backlight PUBLIC quantum/backlight)
|
||||
# target_include_directories(quantum PUBLIC quantum/backlight)
|
||||
# target_link_libraries(backlight ${QMK_TARGET})
|
||||
# target_link_libraries(backlight quantum)
|
||||
endif()
|
||||
@@ -1,70 +0,0 @@
|
||||
set(EEPROM_DRIVER "vendor" CACHE STRING "EEPROM driver")
|
||||
set_property(CACHE EEPROM_DRIVER PROPERTY STRINGS vendor custom transient i2c spi wear_leveling legacy_stm32_flash)
|
||||
set(WEAR_LEVELING_DRIVER "none" CACHE STRING "EEPROM wear-leveling driver")
|
||||
set_property(CACHE WEAR_LEVELING_DRIVER PROPERTY STRINGS custom embedded_flash spi_flash rp2040_flash legacy)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_ENABLE
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/eeprom
|
||||
drivers/eeprom
|
||||
platforms/common
|
||||
)
|
||||
|
||||
if(${EEPROM_DRIVER} STREQUAL "wear_leveling")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_DRIVER
|
||||
EEPROM_WEAR_LEVELING
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/eeprom/eeprom_driver.c
|
||||
drivers/eeprom/eeprom_wear_leveling.c
|
||||
)
|
||||
elseif(${EEPROM_DRIVER} STREQUAL "vendor")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_VENDOR
|
||||
)
|
||||
if(${QMK_PLATFORM} STREQUAL "chibios")
|
||||
if(${QMK_MCU} MATCHES "STM32F[1-9].*" OR ${QMK_MCU} MATCHES "WB32.*" OR ${QMK_MCU} MATCHES "GD32.*")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_DRIVER
|
||||
EEPROM_WEAR_LEVELING
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/eeprom/eeprom_driver.c
|
||||
drivers/eeprom/eeprom_wear_leveling.c
|
||||
)
|
||||
set(WEAR_LEVELING_DRIVER "embedded_flash")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${WEAR_LEVELING_DRIVER} STREQUAL "none")
|
||||
set(FNV_ENABLE TRUE)
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
WEAR_LEVELING_ENABLE
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/wear_leveling
|
||||
drivers/wear_leveling
|
||||
quantum/wear_leveling
|
||||
)
|
||||
target_sources(qmk PUBLIC quantum/wear_leveling/wear_leveling.c)
|
||||
|
||||
if(${WEAR_LEVELING_DRIVER} STREQUAL "embedded_flash")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
HAL_USE_EFL
|
||||
WEAR_LEVELING_EMBEDDED_FLASH
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl.c
|
||||
)
|
||||
# target_compile_options(qmk PUBLIC
|
||||
# -include ${CMAKE_SOURCE_DIR}/platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl_config.h
|
||||
# )
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl_config.h
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
if(${FNV_ENABLE})
|
||||
target_compile_definitions(qmk PUBLIC FNV_ENABLE)
|
||||
target_include_directories(qmk PUBLIC lib/fnv)
|
||||
target_sources(qmk PUBLIC
|
||||
lib/fnv/qmk_fnv_type_validation.c
|
||||
lib/fnv/hash_32a.c
|
||||
lib/fnv/hash_64a.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
message(STATUS "Custom Matrix: ${CUSTOM_MATRIX}")
|
||||
set(CUSTOM_MATRIX "no" CACHE STRING "Custom matrix-scanning")
|
||||
set_property(CACHE CUSTOM_MATRIX PROPERTY STRINGS yes lite no)
|
||||
if(NOT ${CUSTOM_MATRIX} STREQUAL yes)
|
||||
target_sources(qmk PUBLIC quantum/matrix_common.c)
|
||||
if(NOT ${CUSTOM_MATRIX} STREQUAL lite)
|
||||
target_sources(qmk PUBLIC quantum/matrix.c)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,10 +0,0 @@
|
||||
option(OLED_ENABLE "" OFF)
|
||||
if(${OLED_ENABLE})
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/oled/ssd1306_sh1106.c
|
||||
platforms/${QMK_PLATFORM}/drivers/i2c_master.c)
|
||||
target_compile_definitions(qmk PUBLIC OLED_ENABLE)
|
||||
target_include_directories(qmk PUBLIC drivers)
|
||||
target_include_directories(qmk PUBLIC drivers/oled)
|
||||
target_include_directories(qmk PUBLIC platforms/${QMK_PLATFORM}/drivers)
|
||||
endif()
|
||||
@@ -1,144 +0,0 @@
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
|
||||
include(ResolveToolchain)
|
||||
|
||||
set(QMK_TOOLCHAIN "arm-none-eabi")
|
||||
set(QMK_PLATFORM "chibios")
|
||||
set(QMK_PROTOCOL "chibios")
|
||||
set(QMK_EXTENSION ".bin")
|
||||
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
endif()
|
||||
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_CROSS_COMPILING 1)
|
||||
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-gcc${OS_SUFFIX}" CACHE PATH "gcc" FORCE)
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-g++${OS_SUFFIX}" CACHE PATH "g++" FORCE)
|
||||
set(CMAKE_AR "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ar${OS_SUFFIX}" CACHE PATH "ar" FORCE)
|
||||
set(CMAKE_AS "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-as${OS_SUFFIX}" CACHE PATH "as" FORCE)
|
||||
set(CMAKE_LINKER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ld${OS_SUFFIX}" CACHE PATH "linker" FORCE)
|
||||
set(CMAKE_NM "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-nm${OS_SUFFIX}" CACHE PATH "nm" FORCE)
|
||||
set(CMAKE_OBJCOPY "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objcopy${OS_SUFFIX}" CACHE PATH "objcopy" FORCE)
|
||||
set(CMAKE_OBJDUMP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objdump${OS_SUFFIX}" CACHE PATH "objdump" FORCE)
|
||||
set(CMAKE_STRIP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-strip${OS_SUFFIX}" CACHE PATH "strip" FORCE)
|
||||
set(CMAKE_RANLIB "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ranlib${OS_SUFFIX}" CACHE PATH "ranlib" FORCE)
|
||||
set(CMAKE_SIZE "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-size${OS_SUFFIX}" CACHE PATH "size" FORCE)
|
||||
|
||||
find_program(CMAKE_MAKE_PROGRAM NAME make
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
)
|
||||
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=gnu11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++14>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
|
||||
# -flto
|
||||
-Os
|
||||
-Wall
|
||||
-Wstrict-prototypes
|
||||
# -fcommon
|
||||
# -g
|
||||
|
||||
-fomit-frame-pointer
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-fno-common
|
||||
-fshort-wchar
|
||||
-fno-builtin-printf
|
||||
# -funsigned-char
|
||||
# -funsigned-bitfields
|
||||
# -ffunction-sections
|
||||
# -fdata-sections
|
||||
# -fpack-struct
|
||||
# -fshort-enums
|
||||
# -fno-builtin-printf
|
||||
# $<$<COMPILE_LANGUAGE:C>:-fno-inline-small-functions>
|
||||
# $<$<COMPILE_LANGUAGE:C>:-fno-strict-aliasing>
|
||||
# $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-Wl,--gc-sections
|
||||
-nostartfiles
|
||||
-Wl,--no-wchar-size-warning
|
||||
--specs=nano.specs
|
||||
-lm
|
||||
)
|
||||
|
||||
macro(add_qmk_executable target_name)
|
||||
|
||||
set(elf_file ${target_name}.elf)
|
||||
set(map_file ${target_name}.map)
|
||||
set(bin_file ${target_name}.bin)
|
||||
set(lst_file ${target_name}.lst)
|
||||
|
||||
add_link_options(
|
||||
-Wl,-Map=${map_file},--cref
|
||||
)
|
||||
|
||||
# create elf file
|
||||
add_executable(qmk ${ARGN})
|
||||
# add_executable(${elf_file} ${ARGN})
|
||||
# target_link_libraries(${elf_file} qmk)
|
||||
|
||||
set_target_properties(qmk
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${elf_file}
|
||||
)
|
||||
|
||||
# generate the lst file
|
||||
add_custom_command(
|
||||
OUTPUT ${lst_file}
|
||||
COMMAND ${CMAKE_OBJDUMP} -h -S ${elf_file} > ${lst_file}
|
||||
DEPENDS qmk
|
||||
)
|
||||
|
||||
# add_custom_command(
|
||||
# OUTPUT "print-size-${elf_file}"
|
||||
|
||||
# COMMAND
|
||||
# ${CMAKE_SIZE} ${elf_file}
|
||||
|
||||
# DEPENDS ${elf_file}
|
||||
# )
|
||||
|
||||
# add_custom_command(
|
||||
# OUTPUT "print-size-${bin_file}"
|
||||
|
||||
# COMMAND
|
||||
# ${CMAKE_SIZE} ${bin_file} sizeafter
|
||||
|
||||
# DEPENDS ${bin_file}
|
||||
# )
|
||||
|
||||
add_custom_command(
|
||||
TARGET qmk
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O binary ${elf_file} ${CMAKE_SOURCE_DIR}/build/${bin_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${elf_file} ${CMAKE_SOURCE_DIR}/build/${elf_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${lst_file} ${CMAKE_SOURCE_DIR}/build/${lst_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${map_file} ${CMAKE_SOURCE_DIR}/build/${map_file}
|
||||
)
|
||||
|
||||
# build the intel hex file for the device
|
||||
add_custom_target(${target_name} ALL
|
||||
DEPENDS ${elf_file} ${lst_file}
|
||||
)
|
||||
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${bin_file}
|
||||
)
|
||||
endmacro(add_qmk_executable)
|
||||
@@ -1,182 +0,0 @@
|
||||
#
|
||||
# AVR GCC Toolchain file
|
||||
#
|
||||
# @author Natesh Narain
|
||||
# @since Feb 06 2016
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
|
||||
include(ResolveToolchain)
|
||||
|
||||
set(QMK_TOOLCHAIN "avr")
|
||||
set(QMK_PLATFORM "avr")
|
||||
set(QMK_PROTOCOL "lufa")
|
||||
set(QMK_EXTENSION ".hex")
|
||||
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
endif()
|
||||
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
|
||||
# setup the AVR compiler variables
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR avr)
|
||||
set(CMAKE_CROSS_COMPILING 1)
|
||||
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-gcc${OS_SUFFIX}" CACHE PATH "gcc" FORCE)
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-g++${OS_SUFFIX}" CACHE PATH "g++" FORCE)
|
||||
set(CMAKE_AR "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ar${OS_SUFFIX}" CACHE PATH "ar" FORCE)
|
||||
set(CMAKE_AS "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-as${OS_SUFFIX}" CACHE PATH "as" FORCE)
|
||||
set(CMAKE_LINKER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ld${OS_SUFFIX}" CACHE PATH "linker" FORCE)
|
||||
set(CMAKE_NM "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-nm${OS_SUFFIX}" CACHE PATH "nm" FORCE)
|
||||
set(CMAKE_OBJCOPY "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objcopy${OS_SUFFIX}" CACHE PATH "objcopy" FORCE)
|
||||
set(CMAKE_OBJDUMP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objdump${OS_SUFFIX}" CACHE PATH "objdump" FORCE)
|
||||
set(CMAKE_STRIP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-strip${OS_SUFFIX}" CACHE PATH "strip" FORCE)
|
||||
set(CMAKE_RANLIB "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ranlib${OS_SUFFIX}" CACHE PATH "ranlib" FORCE)
|
||||
set(AVR_SIZE "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-size${OS_SUFFIX}" CACHE PATH "size" FORCE)
|
||||
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "-L /usr/lib/gcc/avr/4.8.2")
|
||||
|
||||
# avr uploader config
|
||||
find_program(AVR_UPLOAD
|
||||
NAME
|
||||
avrdude
|
||||
PATHS
|
||||
/usr/bin/
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
|
||||
find_program(CMAKE_MAKE_PROGRAM NAME make
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
)
|
||||
|
||||
# setup the avr exectable macro
|
||||
|
||||
# set(AVR_LINKER_LIBS "-lc -lm -lgcc -Wl,-lprintf_flt -Wl,-u,vfprintf")
|
||||
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=gnu11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++14>
|
||||
-flto
|
||||
# -mrelax
|
||||
-Os
|
||||
-Wall
|
||||
-Wstrict-prototypes
|
||||
-fcommon
|
||||
# -g
|
||||
$<$<BOOL:${WIN32}>:--param=min-pagesize=0>
|
||||
-funsigned-char
|
||||
-funsigned-bitfields
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-fpack-struct
|
||||
-fshort-enums
|
||||
-mcall-prologues
|
||||
-fno-builtin-printf
|
||||
$<$<COMPILE_LANGUAGE:C>:-fno-inline-small-functions>
|
||||
$<$<COMPILE_LANGUAGE:C>:-fno-strict-aliasing>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
F_CPU=16000000
|
||||
F_USB=16000000UL
|
||||
__AVR_ATmega32U4__
|
||||
LTO_ENABLE
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-Wl,--gc-sections
|
||||
)
|
||||
|
||||
macro(add_qmk_executable target_name)
|
||||
|
||||
set(elf_file ${target_name}.elf)
|
||||
set(map_file ${target_name}.map)
|
||||
set(hex_file ${target_name}.hex)
|
||||
set(lst_file ${target_name}.lst)
|
||||
|
||||
add_compile_options(
|
||||
-mmcu=${QMK_MCU}
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-mmcu=${QMK_MCU}
|
||||
-Wl,-Map=${map_file}
|
||||
)
|
||||
|
||||
# create elf file
|
||||
# add_executable(${elf_file} ${ARGN})
|
||||
# target_link_libraries(${elf_file} qmk)
|
||||
|
||||
add_executable(qmk ${ARGN})
|
||||
set_target_properties(qmk
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${elf_file}
|
||||
)
|
||||
|
||||
|
||||
# set_target_properties(${elf_file}
|
||||
# PROPERTIES
|
||||
# COMPILE_FLAGS "-mmcu=${QMK_MCU} ${COMPILE_OPTIONS}"
|
||||
# LINK_FLAGS "-mmcu=${QMK_MCU} ${LINK_OPTIONS}"
|
||||
# )
|
||||
|
||||
# add_custom_target(compileOptions
|
||||
# COMMAND cmake -P ${CMAKE_SOURCE_DIR}/cmake/WriteCompileOptions.cmake
|
||||
# COMMENT "Writing compile_flags.txt"
|
||||
# )
|
||||
|
||||
# generate the lst file
|
||||
add_custom_command(
|
||||
OUTPUT ${lst_file}
|
||||
COMMAND ${CMAKE_OBJDUMP} -h -S ${elf_file} > ${lst_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
# create hex file
|
||||
add_custom_command(
|
||||
OUTPUT ${hex_file}
|
||||
# COMMAND ${CMAKE_OBJCOPY} -j .text -j .data -O ihex ${elf_file} ${hex_file}
|
||||
COMMAND ${CMAKE_OBJCOPY} -O ihex -R .eeprom -R .fuse -R .lock -R .signature ${elf_file} ${hex_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "print-size-${elf_file}"
|
||||
COMMAND ${AVR_SIZE} ${elf_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "print-size-${hex_file}"
|
||||
COMMAND ${AVR_SIZE} ${hex_file}
|
||||
DEPENDS ${hex_file}
|
||||
)
|
||||
|
||||
add_custom_target(copy_hex
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${hex_file} ${CMAKE_SOURCE_DIR}/build/${hex_file}
|
||||
DEPENDS ${hex_file}
|
||||
)
|
||||
|
||||
# build the intel hex file for the device
|
||||
add_custom_target(${target_name} ALL
|
||||
DEPENDS ${hex_file} ${lst_file} "print-size-${elf_file}" "print-size-${hex_file}" copy_hex
|
||||
)
|
||||
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${hex_file}
|
||||
)
|
||||
|
||||
|
||||
endmacro(add_qmk_executable)
|
||||
@@ -1,16 +0,0 @@
|
||||
if(${USE_PICOLIBC})
|
||||
add_compile_options(
|
||||
--specs=picolibc.specs
|
||||
)
|
||||
add_compile_definitions(USE_PICOLIBC)
|
||||
add_link_options(
|
||||
-Wl,--defsym=__heap_start=__heap_base__,--defsym=__heap_end=__heap_end__
|
||||
)
|
||||
endif()
|
||||
|
||||
add_compile_options(
|
||||
-march=${MCU_ARCH}
|
||||
-mabi=${MCU_ABI}
|
||||
-mcmodel=${MCU_CMODEL}
|
||||
-mstrict-align
|
||||
)
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"olkb/planck/rev3": "@jackhumbert/test_keyboard",
|
||||
"olkb/planck/rev6": "planck/rev6"
|
||||
}
|
||||
@@ -129,7 +129,7 @@
|
||||
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true},
|
||||
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_deprecated.ignore_mod_tap_interrupt", "value_type": "bool", "deprecated": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true}
|
||||
|
||||
// USB params, need to mark as failure when specified in config.h, rather than deprecated
|
||||
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"},
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
},
|
||||
"hex_number_2d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F][0-9A-F]$"
|
||||
"pattern": "^0x[0-9A-F]{2}$"
|
||||
},
|
||||
"hex_number_4d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]$"
|
||||
"pattern": "^0x[0-9A-F]{4}$"
|
||||
},
|
||||
"bcd_version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9][0-9]?\\.[0-9]\\.[0-9]$"
|
||||
"pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
|
||||
},
|
||||
"text_identifier": {
|
||||
"type": "string",
|
||||
@@ -83,15 +83,15 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d\\d?$"
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^LINE_PIN\\d\\d?$"
|
||||
"pattern": "^LINE_PIN\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^GP\\d\\d?$"
|
||||
"pattern": "^GP\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
|
||||
@@ -236,4 +236,4 @@ Old `fn_actions` action | New QMK keycode
|
||||
`ACTION_LAYER_TOGGLE(layer)` | `TG(layer)`
|
||||
`ACTION_MODS_ONESHOT(mod)` | `OSM(mod)`
|
||||
`ACTION_MODS_TAP_KEY(mod, kc)` | `MT(mod, kc)`
|
||||
`ACTION_MODS_KEY(mod, kc)`<br>e.g. `ACTION_MODS_KEY(MOD_LCTL, KC_0)` | `MOD(kc)`<br>e.g. `LCTL(KC_0)`
|
||||
`ACTION_MODS_KEY(mod, kc)`<br />e.g. `ACTION_MODS_KEY(MOD_LCTL, KC_0)` | `MOD(kc)`<br />e.g. `LCTL(KC_0)`
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Relocated Keyboards :id=relocated-keyboards
|
||||
### Relocated Keyboards {#relocated-keyboards}
|
||||
|
||||
#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547))
|
||||
#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635))
|
||||
@@ -24,7 +24,7 @@ handwired/numbrero | flehrad/numbrero
|
||||
snagpad | flehrad/snagpad
|
||||
handwired/tradestation | flehrad/tradestation
|
||||
|
||||
### Updated Keyboard Codebases :id=keyboard-updates
|
||||
### Updated Keyboard Codebases {#keyboard-updates}
|
||||
|
||||
#### Keebio RGB wiring update ([#7754](https://github.com/qmk/qmk_firmware/pull/7754))
|
||||
|
||||
@@ -46,7 +46,7 @@ This change affects:
|
||||
* Quefrency rev1
|
||||
* Viterbi, revs. 1 and 2
|
||||
|
||||
### Changes to Core Functionality :id=core-updates
|
||||
### Changes to Core Functionality {#core-updates}
|
||||
|
||||
* Bigger Combo index ([#9318](https://github.com/qmk/qmk_firmware/pull/9318))
|
||||
|
||||
@@ -58,14 +58,14 @@ Any fork that uses `process_combo_event` needs to update the function's first ar
|
||||
* New function: `void process_combo_event(uint16_t combo_index, bool pressed)`
|
||||
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
## Core Changes {#core-changes}
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
### Fixes {#core-fixes}
|
||||
|
||||
* Mousekeys: scrolling acceleration is no longer coupled to mouse movement acceleration ([#9174](https://github.com/qmk/qmk_firmware/pull/9174))
|
||||
* Keymap Extras: correctly assign Question Mark in Czech layout ([#9987](https://github.com/qmk/qmk_firmware/pull/9987))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
### Additions and Enhancements {#core-additions}
|
||||
|
||||
* allow for WS2812 PWM to work on DMAMUX-capable devices ([#9471](https://github.com/qmk/qmk_firmware/pull/9471))
|
||||
* Newer STM32 MCUs have a DMAMUX peripheral, which allows mapping of DMAs to different DMA streams, rather than hard-defining the target streams in silicon.
|
||||
@@ -109,7 +109,7 @@ Any fork that uses `process_combo_event` needs to update the function's first ar
|
||||
* The K-Type has been refactored to use QMK's native matrix scanning routine, and now has partial support for the RGB Matrix feature.
|
||||
* Joysticks can now be used without defining analog pins ([#10169](https://github.com/qmk/qmk_firmware/pull/10169))
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
### Clean-ups and Optimizations {#core-optimizations}
|
||||
|
||||
* iWRAP protocol removed ([#9284](https://github.com/qmk/qmk_firmware/pull/9284))
|
||||
* work begun for consolidation of ChibiOS platform files ([#8327](https://github.com/qmk/qmk_firmware/pull/8327) and [#9315](https://github.com/qmk/qmk_firmware/pull/9315))
|
||||
@@ -140,7 +140,7 @@ Any fork that uses `process_combo_event` needs to update the function's first ar
|
||||
* remove support for Adafruit EZ Key Bluetooth controller ([#10103](https://github.com/qmk/qmk_firmware/pull/10103))
|
||||
|
||||
|
||||
## QMK Infrastructure and Internals :id=qmk-internals
|
||||
## QMK Infrastructure and Internals {#qmk-internals}
|
||||
|
||||
* Attempt to fix CI for non-master branches. ([#9308](https://github.com/qmk/qmk_firmware/pull/9308))
|
||||
* Actually fetch the branch we're attempting to compare against.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Relocated Keyboards :id=relocated-keyboards
|
||||
### Relocated Keyboards {#relocated-keyboards}
|
||||
|
||||
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
||||
|
||||
@@ -88,21 +88,21 @@ The Valor and Dawn60 keyboards by Xelus22 both now require their revisions to be
|
||||
| xelus/valor | xelus/valor/rev1 |
|
||||
|
||||
|
||||
### Updated Keyboard Codebases :id=keyboard-updates
|
||||
### Updated Keyboard Codebases {#keyboard-updates}
|
||||
|
||||
#### AEboards EXT65 Refactor ([#10820](https://github.com/qmk/qmk_firmware/pull/10820))
|
||||
|
||||
The EXT65 codebase has been reworked so keymaps can be used with either revision.
|
||||
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
## Core Changes {#core-changes}
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
### Fixes {#core-fixes}
|
||||
|
||||
* Reconnect the USB if users wake up a computer from the keyboard to restore the USB state ([#10088](https://github.com/qmk/qmk_firmware/pull/10088))
|
||||
* Fix cursor position bug in oled_write_raw functions ([#10800](https://github.com/qmk/qmk_firmware/pull/10800))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
### Additions and Enhancements {#core-additions}
|
||||
|
||||
* Allow MATRIX_ROWS to be greater than 32 ([#10183](https://github.com/qmk/qmk_firmware/pull/10183))
|
||||
* Add support for soft serial to ATmega32U2 ([#10204](https://github.com/qmk/qmk_firmware/pull/10204))
|
||||
@@ -119,7 +119,7 @@ The EXT65 codebase has been reworked so keymaps can be used with either revision
|
||||
* Add AT90USB support for serial.c ([#10706](https://github.com/qmk/qmk_firmware/pull/10706))
|
||||
* Auto shift: support repeats and early registration (#9826)
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
### Clean-ups and Optimizations {#core-optimizations}
|
||||
|
||||
* Haptic and solenoid cleanup ([#9700](https://github.com/qmk/qmk_firmware/pull/9700))
|
||||
* XD75 cleanup ([#10524](https://github.com/qmk/qmk_firmware/pull/10524))
|
||||
@@ -129,7 +129,7 @@ The EXT65 codebase has been reworked so keymaps can be used with either revision
|
||||
* Remove references to HD44780 ([#10735](https://github.com/qmk/qmk_firmware/pull/10735))
|
||||
|
||||
|
||||
## QMK Infrastructure and Internals :id=qmk-internals
|
||||
## QMK Infrastructure and Internals {#qmk-internals}
|
||||
|
||||
* Add ability to build a subset of all keyboards based on platform. ([#10420](https://github.com/qmk/qmk_firmware/pull/10420))
|
||||
* Initialise EEPROM drivers at startup, instead of upon first execution ([#10438](https://github.com/qmk/qmk_firmware/pull/10438))
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
# QMK Breaking Changes - 2021 May 29 Changelog
|
||||
|
||||
## Notable Changes :id=notable-changes
|
||||
## Notable Changes {#notable-changes}
|
||||
|
||||
### RGB Matrix support for split common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055)) :id=rgb-matrix-split-common
|
||||
### RGB Matrix support for split common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055)) {#rgb-matrix-split-common}
|
||||
|
||||
Split boards can now use RGB Matrix without defining a custom matrix.
|
||||
|
||||
### Teensy 3.6 support ([#12258](https://github.com/qmk/qmk_firmware/pull/12258)) :id=teensy-3-6-support
|
||||
### Teensy 3.6 support ([#12258](https://github.com/qmk/qmk_firmware/pull/12258)) {#teensy-3-6-support}
|
||||
|
||||
Added support for MK66F18 (Teensy 3.6) microcontroller.
|
||||
|
||||
### New command: qmk console ([#12828](https://github.com/qmk/qmk_firmware/pull/12828)) :id=new-command-qmk-console
|
||||
### New command: qmk console ([#12828](https://github.com/qmk/qmk_firmware/pull/12828)) {#new-command-qmk-console}
|
||||
|
||||
A new `qmk console` command has been added for attaching to your keyboard's console. It operates similiarly to QMK Toolbox by allowing you to connect to one or more keyboard consoles to display debugging messages.
|
||||
|
||||
### Improved command: qmk config :id=improve-command-qmk-config
|
||||
### Improved command: qmk config {#improve-command-qmk-config}
|
||||
|
||||
We've updated the `qmk config` command to show only the configuration items you have actually set. You can now display (almost) all of the available configuration options, along with their default values, using `qmk config -a`.
|
||||
|
||||
### LED Matrix Improvements ([#12509](https://github.com/qmk/qmk_firmware/pull/12509), [#12580](https://github.com/qmk/qmk_firmware/pull/12580), [#12588](https://github.com/qmk/qmk_firmware/pull/12588), [#12633](https://github.com/qmk/qmk_firmware/pull/12633), [#12651](https://github.com/qmk/qmk_firmware/pull/12651), [#12685](https://github.com/qmk/qmk_firmware/pull/12685)) :id=led-matrix-improvements
|
||||
### LED Matrix Improvements ([#12509](https://github.com/qmk/qmk_firmware/pull/12509), [#12580](https://github.com/qmk/qmk_firmware/pull/12580), [#12588](https://github.com/qmk/qmk_firmware/pull/12588), [#12633](https://github.com/qmk/qmk_firmware/pull/12633), [#12651](https://github.com/qmk/qmk_firmware/pull/12651), [#12685](https://github.com/qmk/qmk_firmware/pull/12685)) {#led-matrix-improvements}
|
||||
|
||||
LED Matrix has been improved with effects, CIE1931 curves, and a task system.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
* Durgod keyboard refactor in preparation for adding additional durgod keyboards ([#11978](https://github.com/qmk/qmk_firmware/pull/11978))
|
||||
* Updated Function96 with V2 files and removed chconf.h and halconf.h ([#12613](https://github.com/qmk/qmk_firmware/pull/12613))
|
||||
@@ -52,7 +52,7 @@ The codebase for the [Durgod K320](https://github.com/qmk/qmk_firmware/tree/0.13
|
||||
|
||||
Additionally, the `crkbd/rev1/legacy` keyboard has been removed.
|
||||
|
||||
### Bootmagic Deprecation and Refactor ([#12172](https://github.com/qmk/qmk_firmware/pull/12172)) :id=bootmagic-deprecation-and-refactor
|
||||
### Bootmagic Deprecation and Refactor ([#12172](https://github.com/qmk/qmk_firmware/pull/12172)) {#bootmagic-deprecation-and-refactor}
|
||||
|
||||
QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
|
||||
|
||||
@@ -68,11 +68,11 @@ This is the current planned roadmap for the behavior of `BOOTMAGIC_ENABLE`:
|
||||
- From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
|
||||
- From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
|
||||
|
||||
### Removal of LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160)) :id=removal-of-layout-kc
|
||||
### Removal of LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160)) {#removal-of-layout-kc}
|
||||
|
||||
We've removed support for `LAYOUT_kc` macros, if your keymap uses one you will need to update it use a regular `LAYOUT` macro.
|
||||
|
||||
### Encoder callbacks are now boolean ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985)) :id=encoder-callback-boolean
|
||||
### Encoder callbacks are now boolean ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985)) {#encoder-callback-boolean}
|
||||
|
||||
To allow for keyboards to override (or not) keymap level code the `encoder_update_kb` function has been changed from `void` to `bool`. You will need to update your function definition to reflect this and ensure that you return a `true` or `false` value.
|
||||
|
||||
@@ -127,9 +127,9 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
}
|
||||
```
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
## Core Changes {#core-changes}
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
### Fixes {#core-fixes}
|
||||
|
||||
* Fix connection issue in split keyboards when slave and OLED display are connected via I2C (fixes #9335) ([#11487](https://github.com/qmk/qmk_firmware/pull/11487))
|
||||
* Terrazzo: Fix wrong LED Matrix function names ([#12561](https://github.com/qmk/qmk_firmware/pull/12561))
|
||||
@@ -147,7 +147,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
* [Keyboard] Fix Terrazzo build failure ([#12977](https://github.com/qmk/qmk_firmware/pull/12977))
|
||||
* Do not hard set config in CPTC files ([#11864](https://github.com/qmk/qmk_firmware/pull/11864))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
### Additions and Enhancements {#core-additions}
|
||||
|
||||
* ARM - Refactor SLEEP_LED to support more platforms ([#8403](https://github.com/qmk/qmk_firmware/pull/8403))
|
||||
* Add ability to toggle One Shot functionality ([#4198](https://github.com/qmk/qmk_firmware/pull/4198))
|
||||
@@ -193,7 +193,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
* Backlight: add defines for default level and breathing state ([#12560](https://github.com/qmk/qmk_firmware/pull/12560), [#13024](https://github.com/qmk/qmk_firmware/pull/13024))
|
||||
* Add dire message about LUFA mass storage bootloader ([#13014](https://github.com/qmk/qmk_firmware/pull/13014))
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
### Clean-ups and Optimizations {#core-optimizations}
|
||||
|
||||
* Overhaul bootmagic logic to have single entrypoint ([#8532](https://github.com/qmk/qmk_firmware/pull/8532))
|
||||
* Refactor of USB code within split_common ([#11890](https://github.com/qmk/qmk_firmware/pull/11890))
|
||||
@@ -218,7 +218,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
* Deprecate `send_unicode_hex_string()` ([#12602](https://github.com/qmk/qmk_firmware/pull/12602))
|
||||
* [Keyboard] Remove redundant legacy and common headers for crkbd ([#13023](https://github.com/qmk/qmk_firmware/pull/13023))
|
||||
|
||||
### QMK Infrastructure and Internals :id=qmk-internals
|
||||
### QMK Infrastructure and Internals {#qmk-internals}
|
||||
|
||||
* trivial change to trigger api update ([`b15288fb87`](https://github.com/qmk/qmk_firmware/commit/b15288fb87))
|
||||
* fix some references to bin/qmk that slipped in ([#12832](https://github.com/qmk/qmk_firmware/pull/12832))
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# QMK Breaking Changes - 2021 August 28 Changelog
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Combo processing improvements ([#8591](https://github.com/qmk/qmk_firmware/pull/8591)) :id=combo-processing-improvements
|
||||
### Combo processing improvements ([#8591](https://github.com/qmk/qmk_firmware/pull/8591)) {#combo-processing-improvements}
|
||||
|
||||
Combo processing has been reordered with respect to keypress handling, allowing for much better compatibility with mod taps.
|
||||
|
||||
It is also now possible to define combos that have keys overlapping with other combos, triggering only one. For example, a combo of `A`, `B` can coexist with a longer combo of `A`, `B`, `C` -- previous functionality would trigger both combos if all three keys were pressed.
|
||||
|
||||
### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) :id=key-overrides
|
||||
### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) {#key-overrides}
|
||||
|
||||
QMK now has a new feature: [key overrides](https://docs.qmk.fm/#/feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
|
||||
|
||||
@@ -20,9 +20,9 @@ There's far more to describe that what lives in this changelog, so head over to
|
||||
|
||||
QMK gained the ability to pretend to be a digitizer device -- much like a tablet device. A mouse uses delta-coordinates -- move up, move right -- but a digitizer works with absolute coordinates -- top left, bottom right.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -69,7 +69,7 @@ xd84pro | xiudi/xd84pro
|
||||
xd87 | xiudi/xd87
|
||||
xd96 | xiudi/xd96
|
||||
|
||||
### Bootmagic Full Removal ([#13846](https://github.com/qmk/qmk_firmware/pull/13846)) :id=bootmagic-full-removal
|
||||
### Bootmagic Full Removal ([#13846](https://github.com/qmk/qmk_firmware/pull/13846)) {#bootmagic-full-removal}
|
||||
|
||||
As noted during last breaking changes cycle, QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
|
||||
|
||||
@@ -85,7 +85,7 @@ This is the current roadmap for the behavior of `BOOTMAGIC_ENABLE`:
|
||||
- (now) From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
|
||||
- (next) From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
|
||||
|
||||
### DIP switch callbacks are now boolean ([#13399](https://github.com/qmk/qmk_firmware/pull/13399)) :id=dip-switch-boolean
|
||||
### DIP switch callbacks are now boolean ([#13399](https://github.com/qmk/qmk_firmware/pull/13399)) {#dip-switch-boolean}
|
||||
|
||||
To match the encoder change last breaking changes cycle, DIP switch callbacks now return `bool`, too.
|
||||
|
||||
@@ -149,9 +149,9 @@ bool dip_switch_update_mask_user(uint32_t state) {
|
||||
}
|
||||
```
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
### Split transport improvements :id=split-transport-improvements
|
||||
### Split transport improvements {#split-transport-improvements}
|
||||
|
||||
Split keyboards gained a significant amount of improvements during this breaking changes cycle, specifically:
|
||||
|
||||
@@ -160,9 +160,13 @@ Split keyboards gained a significant amount of improvements during this breaking
|
||||
* Make solo half of split keyboards (more) usable. ([#13523](https://github.com/qmk/qmk_firmware/pull/13523)) -- allows the slave to be disconnected, enabling one-handed use.
|
||||
* Switch split_common to CRC subsystem ([#13418](https://github.com/qmk/qmk_firmware/pull/13418))
|
||||
|
||||
!> If you're updating your split keyboard, you will need to flash both sides of the split with the your firmware.
|
||||
:::caution
|
||||
|
||||
### Teensy 4.x support ([#13056](https://github.com/qmk/qmk_firmware/pull/13056), [#13076](https://github.com/qmk/qmk_firmware/pull/13076), [#13077](https://github.com/qmk/qmk_firmware/pull/13077)) :id=teensy-4-x-support
|
||||
If you're updating your split keyboard, you will need to flash both sides of the split with the your firmware.
|
||||
|
||||
:::
|
||||
|
||||
### Teensy 4.x support ([#13056](https://github.com/qmk/qmk_firmware/pull/13056), [#13076](https://github.com/qmk/qmk_firmware/pull/13076), [#13077](https://github.com/qmk/qmk_firmware/pull/13077)) {#teensy-4-x-support}
|
||||
|
||||
Updated ChibiOS and ChibiOS-Contrib, which brought in support for Teensy 4.x dev boards, running NXP i.MX1062.
|
||||
|
||||
@@ -243,7 +247,7 @@ We've added dozens of new keys to `info.json` so that you can configure more tha
|
||||
* `usb.force_nkro`, `usb.max_power`, `usb.no_startup_check`, `usb.polling_interval`, `usb.shared_endpoint.keyboard`, `usb.shared_endpoint.mouse`, `usb.suspend_wakeup_delay`, `usb.wait_for`
|
||||
* `qmk.keys_per_scan`, `qmk.tap_keycode_delay`, `qmk.tap_capslock_delay`
|
||||
|
||||
### Codebase restructure and cleanup :id=codebase-restructure
|
||||
### Codebase restructure and cleanup {#codebase-restructure}
|
||||
|
||||
QMK was originally based on TMK, and has grown in size considerably since its first inception. To keep moving things forward, restructure of some of the core areas of the code is needed to support new concepts and new hardware, and progress is happening along those lines:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# QMK Breaking Changes - 2021 November 27 Changelog
|
||||
|
||||
## 2000 keyboards! :id=qmk-2000th-keyboard
|
||||
## 2000 keyboards! {#qmk-2000th-keyboard}
|
||||
|
||||
QMK had it's 2000th keyboard submitted during this breaking changes cycle.... and it only _just_ made the cut-off!
|
||||
|
||||
@@ -11,9 +11,9 @@ QMK had it's 2000th keyboard submitted during this breaking changes cycle.... an
|
||||
|
||||
From the whole QMK team, a major thankyou to the community for embracing QMK as your preferred keyboard firmware!
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Expanded Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) :id=expanded-pointing-device
|
||||
### Expanded Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) {#expanded-pointing-device}
|
||||
|
||||
Pointing device support has been reworked and reimplemented to allow for easier integration of new peripherals.
|
||||
|
||||
@@ -33,7 +33,7 @@ QMK now has core-supplied support for the following pointing device peripherals:
|
||||
|
||||
See the new documentation for the [Pointing Device](../feature_pointing_device.md) feature for more information on specific configuration for each driver.
|
||||
|
||||
### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) :id=dynamic-tapping-term
|
||||
### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) {#dynamic-tapping-term}
|
||||
|
||||
For people who are starting out with tapping keys, or for people who think tapping keys don't "feel right", it's sometimes quite difficult to determine what duration of tapping term to use to make things seem natural.
|
||||
|
||||
@@ -47,7 +47,7 @@ If you're in this stage of discovery, you can now add `DYNAMIC_TAPPING_TERM_ENAB
|
||||
|
||||
Coupled with the use of `qmk console` or QMK Toolbox to show console output from your keyboard, you can tweak the tapping term dynamically in order to narrow down what "feels right" to you. Once you're happy, drop in the resulting number into your keymap's `config.h` and you're good to go!
|
||||
|
||||
### Macros in JSON keymaps ([#14374](https://github.com/qmk/qmk_firmware/pull/14374)) :id=macros-in-keymap-json
|
||||
### Macros in JSON keymaps ([#14374](https://github.com/qmk/qmk_firmware/pull/14374)) {#macros-in-keymap-json}
|
||||
|
||||
You can now define up to 32 macros in your `keymap.json` file, as used by [QMK Configurator](newbs_building_firmware_configurator.md), and `qmk compile`. You can define these macros in a list under the `macros` keyword, like this:
|
||||
|
||||
@@ -83,9 +83,9 @@ You can now define up to 32 macros in your `keymap.json` file, as used by [QMK C
|
||||
|
||||
In due course, [QMK Configurator](https://config.qmk.fm/) will pick up support for defining these in its UI, but for now the json is the only way to define macros.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -104,13 +104,13 @@ The following keyboards have had their source moved within QMK:
|
||||
| signum/3_0/elitec | signum/3_0 |
|
||||
| tgr/jane | tgr/jane/v2 |
|
||||
|
||||
### Squeezing space out of AVR ([#15243](https://github.com/qmk/qmk_firmware/pull/15243)) :id=squeezing-space-from-avr
|
||||
### Squeezing space out of AVR ([#15243](https://github.com/qmk/qmk_firmware/pull/15243)) {#squeezing-space-from-avr}
|
||||
|
||||
The AVR platform has been problematic for some time, in the sense that it is severely resource-constrained -- this makes life difficult for anyone attempting to add new functionality such as display panels to their keymap code. The illustrious Drashna has contributed some newer documentation on how to attempt to free up some space on AVR-based keyboards that are in short supply.
|
||||
|
||||
Of course, there are much fewer constraints with ARM chips... ;)
|
||||
|
||||
### Require explicit enabling of RGB Matrix modes ([#15018](https://github.com/qmk/qmk_firmware/pull/15018)) :id=explicit-rgb-modes
|
||||
### Require explicit enabling of RGB Matrix modes ([#15018](https://github.com/qmk/qmk_firmware/pull/15018)) {#explicit-rgb-modes}
|
||||
|
||||
Related to the previous section -- RGB Matrix modes have now been made to be opt-in, rather than opt-out. As these animations are now opt-in, you may find that your keyboard no longer has all the RGB modes you're expecting -- you may need to configure and recompile your firmware and enable your animations of choice... with any luck they'll still fit in the space available.
|
||||
|
||||
@@ -118,7 +118,7 @@ Most keyboards keep their original functionality, but over time the QMK maintain
|
||||
|
||||
The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](feature_rgb_matrix.md#rgb-matrix-effects) page.
|
||||
|
||||
### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) :id=oled-task-refactor
|
||||
### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) {#oled-task-refactor}
|
||||
|
||||
OLED display code was traditionally difficult to override in keymaps as they did not follow the standard pattern of `bool *_kb()` deferring to `bool *_user()` functions, allowing signalling to the higher level that processing had already been done.
|
||||
|
||||
@@ -152,7 +152,7 @@ bool oled_task_kb(void) {
|
||||
}
|
||||
```
|
||||
|
||||
### Bootmagic Full Removal ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) :id=bootmagic-full-removal
|
||||
### Bootmagic Full Removal ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) {#bootmagic-full-removal}
|
||||
|
||||
As noted during previous breaking changes cycles, QMK decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
|
||||
|
||||
@@ -170,13 +170,13 @@ This is the historical timeline for the behavior of `BOOTMAGIC_ENABLE`:
|
||||
- (done) From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
|
||||
- (now) From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
|
||||
|
||||
### Remove QWIIC_DRIVERS ([#14174](https://github.com/qmk/qmk_firmware/pull/14174)) :id=remove-qwiic
|
||||
### Remove QWIIC_DRIVERS ([#14174](https://github.com/qmk/qmk_firmware/pull/14174)) {#remove-qwiic}
|
||||
|
||||
Due to minimal QWIIC adoption and other options for similar functionality, the QWIIC drivers were removed from QMK. Existing OLED usages have been migrated across to the normal QMK OLED driver instead.
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
### New MCU Support :id=new-mcu-support
|
||||
### New MCU Support {#new-mcu-support}
|
||||
|
||||
QMK firmware picked up support for a handful of new MCU families, potentially making it a bit easier to source components.
|
||||
|
||||
@@ -187,7 +187,7 @@ QMK firmware is now no longer limited to AVR and ARM - it also picked up support
|
||||
* Westberrytech pr ([#14422](https://github.com/qmk/qmk_firmware/pull/14422))
|
||||
* Initial pass of F405 support ([#14584](https://github.com/qmk/qmk_firmware/pull/14584))
|
||||
|
||||
### EEPROM Changes :id=eeprom-changes
|
||||
### EEPROM Changes {#eeprom-changes}
|
||||
|
||||
There were a few EEPROM-related changes that landed during this breaking changes cycle, most prominently the long-awaited ability for the Drop boards to gain persistent storage. Any users of the Drop CTRL or Drop ALT should update QMK Toolbox as well -- coupled with a QMK firmware update settings should now be saved.
|
||||
|
||||
@@ -197,7 +197,7 @@ There were a few EEPROM-related changes that landed during this breaking changes
|
||||
* Further tidy up of STM32 eeprom emulation ([#14591](https://github.com/qmk/qmk_firmware/pull/14591))
|
||||
* Enable eeprom with F401xE ld ([#14752](https://github.com/qmk/qmk_firmware/pull/14752))
|
||||
|
||||
### Compilation Database :id=compile-commands
|
||||
### Compilation Database {#compile-commands}
|
||||
|
||||
A clang-compatible compilation database generator has been added as an option in order to help development environments such as Visual Studio Code.
|
||||
|
||||
@@ -208,7 +208,7 @@ Do note that switching keyboards will require re-generation of this file.
|
||||
* New CLI subcommand to create clang-compatible compilation database (`compile_commands.json`) ([#14370](https://github.com/qmk/qmk_firmware/pull/14370))
|
||||
* compiledb: query include paths from gcc directly. ([#14462](https://github.com/qmk/qmk_firmware/pull/14462))
|
||||
|
||||
### Codebase restructure and cleanup :id=codebase-restructure
|
||||
### Codebase restructure and cleanup {#codebase-restructure}
|
||||
|
||||
QMK continues on its restructuring journey, in order to make it easier to integrate newer features and add support for new hardware. This quarter's batch of changes include:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# QMK Breaking Changes - 2022 February 26 Changelog
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Default USB Polling rate now 1kHz ([#15352](https://github.com/qmk/qmk_firmware/pull/15352))
|
||||
|
||||
@@ -14,7 +14,7 @@ Pointing devices can now be shared across a split keyboard with support for a si
|
||||
|
||||
See the [Pointing Device](feature_pointing_device.md) documentation for further configuration options.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Legacy macro and action_function system removed ([#16025](https://github.com/qmk/qmk_firmware/pull/16025))
|
||||
|
||||
@@ -31,7 +31,7 @@ Bootloader configuration is no longer assumed. Keyboards must now set either:
|
||||
|
||||
In preparation of future bluetooth work, the `AdafruitBLE` integration has been renamed to allow potential for any other Adafruit BLE products.
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -241,9 +241,9 @@ The following keyboards have had their source moved within QMK:
|
||||
| zinc/rev1 | 25keys/zinc/rev1 |
|
||||
| zinc/reva | 25keys/zinc/reva |
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
### New MCU Support :id=new-mcu-support
|
||||
### New MCU Support {#new-mcu-support}
|
||||
|
||||
Building on previous cycles, QMK firmware picked up support for a couple extra MCU variants:
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# QMK Breaking Changes - 2022 May 28 Changelog
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Caps Word ([#16588](https://github.com/qmk/qmk_firmware/pull/16588)) :id=caps-word
|
||||
### Caps Word ([#16588](https://github.com/qmk/qmk_firmware/pull/16588)) {#caps-word}
|
||||
|
||||
This is a new feature that allows for capslock-like functionality that turns itself off at the end of the word.
|
||||
|
||||
@@ -10,7 +10,7 @@ For instance, if you wish to type "QMK" without holding shift the entire time, y
|
||||
|
||||
There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](feature_caps_word.md) for more information.
|
||||
|
||||
### Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174)) :id=quantum-painter
|
||||
### Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174)) {#quantum-painter}
|
||||
|
||||
QMK has had support for small OLED displays for some time now, but hasn't really gained too much ability to draw to panels other than the SSD1306 or SH1106 panels.
|
||||
|
||||
@@ -20,25 +20,33 @@ The QMK CLI has new commands added to be able to generate images and fonts for Q
|
||||
|
||||
See the [Quantum Painter documentation](quantum_painter.md) for more information on how to set up the displays as well as how to convert images and fonts.
|
||||
|
||||
!> Quantum Painter is not supported on AVR due to complexity and size constraints. Boards based on AVR such as ProMicro or Elite-C builds will not be able to leverage Quantum Painter.
|
||||
:::caution
|
||||
|
||||
### Encoder Mapping ([#13286](https://github.com/qmk/qmk_firmware/pull/13286)) :id=encoder-mapping
|
||||
Quantum Painter is not supported on AVR due to complexity and size constraints. Boards based on AVR such as ProMicro or Elite-C builds will not be able to leverage Quantum Painter.
|
||||
|
||||
:::
|
||||
|
||||
### Encoder Mapping ([#13286](https://github.com/qmk/qmk_firmware/pull/13286)) {#encoder-mapping}
|
||||
|
||||
One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](feature_encoders.md#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap.
|
||||
|
||||
!> This is not yet supported by QMK Configurator. It is also unlikely to ever be supported by VIA.
|
||||
:::caution
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
This is not yet supported by QMK Configurator. It is also unlikely to ever be supported by VIA.
|
||||
|
||||
### `RESET` => `QK_BOOT` ([#17037](https://github.com/qmk/qmk_firmware/pull/17037)) :id=reset-2-qk_boot
|
||||
:::
|
||||
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### `RESET` => `QK_BOOT` ([#17037](https://github.com/qmk/qmk_firmware/pull/17037)) {#reset-2-qk_boot}
|
||||
|
||||
QMK is always in the process of picking up support for new hardware platforms. One of the side-effects for future integrations has shown that QMK's usage of `RESET` as a keycode is causing naming collisions. As a result, [#17037](https://github.com/qmk/qmk_firmware/pull/17037) changed usages of `RESET` to the new keycode `QK_BOOT` in the majority of default-like keymaps. At this stage the old keycode is still usable but will likely be removed in the next breaking changes cycle. Users with keymaps containing `RESET` should also move to `QK_BOOT`.
|
||||
|
||||
### Sendstring keycode overhaul ([#16941](https://github.com/qmk/qmk_firmware/pull/16941)) :id=sendstring-keycodes
|
||||
### Sendstring keycode overhaul ([#16941](https://github.com/qmk/qmk_firmware/pull/16941)) {#sendstring-keycodes}
|
||||
|
||||
Some keycodes used with `SEND_STRING` and its relatives have been deprecated and may have their old keycode usages removed at a later date. The list of [deprecated keycodes](https://github.com/qmk/qmk_firmware/blob/ebd402788346aa6e88bde1486b2a835684d40d39/quantum/send_string_keycodes.h#L456-L505) should be consulted to determine if you're using one of the older names (the first identifier after `#define`) -- you should swap to the newer variant (the second identifier on the same line).
|
||||
|
||||
### Pillow Installation ([#17133](https://github.com/qmk/qmk_firmware/pull/17133)) :id=pillow-install
|
||||
### Pillow Installation ([#17133](https://github.com/qmk/qmk_firmware/pull/17133)) {#pillow-install}
|
||||
|
||||
The merge of Quantum Painter added some new dependencies in the QMK CLI, most notably _Pillow_, which requires some installation in order for the CLI to function. If you've got an existing installation, you'll need to run some commands in order to get things working:
|
||||
|
||||
@@ -62,7 +70,7 @@ On Linux or WSL:
|
||||
python3 -m pip install --user --upgrade qmk
|
||||
```
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -97,7 +105,7 @@ The following keyboards have had their source moved within QMK:
|
||||
|
||||
---
|
||||
|
||||
## Full changelist :id=full-changelist
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
* Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174))
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
# QMK Breaking Changes - 2022 August 27 Changelog
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Add Raspberry Pi RP2040 support ([#14877](https://github.com/qmk/qmk_firmware/pull/14877), [#17514](https://github.com/qmk/qmk_firmware/pull/17514), [#17516](https://github.com/qmk/qmk_firmware/pull/17516), [#17519](https://github.com/qmk/qmk_firmware/pull/17519), [#17612](https://github.com/qmk/qmk_firmware/pull/17612), [#17512](https://github.com/qmk/qmk_firmware/pull/17512), [#17557](https://github.com/qmk/qmk_firmware/pull/17557), [#17817](https://github.com/qmk/qmk_firmware/pull/17817), [#17839](https://github.com/qmk/qmk_firmware/pull/17839), [#18100](https://github.com/qmk/qmk_firmware/pull/18100)) :id=rp2040-support
|
||||
### Add Raspberry Pi RP2040 support ([#14877](https://github.com/qmk/qmk_firmware/pull/14877), [#17514](https://github.com/qmk/qmk_firmware/pull/17514), [#17516](https://github.com/qmk/qmk_firmware/pull/17516), [#17519](https://github.com/qmk/qmk_firmware/pull/17519), [#17612](https://github.com/qmk/qmk_firmware/pull/17612), [#17512](https://github.com/qmk/qmk_firmware/pull/17512), [#17557](https://github.com/qmk/qmk_firmware/pull/17557), [#17817](https://github.com/qmk/qmk_firmware/pull/17817), [#17839](https://github.com/qmk/qmk_firmware/pull/17839), [#18100](https://github.com/qmk/qmk_firmware/pull/18100)) {#rp2040-support}
|
||||
|
||||
QMK _finally_ picked up support for RP2040-based boards, such as the Raspberry Pi Pico, the Sparkfun Pro Micro RP2040, and the Adafruit KB2040. One of QMK's newest collaborators, _@KarlK90_, effectively did `/micdrop` with RP2040, with a massive set of changes to both QMK and the repository QMK uses for the base platform support, ChibiOS[-Contrib]. There has been a flurry of development this breaking changes cycle related to RP2040 from a large number of contributors -- so much so that almost all standard QMK hardware subsystems are supported.
|
||||
|
||||
Check the [RP2040 platform development page](platformdev_rp2040.md) for all supported peripherals and other hardware implementation details.
|
||||
|
||||
### Allow `qmk flash` to use prebuilt firmware binaries ([#16584](https://github.com/qmk/qmk_firmware/pull/16584)) :id=cli-flash-binaries
|
||||
### Allow `qmk flash` to use prebuilt firmware binaries ([#16584](https://github.com/qmk/qmk_firmware/pull/16584)) {#cli-flash-binaries}
|
||||
|
||||
A long-requested capability of the QMK CLI has been the ability to flash binaries directly, without needing to build a firmware. QMK provides prebuilt `develop`-based default firmwares on our [CI page](https://qmk.tzarc.io/) -- normally people would need [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/latest) to flash them. This new functionality written by _@Erovia_ allows `qmk flash` to be provided the prebuilt file instead, simplifying the workflow for people who haven't got Toolbox available.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Default layers dropped from 32 to 16 ([#15286](https://github.com/qmk/qmk_firmware/pull/15286))
|
||||
|
||||
QMK allows for controlling the maximum number of layers it supports through `LAYER_STATE_(8|16|32)BIT`. Each definition allows for the same number of maximum layers -- `LAYER_STATE_8BIT` => 8 layers. There is also a corresponding firmware size decrease that goes along with smaller numbers -- given the vast majority of users don't use more than 16 layers the default has been swapped to 16. AVR users who were not previously specifying their max layer count may see some space freed up as a result.
|
||||
|
||||
### `RESET` => `QK_BOOT` ([#17940](https://github.com/qmk/qmk_firmware/pull/17940)) :id=reset-2-qk_boot
|
||||
### `RESET` => `QK_BOOT` ([#17940](https://github.com/qmk/qmk_firmware/pull/17940)) {#reset-2-qk_boot}
|
||||
|
||||
Following the last breaking changes cycle, QMK has been migrating usages of `RESET` to `QK_BOOT` due to naming collisions with our upstream board support packages. [#17940](https://github.com/qmk/qmk_firmware/pull/17940) converts user keymaps across to use the new keycode name. `RESET` should also move to `QK_BOOT`.
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -33,7 +33,7 @@ The following keyboards have had their source moved within QMK:
|
||||
| idobao/id80/v1/ansi | idobao/id80/v2/ansi |
|
||||
| idobao/id80/v1/iso | idobao/id80/v2/iso |
|
||||
|
||||
### Data-driven USB IDs Refactoring ([#18152](https://github.com/qmk/qmk_firmware/pull/18152)) :id=usb-ids-Refactoring
|
||||
### Data-driven USB IDs Refactoring ([#18152](https://github.com/qmk/qmk_firmware/pull/18152)) {#usb-ids-Refactoring}
|
||||
|
||||
QMK has decided to deprecate the specification of USB IDs inside `config.h` in favour of `info.json`, eventually leaving data-driven as the only method to specify USB information.
|
||||
|
||||
@@ -67,25 +67,25 @@ Replaced by `info.json`:
|
||||
- From 2022 Aug 27, specifying USB information in `config.h` will produce warnings during build but will still function as previously.
|
||||
- From 2022 Nov 26, specifying USB information in `config.h` will cause compilation to fail.
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
### Board converters ([#17514](https://github.com/qmk/qmk_firmware/pull/17514), [#17603](https://github.com/qmk/qmk_firmware/pull/17603), [#17711](https://github.com/qmk/qmk_firmware/pull/17711), [#17827](https://github.com/qmk/qmk_firmware/pull/17827), [#17593](https://github.com/qmk/qmk_firmware/pull/17593), [#17652](https://github.com/qmk/qmk_firmware/pull/17652), [#17595](https://github.com/qmk/qmk_firmware/pull/17595)) :id=board-converters
|
||||
### Board converters ([#17514](https://github.com/qmk/qmk_firmware/pull/17514), [#17603](https://github.com/qmk/qmk_firmware/pull/17603), [#17711](https://github.com/qmk/qmk_firmware/pull/17711), [#17827](https://github.com/qmk/qmk_firmware/pull/17827), [#17593](https://github.com/qmk/qmk_firmware/pull/17593), [#17652](https://github.com/qmk/qmk_firmware/pull/17652), [#17595](https://github.com/qmk/qmk_firmware/pull/17595)) {#board-converters}
|
||||
|
||||
Historically QMK had a `CONVERT_TO_PROTON_C` directive for `rules.mk` to allow people to replace an AVR-based Pro Micro with a QMK Proton C. Global parts shortages have prompted people to create their own pin-compatible boards -- QMK has made this conversion generic and now allows for drop-in replacements for a lot more boards. see the [Converters Feature](feature_converters.md) documentation for the full list of supported replacement boards -- in this breaking changes cycle we've gone from 1 to 7.
|
||||
|
||||
### Add cli command to import keyboard|keymap|kbfirmware ([#16668](https://github.com/qmk/qmk_firmware/pull/16668)) :id=cli-import
|
||||
### Add cli command to import keyboard|keymap|kbfirmware ([#16668](https://github.com/qmk/qmk_firmware/pull/16668)) {#cli-import}
|
||||
|
||||
To help with importing keyboards and keymaps from other sources, _@zvecr_ added [#16668](https://github.com/qmk/qmk_firmware/pull/16668) which adds a new set of commands to the CLI to automatically import keyboards (`qmk import-keyboard -h`), keymaps (`qmk import-keymap -h`), and kbfirmware definitions (`qmk import-kbfirmware -h`) into QMK.
|
||||
|
||||
The now-EOL kbfirmware allowed people who aren't set up with QMK the ability to create keyboard firmwares without requiring a full installation of QMK. Unfortunately, it targets a 7-year-old version of QMK -- adding frustration for users who want the newest features, as well as for QMK maintainers who have to spend time explaining why QMK can't just accept a drive-by code drop from kbfirmware. With any luck, this new command helps both camps!
|
||||
|
||||
### Generic wear-leveling for EEPROM emulation ([#16996](https://github.com/qmk/qmk_firmware/pull/16996), [#17376](https://github.com/qmk/qmk_firmware/pull/17376), [#18102](https://github.com/qmk/qmk_firmware/pull/18102)) :id=wear-leveling
|
||||
### Generic wear-leveling for EEPROM emulation ([#16996](https://github.com/qmk/qmk_firmware/pull/16996), [#17376](https://github.com/qmk/qmk_firmware/pull/17376), [#18102](https://github.com/qmk/qmk_firmware/pull/18102)) {#wear-leveling}
|
||||
|
||||
QMK has had the ability to write to internal MCU flash in order to emulate EEPROM for some time now, but it was only limited to a small number of MCUs. The base HAL used by QMK for a large number of ARM devices provides a "proper" embedded MCU flash driver, so _@tzarc_ decoupled the wear-leveling algorithm from the old flash writing code, improved it, wrote some tests, and enabled its use for a much larger number of other devices... including RP2040's XIP flash, and external SPI NOR Flash.
|
||||
|
||||
See the [EEPROM Driver](eeprom_driver.md) documentation for more information.
|
||||
|
||||
### Pointing Device Improvements ([#16371](https://github.com/qmk/qmk_firmware/pull/16371), [#17111](https://github.com/qmk/qmk_firmware/pull/17111), [#17176](https://github.com/qmk/qmk_firmware/pull/17176), [#17482](https://github.com/qmk/qmk_firmware/pull/17482), [#17776](https://github.com/qmk/qmk_firmware/pull/17776), [#17613](https://github.com/qmk/qmk_firmware/pull/17613)) :id=pointing-device-improvements
|
||||
### Pointing Device Improvements ([#16371](https://github.com/qmk/qmk_firmware/pull/16371), [#17111](https://github.com/qmk/qmk_firmware/pull/17111), [#17176](https://github.com/qmk/qmk_firmware/pull/17176), [#17482](https://github.com/qmk/qmk_firmware/pull/17482), [#17776](https://github.com/qmk/qmk_firmware/pull/17776), [#17613](https://github.com/qmk/qmk_firmware/pull/17613)) {#pointing-device-improvements}
|
||||
|
||||
Ever since Pointing Device Driver support and Split Pointing Device support were added by _@drashna_ and _@daskygit_, there has been increased interest in the development of the pointing device subsystem and its associated code.
|
||||
|
||||
@@ -102,7 +102,7 @@ Other related changes:
|
||||
|
||||
---
|
||||
|
||||
## Full changelist :id=full-changelist
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
* Tentative Teensy 3.5 support ([#14420](https://github.com/qmk/qmk_firmware/pull/14420))
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# QMK Breaking Changes - 2022 November 26 Changelog
|
||||
|
||||
## Notable Features :id=notable-features
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) :id=autocorrect
|
||||
### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) {#autocorrect}
|
||||
|
||||
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](feature_autocorrect.md) for more ifnormation (grin).
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -23,7 +23,7 @@ The following keyboards have had their source moved within QMK:
|
||||
| handwired/hillside/52 | hillside/52 |
|
||||
| maple_computing/christmas_tree/V2017 | maple_computing/christmas_tree/v2017 |
|
||||
|
||||
### Keycodes refactoring :id=keycodes-overhaul-user-action
|
||||
### Keycodes refactoring {#keycodes-overhaul-user-action}
|
||||
|
||||
QMK's keycodes got a very significant overhaul this breaking changes cycle, with the bulk of the work done by _@zvecr_ and _@fauxpark_ -- renaming, reordering, removing has been their focus in this area. In an attempt to standardise interoperation with host applications, keycode values now have strong versioning so that any connected application has confidence that the keys it thinks exist on the board actually match up with what's compiled in. These strongly-versioned keycode definitions are now published online and will not change, so tools that remap keycodes have a reference to work with. In future versions of QMK, any new or changed keycodes will result in a new version specification. See [API docs](api_docs.md#qmk-constants) for more information on the published versions if you're writing a tool to manage keycodes.
|
||||
|
||||
@@ -31,9 +31,13 @@ In most cases user keymaps in the repository have already been updated to reflec
|
||||
|
||||
See below for the full list of changesets.
|
||||
|
||||
!> Keycode aliases have been put in place in most cases to cater for "old names" being mapped to "new names" -- the documentation already reflects all the new naming of keys.
|
||||
:::caution
|
||||
|
||||
### Configuration Item Refactoring :id=config-refactoring
|
||||
Keycode aliases have been put in place in most cases to cater for "old names" being mapped to "new names" -- the documentation already reflects all the new naming of keys.
|
||||
|
||||
:::
|
||||
|
||||
### Configuration Item Refactoring {#config-refactoring}
|
||||
|
||||
A number of configuration items have been renamed for consistency.
|
||||
|
||||
@@ -66,7 +70,7 @@ Joystick configuration:
|
||||
| JOYSTICK_AXES_COUNT | JOYSTICK_AXIS_COUNT |
|
||||
| JOYSTICK_AXES_RESOLUTION | JOYSTICK_AXIS_RESOLUTION |
|
||||
|
||||
### Data-driven USB IDs Refactoring ([#18152](https://github.com/qmk/qmk_firmware/pull/18152)) :id=usb-ids-Refactoring
|
||||
### Data-driven USB IDs Refactoring ([#18152](https://github.com/qmk/qmk_firmware/pull/18152)) {#usb-ids-Refactoring}
|
||||
|
||||
QMK has decided to deprecate the specification of USB IDs inside `config.h` in favour of `info.json`, leaving data-driven as the only method to specify USB information. As per the deprecation schedule put forward last breaking changes cycle, USB information must be specified in `info.json` instead.
|
||||
|
||||
@@ -92,7 +96,7 @@ Replaced by `info.json`:
|
||||
}
|
||||
```
|
||||
|
||||
### LED Indicator callback refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/18450)) :id=led-callback-refactor
|
||||
### LED Indicator callback refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/18450)) {#led-callback-refactor}
|
||||
|
||||
_RGB Matrix_ and _LED Matrix_ Indicator display code was traditionally difficult to override in keymaps as they did not follow the standard pattern of `bool *_kb()` deferring to `bool *_user()` functions, allowing signalling to the higher level that processing had already been done.
|
||||
|
||||
@@ -128,15 +132,15 @@ bool rgb_matrix_indicators_kb(void) {
|
||||
|
||||
The equivalent transformations should be done for LED Matrix boards.
|
||||
|
||||
### Unicode mode refactoring :id=unicode-mode-renaming
|
||||
### Unicode mode refactoring {#unicode-mode-renaming}
|
||||
|
||||
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](feature_unicode.md#setting-the-input-mode) for the new list of values and how to configure them.
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
This breaking changes cycle, a lot of the core changes are related to cleanup and refactoring -- commonly called "tech debt".
|
||||
|
||||
### Keycodes refactoring :id=keycodes-overhaul-core-changes
|
||||
### Keycodes refactoring {#keycodes-overhaul-core-changes}
|
||||
|
||||
We aren't going to list each and every change -- they're far too numerous -- instead, we'll just list the related PRs in order to convey just how wide-reaching these changes were:
|
||||
|
||||
@@ -181,7 +185,7 @@ We aren't going to list each and every change -- they're far too numerous -- ins
|
||||
* Remove legacy sendstring keycodes ([#18749](https://github.com/qmk/qmk_firmware/pull/18749))
|
||||
* Reworked backlight keycodes. ([#18961](https://github.com/qmk/qmk_firmware/pull/18961))
|
||||
|
||||
### Board Converters :id=board-converters
|
||||
### Board Converters {#board-converters}
|
||||
|
||||
There was additional work in the space of board converters -- historically QMK allowed for "converting" a Pro Micro build to a QMK Proton-C build. The last few versions of QMK have added support for replacement boards much like the Proton-C, and this quarter was no exception:
|
||||
|
||||
@@ -193,7 +197,7 @@ There was additional work in the space of board converters -- historically QMK a
|
||||
|
||||
See [Feature: Converters](feature_converters.md) for the full list of board conversions available.
|
||||
|
||||
### Pointing and Digitizer device updates :id=pointing-and-digitizer
|
||||
### Pointing and Digitizer device updates {#pointing-and-digitizer}
|
||||
|
||||
Both pointing devices and digitizer got a host of updates this cycle. Inertia, automatic mouse layers, fixes for preventing sleep... you even get more buttons with digitizers!
|
||||
|
||||
@@ -207,7 +211,7 @@ Both pointing devices and digitizer got a host of updates this cycle. Inertia, a
|
||||
* Invert pointing device motion pin for cirque touchpads ([#18404](https://github.com/qmk/qmk_firmware/pull/18404))
|
||||
* Refactor more host code (programmable button & digitizer) ([#18565](https://github.com/qmk/qmk_firmware/pull/18565))
|
||||
|
||||
## Full changelist :id=full-changelist
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
* quantum: led: split out led_update_ports() for customization of led behaviour ([#14452](https://github.com/qmk/qmk_firmware/pull/14452))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# QMK Breaking Changes - 2023 February 26 Changelog
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
### `IGNORE_MOD_TAP_INTERRUPT` behaviour changes ([#15741](https://github.com/qmk/qmk_firmware/pull/15741)) :id=i-m-t-i
|
||||
### `IGNORE_MOD_TAP_INTERRUPT` behaviour changes ([#15741](https://github.com/qmk/qmk_firmware/pull/15741)) {#i-m-t-i}
|
||||
|
||||
`IGNORE_MOD_TAP_INTERRUPT_PER_KEY` has been removed and `IGNORE_MOD_TAP_INTERRUPT` deprecated as a stepping stone towards making `IGNORE_MOD_TAP_INTERRUPT` the new default behavior for mod-taps in the future.
|
||||
|
||||
@@ -48,7 +48,7 @@ bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
For more information, you are invited to read the sections on [IGNORE_MOD_TAP_INTERRUPT](tap_hold.md#ignore-mod-tap-interrupt) and [HOLD_ON_OTHER_KEY_PRESS](tap_hold.md#hold-on-other-key-press) in the page on [Tap-Hold configuration options](tap_hold.md).
|
||||
|
||||
### `TAPPING_FORCE_HOLD` => `QUICK_TAP_TERM` ([#17007](https://github.com/qmk/qmk_firmware/pull/17007)) :id=quick-tap-term
|
||||
### `TAPPING_FORCE_HOLD` => `QUICK_TAP_TERM` ([#17007](https://github.com/qmk/qmk_firmware/pull/17007)) {#quick-tap-term}
|
||||
|
||||
`TAPPING_FORCE_HOLD` feature is now replaced by `QUICK_TAP_TERM`. Instead of turning off auto-repeat completely, user will have the option to configure a `QUICK_TAP_TERM` in milliseconds. When the user holds a tap-hold key after tapping it within `QUICK_TAP_TERM`, QMK will send the tap keycode to the host, enabling auto-repeat.
|
||||
|
||||
@@ -82,7 +82,7 @@ uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
For more details, please read the updated documentation section on [Quick Tap Term](tap_hold.md#quick-tap-term).
|
||||
|
||||
### Leader Key Rework :id=leader-key-rework ([#19632](https://github.com/qmk/qmk_firmware/pull/19632))
|
||||
### Leader Key Rework {#leader-key-rework} ([#19632](https://github.com/qmk/qmk_firmware/pull/19632))
|
||||
|
||||
The Leader Key feature API has been significantly improved, along with some bugfixes and added tests.
|
||||
|
||||
@@ -108,7 +108,7 @@ void leader_end_user(void) {
|
||||
|
||||
For more information please see the [Leader Key documentation](feature_leader_key.md).
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
@@ -130,7 +130,7 @@ The following keyboards have had their source moved within QMK:
|
||||
| the_uni | stenothe_uni |
|
||||
| xelus/xs60 | xelus/xs60/soldered |
|
||||
|
||||
## Notable core changes :id=notable-core
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
As per last breaking changes cycle, there has been _a lot_ of emphasis on behind-the-scenes changes, mainly around consolidation of core subsystems and constant values, as well as addressing tech debt. Whilst not outwardly visible, this cleanup and refactoring should start paying dividends as it simplifies future development and maintenance.
|
||||
|
||||
@@ -142,7 +142,7 @@ A handful of examples:
|
||||
* Many more configuration options have moved into `info.json`, such as backlight, encoders
|
||||
* Additional unit tests to ensure keycode behaviours don't accidentally change
|
||||
|
||||
## Full changelist :id=full-changelist
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
* Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of HOLD_ON_OTHER_KEY_PRESS_PER_KEY ([#15741](https://github.com/qmk/qmk_firmware/pull/15741))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import DocsifyForwarder from '@site/src/components/DocsifyForwarder';
|
||||
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
## What is QMK Firmware?
|
||||
@@ -8,12 +10,20 @@ QMK (*Quantum Mechanical Keyboard*) is an open source community centered around
|
||||
|
||||
<div class="flex-container">
|
||||
|
||||
?> **Basic** [QMK Configurator](newbs_building_firmware_configurator.md) <br>
|
||||
:::tip Basic
|
||||
|
||||
[QMK Configurator](newbs_building_firmware_configurator.md) <br />
|
||||
User friendly graphical interfaces, no programming knowledge required.
|
||||
|
||||
?> **Advanced** [Use The Source](newbs.md) <br>
|
||||
:::
|
||||
|
||||
:::caution Advanced
|
||||
|
||||
[Use The Source](newbs.md) <br />
|
||||
More powerful, but harder to use.
|
||||
|
||||
:::
|
||||
|
||||
</div>
|
||||
|
||||
## Make It Yours
|
||||
@@ -35,3 +45,5 @@ There are a lot of ways you can contribute to the QMK Community. The easiest way
|
||||
* [Translate our documentation into your language](translating.md)
|
||||
* [Report a bug](https://github.com/qmk/qmk_firmware/issues/new/choose)
|
||||
* [Open a Pull Request](contributing.md)
|
||||
|
||||
<DocsifyForwarder />
|
||||
@@ -1,4 +0,0 @@
|
||||
- Translations
|
||||
- [:uk: English](/)
|
||||
- [:cn: 简体中文](/zh-cn/)
|
||||
- [:jp: 日本語](/ja/)
|
||||
@@ -1,204 +0,0 @@
|
||||
* Tutorial
|
||||
* [Introduction](newbs.md)
|
||||
* [Setup](newbs_getting_started.md)
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Getting Help/Support](support.md)
|
||||
* [Building With GitHub Userspace](newbs_building_firmware_workflow.md)
|
||||
* [Other Resources](newbs_learn_more_resources.md)
|
||||
* [Syllabus](syllabus.md)
|
||||
|
||||
* FAQs
|
||||
* [General FAQ](faq_general.md)
|
||||
* [Build/Compile QMK](faq_build.md)
|
||||
* [Troubleshooting QMK](faq_misc.md)
|
||||
* [Debugging QMK](faq_debug.md)
|
||||
* [Keymap FAQ](faq_keymap.md)
|
||||
* [Squeezing Space from AVR](squeezing_avr.md)
|
||||
* [Glossary](reference_glossary.md)
|
||||
|
||||
* Configurator
|
||||
* [Overview](newbs_building_firmware_configurator.md)
|
||||
* [Step by Step](configurator_step_by_step.md)
|
||||
* [Troubleshooting](configurator_troubleshooting.md)
|
||||
* [Architecture](configurator_architecture.md)
|
||||
* QMK API
|
||||
* [Overview](api_overview.md)
|
||||
* [API Documentation](api_docs.md)
|
||||
* [Keyboard Support](reference_configurator_support.md)
|
||||
* [Adding Default Keymaps](configurator_default_keymaps.md)
|
||||
|
||||
* CLI
|
||||
* [Overview](cli.md)
|
||||
* [Configuration](cli_configuration.md)
|
||||
* [Commands](cli_commands.md)
|
||||
* [Tab Completion](cli_tab_complete.md)
|
||||
|
||||
* Using QMK
|
||||
* Guides
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
* [Driver Installation with Zadig](driver_installation_zadig.md)
|
||||
* [Keymap Overview](keymap.md)
|
||||
* Development Environments
|
||||
* [Docker Guide](getting_started_docker.md)
|
||||
* [Vagrant Guide](getting_started_vagrant.md)
|
||||
* Flashing
|
||||
* [Flashing](flashing.md)
|
||||
* [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md)
|
||||
* IDEs
|
||||
* [Using Eclipse with QMK](other_eclipse.md)
|
||||
* [Using VSCode with QMK](other_vscode.md)
|
||||
* Git Best Practices
|
||||
* [Introduction](newbs_git_best_practices.md)
|
||||
* [Your Fork](newbs_git_using_your_master_branch.md)
|
||||
* [Merge Conflicts](newbs_git_resolving_merge_conflicts.md)
|
||||
* [Fixing Your Branch](newbs_git_resynchronize_a_branch.md)
|
||||
|
||||
* Simple Keycodes
|
||||
* [Full List](keycodes.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
* [Language-Specific Keycodes](reference_keymap_extras.md)
|
||||
* [Modifier Keys](feature_advanced_keycodes.md)
|
||||
* [Quantum Keycodes](quantum_keycodes.md)
|
||||
* [Magic Keycodes](keycodes_magic.md)
|
||||
|
||||
* Advanced Keycodes
|
||||
* [Command](feature_command.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Leader Key](feature_leader_key.md)
|
||||
* [Mod-Tap](mod_tap.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse Keys](feature_mouse_keys.md)
|
||||
* [Programmable Button](feature_programmable_button.md)
|
||||
* [Space Cadet Shift](feature_space_cadet.md)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* Software Features
|
||||
* [Auto Shift](feature_auto_shift.md)
|
||||
* [Autocorrect](feature_autocorrect.md)
|
||||
* [Caps Word](feature_caps_word.md)
|
||||
* [Combos](feature_combo.md)
|
||||
* [Debounce API](feature_debounce_type.md)
|
||||
* [EEPROM](feature_eeprom.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
* [Key Overrides](feature_key_overrides.md)
|
||||
* [Layers](feature_layers.md)
|
||||
* [One Shot Keys](one_shot_keys.md)
|
||||
* [OS Detection](feature_os_detection.md)
|
||||
* [Raw HID](feature_rawhid.md)
|
||||
* [Secure](feature_secure.md)
|
||||
* [Send String](feature_send_string.md)
|
||||
* [Sequencer](feature_sequencer.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Tap-Hold Configuration](tap_hold.md)
|
||||
* [Tri Layer](feature_tri_layer.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
* [WPM Calculation](feature_wpm.md)
|
||||
|
||||
* Hardware Features
|
||||
* Displays
|
||||
* [Quantum Painter](quantum_painter.md)
|
||||
* [Quantum Painter LVGL Integration](quantum_painter_lvgl.md)
|
||||
* [HD44780 LCD Driver](feature_hd44780.md)
|
||||
* [ST7565 LCD Driver](feature_st7565.md)
|
||||
* [OLED Driver](feature_oled_driver.md)
|
||||
* Lighting
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [LED Matrix](feature_led_matrix.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [RGB Matrix](feature_rgb_matrix.md)
|
||||
* [Audio](feature_audio.md)
|
||||
* [Bluetooth](feature_bluetooth.md)
|
||||
* [Bootmagic Lite](feature_bootmagic.md)
|
||||
* [Converters](feature_converters.md)
|
||||
* [Custom Matrix](custom_matrix.md)
|
||||
* [Digitizer](feature_digitizer.md)
|
||||
* [DIP Switch](feature_dip_switch.md)
|
||||
* [Encoders](feature_encoders.md)
|
||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||
* [Joystick](feature_joystick.md)
|
||||
* [LED Indicators](feature_led_indicators.md)
|
||||
* [MIDI](feature_midi.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Velocikey](feature_velocikey.md)
|
||||
|
||||
* Keyboard Building
|
||||
* [Easy Maker for One Offs](easy_maker.md)
|
||||
* [Porting Keyboards](porting_your_keyboard_to_qmk.md)
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP Flashing Guide](isp_flashing_guide.md)
|
||||
|
||||
* Developing QMK
|
||||
* [PR Checklist](pr_checklist.md)
|
||||
* Breaking Changes
|
||||
* [Overview](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* [Most Recent ChangeLog](ChangeLog/20230226.md "QMK v0.20.0 - 2023 Feb 26")
|
||||
* [Past Breaking Changes](breaking_changes_history.md)
|
||||
|
||||
* C Development
|
||||
* [ARM Debugging Guide](arm_debugging.md)
|
||||
* [Coding Conventions](coding_conventions_c.md)
|
||||
* [Compatible Microcontrollers](compatible_microcontrollers.md)
|
||||
* [Drivers](hardware_drivers.md)
|
||||
* [ADC Driver](adc_driver.md)
|
||||
* [Audio Driver](audio_driver.md)
|
||||
* [I2C Driver](i2c_driver.md)
|
||||
* [SPI Driver](spi_driver.md)
|
||||
* [WS2812 Driver](ws2812_driver.md)
|
||||
* [EEPROM Driver](eeprom_driver.md)
|
||||
* [Flash Driver](flash_driver.md)
|
||||
* ['serial' Driver](serial_driver.md)
|
||||
* [UART Driver](uart_driver.md)
|
||||
* [GPIO Controls](gpio_control.md)
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
|
||||
* Python Development
|
||||
* [Coding Conventions](coding_conventions_python.md)
|
||||
* [QMK CLI Development](cli_development.md)
|
||||
|
||||
* Configurator Development
|
||||
* QMK API
|
||||
* [Development Environment](api_development_environment.md)
|
||||
* [Architecture Overview](api_development_overview.md)
|
||||
|
||||
* Hardware Platform Development
|
||||
* Arm/ChibiOS
|
||||
* [Selecting an MCU](platformdev_selecting_arm_mcu.md)
|
||||
* [Early initialization](platformdev_chibios_earlyinit.md)
|
||||
* [Raspberry Pi RP2040](platformdev_rp2040.md)
|
||||
* [Proton C](platformdev_proton_c.md)
|
||||
* [WeAct Blackpill F4x1](platformdev_blackpill_f4x1.md)
|
||||
|
||||
* QMK Reference
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [Translating the QMK Docs](translating.md)
|
||||
* [Config Options](config_options.md)
|
||||
* [Data Driven Configuration](data_driven_config.md)
|
||||
* [Make Documentation](getting_started_make_guide.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Community Layouts](feature_layouts.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
* [Useful Functions](ref_functions.md)
|
||||
* [info.json Format](reference_info_json.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](how_keyboards_work.md)
|
||||
* [How a Matrix Works](how_a_matrix_works.md)
|
||||
* [Understanding QMK](understanding_qmk.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](internals/defines.md)
|
||||
* [Input Callback Reg](internals/input_callback_reg.md)
|
||||
* [Midi Device](internals/midi_device.md)
|
||||
* [Midi Device Setup Process](internals/midi_device_setup_process.md)
|
||||
* [Midi Util](internals/midi_util.md)
|
||||
* [Send Functions](internals/send_functions.md)
|
||||
* [Sysex Tools](internals/sysex_tools.md)
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_label: API Documentation
|
||||
---
|
||||
|
||||
# QMK API
|
||||
|
||||
This page describes using the QMK API. If you are an application developer you can use this API to compile firmware for any [QMK](https://qmk.fm) Keyboard.
|
||||
@@ -67,7 +72,7 @@ Once your compile job has finished you'll check the `result` key. The value of t
|
||||
* `firmware_source_url`: A list of URLs for the full firmware source code
|
||||
* `output`: The stdout and stderr for this compile job. Errors will be found here.
|
||||
|
||||
## Constants :id=qmk-constants
|
||||
## Constants {#qmk-constants}
|
||||
|
||||
If you're writing a tool that leverages constants used within QMK, the API is used to publish "locked-in" versions of those constants in order to ensure that any third-party tooling has a canonical set of information to work with.
|
||||
|
||||
@@ -81,9 +86,17 @@ $ curl https://keyboards.develop.qmk.fm/v1/constants_metadata.json # For `develo
|
||||
{"last_updated": "2022-11-26 12:00:00 GMT", "constants": {"keycodes": ["0.0.1", "0.0.2"]}}
|
||||
```
|
||||
|
||||
!> Versions exported by the `master` endpoint are locked-in. Any extra versions that exist on the `develop` endpoint which don't exist in `master` are subject to change.
|
||||
:::caution
|
||||
|
||||
?> Only keycodes are currently published, but over time all other "externally visible" IDs are expected to appear on these endpoints.
|
||||
Versions exported by the `master` endpoint are locked-in. Any extra versions that exist on the `develop` endpoint which don't exist in `master` are subject to change.
|
||||
|
||||
:::
|
||||
|
||||
:::tip
|
||||
|
||||
Only keycodes are currently published, but over time all other "externally visible" IDs are expected to appear on these endpoints.
|
||||
|
||||
:::
|
||||
|
||||
To retrieve the constants associated with a subsystem, the endpoint format is as follows:
|
||||
```
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 0
|
||||
sidebar_label: Overview
|
||||
---
|
||||
|
||||
# QMK API
|
||||
|
||||
The QMK API provides an asynchronous API that Web and GUI tools can use to compile arbitrary keymaps for any keyboard supported by [QMK](https://qmk.fm/). The stock keymap template supports all QMK keycodes that do not require supporting C code. Keyboard maintainers can supply their own custom templates to enable more functionality.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Audio Driver :id=audio-driver
|
||||
# Audio Driver {#audio-driver}
|
||||
|
||||
The [Audio feature](feature_audio.md) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
|
||||
Not all MCUs support every available driver, either the platform-support is not there (yet?) or the MCU simply does not have the required hardware peripheral.
|
||||
|
||||
|
||||
## AVR :id=avr
|
||||
## AVR {#avr}
|
||||
|
||||
Boards built around an Atmega32U4 can use two sets of PWM capable pins, each driving a separate speaker.
|
||||
The possible configurations are:
|
||||
@@ -23,14 +23,14 @@ AUDIO_DRIVER = pwm_hardware
|
||||
```
|
||||
|
||||
|
||||
## ARM :id=arm
|
||||
## ARM {#arm}
|
||||
|
||||
For Arm based boards, QMK depends on ChibiOS - hence any MCU supported by the later is likely usable, as long as certain hardware peripherals are available.
|
||||
|
||||
Supported wiring configurations, with their ChibiOS/MCU peripheral requirement are listed below;
|
||||
piezo speakers are marked with :one: for the first/primary and :two: for the secondary.
|
||||
|
||||
| driver | GPTD6<br>Tim6 | GPTD7<br>Tim7 | GPTD8<br>Tim8 | PWMD1<sup>1</sup><br>Tim1_Ch1 |
|
||||
| driver | GPTD6<br />Tim6 | GPTD7<br />Tim7 | GPTD8<br />Tim8 | PWMD1<sup>1</sup><br />Tim1_Ch1 |
|
||||
|--------------|------------------------------------------|------------------------|---------------|-------------------------------|
|
||||
| dac_basic | A4+DACD1 = :one: | A5+DACD2 = :one: | state | |
|
||||
| | A4+DACD1 = :one: + Gnd | A5+DACD2 = :two: + Gnd | state | |
|
||||
@@ -50,7 +50,7 @@ piezo speakers are marked with :one: for the first/primary and :two: for the sec
|
||||
|
||||
|
||||
|
||||
### DAC basic :id=dac-basic
|
||||
### DAC basic {#dac-basic}
|
||||
|
||||
The default driver for ARM boards, in absence of an overriding configuration.
|
||||
This driver needs one Timer per enabled/used DAC channel, to trigger conversion; and a third timer to trigger state updates with the audio-core.
|
||||
@@ -79,7 +79,11 @@ Additionally, in the board config, you'll want to make changes to enable the DAC
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
```
|
||||
|
||||
?> Note: DAC1 (A4) uses TIM6, DAC2 (A5) uses TIM7, and the audio state timer uses TIM8 (configurable).
|
||||
:::tip
|
||||
|
||||
Note: DAC1 (A4) uses TIM6, DAC2 (A5) uses TIM7, and the audio state timer uses TIM8 (configurable).
|
||||
|
||||
:::
|
||||
|
||||
You can also change the timer used for the overall audio state by defining the driver. For instance:
|
||||
|
||||
@@ -87,7 +91,7 @@ You can also change the timer used for the overall audio state by defining the d
|
||||
#define AUDIO_STATE_TIMER GPTD9
|
||||
```
|
||||
|
||||
### DAC additive :id=dac-additive
|
||||
### DAC additive {#dac-additive}
|
||||
|
||||
only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; the audio state updates are in turn triggered during the DAC callback.
|
||||
|
||||
@@ -149,7 +153,7 @@ There are a number of predefined quality settings that you can use, with "sane m
|
||||
```
|
||||
|
||||
|
||||
### PWM hardware :id=pwm-hardware
|
||||
### PWM hardware {#pwm-hardware}
|
||||
|
||||
This driver uses the ChibiOS-PWM system to produce a square-wave on specific output pins that are connected to the PWM hardware.
|
||||
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.
|
||||
@@ -187,7 +191,7 @@ ChibiOS uses GPIOv1 for the F103, which only knows of one alternate function.
|
||||
On 'larger' STM32s, GPIOv2 or GPIOv3 are used; with them it is also necessary to configure `AUDIO_PWM_PAL_MODE` to the correct alternate function for the selected pin, timer and timer-channel.
|
||||
|
||||
|
||||
### PWM software :id=pwm-software
|
||||
### PWM software {#pwm-software}
|
||||
|
||||
This driver uses the PWM callbacks from PWMD1 with TIM1_CH1 to toggle the selected AUDIO_PIN in software.
|
||||
During the same callback, with AUDIO_PIN_ALT_AS_NEGATIVE set, the AUDIO_PIN_ALT is toggled inversely to AUDIO_PIN. This is useful for setups that drive a piezo from two pins (instead of one and Gnd).
|
||||
@@ -199,7 +203,7 @@ You can also change the timer used for software PWM by defining the driver. For
|
||||
```
|
||||
|
||||
|
||||
### Testing Notes :id=testing-notes
|
||||
### Testing Notes {#testing-notes}
|
||||
|
||||
While not an exhaustive list, the following table provides the scenarios that have been partially validated:
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 0
|
||||
sidebar_label: Overview
|
||||
---
|
||||
|
||||
# Breaking Changes
|
||||
|
||||
This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
@@ -73,7 +78,7 @@ This section documents various processes we use when running the Breaking Change
|
||||
### 1 Week Before Merge
|
||||
|
||||
* `develop` is now closed to PR merges, only critical bugfixes may be included
|
||||
* Announce that master will be closed from <2 Days Before> to <Day of Merge> -- message `@Breaking Changes Updates` on `#qmk_firmware` in Discord:
|
||||
* Announce that master will be closed from `<2 Days Before>` to `<Day of Merge>` -- message `@Breaking Changes Updates` on `#qmk_firmware` in Discord:
|
||||
* `@Breaking Changes Updates -- Hey folks, last day for functional PRs to be merged into qmk_firmware for this breaking changes cycle is today. After that, we're handling bugfixes only.`
|
||||
|
||||
### 2 Days Before Merge
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_label: My Pull Request Was Flagged
|
||||
---
|
||||
|
||||
# Breaking Changes: My Pull Request Was Flagged
|
||||
|
||||
A QMK member may have replied to your pull request stating that your submission is a breaking change. In their judgment, the changes you have proposed have greater implications for either QMK, or its users.
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
# QMK CLI :id=qmk-cli
|
||||
---
|
||||
sidebar_position: 0
|
||||
sidebar_label: Overview
|
||||
---
|
||||
|
||||
## Overview :id=overview
|
||||
# QMK CLI {#qmk-cli}
|
||||
|
||||
## Overview {#overview}
|
||||
|
||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
|
||||
|
||||
### Requirements :id=requirements
|
||||
### Requirements {#requirements}
|
||||
|
||||
QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
|
||||
|
||||
### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew
|
||||
### Install Using Homebrew (macOS, some Linux) {#install-using-homebrew}
|
||||
|
||||
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
|
||||
|
||||
@@ -18,7 +23,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
### Install Using pip :id=install-using-easy_install-or-pip
|
||||
### Install Using pip {#install-using-easy_install-or-pip}
|
||||
|
||||
If your system is not listed above you can install QMK manually. First ensure that you have Python 3.6 (or later) installed and have installed pip. Then install QMK with this command:
|
||||
|
||||
@@ -28,7 +33,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
### Packaging For Other Operating Systems :id=packaging-for-other-operating-systems
|
||||
### Packaging For Other Operating Systems {#packaging-for-other-operating-systems}
|
||||
|
||||
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
sidebar_label: Commands
|
||||
---
|
||||
|
||||
# QMK CLI Commands
|
||||
|
||||
# User Commands
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_label: Configuration
|
||||
---
|
||||
|
||||
# QMK CLI Configuration
|
||||
|
||||
This document explains how `qmk config` works.
|
||||
|
||||
@@ -202,7 +202,11 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the `
|
||||
|
||||
We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`.
|
||||
|
||||
?> Tip- Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
:::tip
|
||||
|
||||
Tip- Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
|
||||
:::
|
||||
|
||||
## Testing Details
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
sidebar_label: Tab Completion
|
||||
---
|
||||
|
||||
# Tab Completion for QMK
|
||||
|
||||
If you are using Bash 4.2 or later, Zsh, or FiSH you can enable Tab Completion for the QMK CLI. This will let you tab complete the names of flags, keyboards, files, and other `qmk` options.
|
||||
|
||||
@@ -15,7 +15,7 @@ Most of our style follows PEP8 with some local modifications to make things less
|
||||
|
||||
# YAPF
|
||||
|
||||
You can use [yapf](https://github.com/google/yapf) to style your code. We provide a config in [setup.cfg](setup.cfg).
|
||||
You can use [yapf](https://github.com/google/yapf) to style your code. We provide a config in [setup.cfg](https://github.com/qmk/qmk_firmware/blob/master/setup.cfg).
|
||||
|
||||
# Imports
|
||||
|
||||
|
||||