Compare commits

..

1 Commits

Author SHA1 Message Date
zvecr
0b88b0969b Migrate build target markers to keyboard.json 2024-05-26 23:36:49 +01:00
9789 changed files with 289799 additions and 96123 deletions

View File

@ -11,8 +11,7 @@ charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
# To match GitHub Actions formatting [{*.yaml,*.yml}] # To match GitHub Actions formatting
[*.{yaml,yml}]
indent_size = 2 indent_size = 2
[*.md] [*.md]

View File

@ -1,7 +1,7 @@
blank_issues_enabled: false blank_issues_enabled: false
contact_links: contact_links:
- name: QMK Discord - name: QMK Discord
url: https://discord.gg/qmk url: https://discord.gg/Uq7gcHh
about: Ask questions, discuss issues and features. Chill. about: Ask questions, discuss issues and features. Chill.
- name: OLKB Subreddit - name: OLKB Subreddit
url: https://www.reddit.com/r/olkb url: https://www.reddit.com/r/olkb

View File

@ -1,5 +1,6 @@
<!--- Provide a general summary of your changes in the title above. --> <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. --> <!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description ## Description
@ -14,7 +15,7 @@
- [ ] New feature - [ ] New feature
- [ ] Enhancement/optimization - [ ] Enhancement/optimization
- [ ] Keyboard (addition or update) - [ ] Keyboard (addition or update)
- [ ] Keymap/layout (addition or update) - [ ] Keymap/layout/userspace (addition or update)
- [ ] Documentation - [ ] Documentation
## Issues Fixed or Closed by This PR ## Issues Fixed or Closed by This PR

82
.github/labeler.yml vendored
View File

@ -1,56 +1,46 @@
core: core:
- changed-files: - quantum/**/*
- any-glob-to-any-file: - tmk_core/**/*
- quantum/** - drivers/**/*
- tmk_core/** - tests/**/*
- drivers/** - util/**/*
- tests/** - platforms/**/*
- util/** - builddefs/**/*
- platforms/** - Makefile
- builddefs/*.mk - '*.mk'
- Makefile
- '*.mk'
dependencies: dependencies:
- changed-files: - any:
- all-globs-to-any-file: - 'lib/**/*'
- lib/** - '!lib/python/**/*'
- '!lib/python/**'
keyboard: keyboard:
- changed-files: - any:
- all-globs-to-any-file: - 'keyboards/**/*'
- keyboards/** - '!keyboards/**/keymaps/**/*'
- '!keyboards/**/keymaps/**'
keymap: keymap:
- changed-files: - users/**/*
- any-glob-to-any-file: - layouts/**/*
- users/** - keyboards/**/keymaps/**/*
- layouts/**
- keyboards/**/keymaps/**
via: via:
- changed-files: - keyboards/**/keymaps/via/*
- any-glob-to-any-file:
- keyboards/**/keymaps/via/*
cli: cli:
- changed-files: - requirements.txt
- any-glob-to-any-file: - lib/python/**/*
- requirements.txt
- lib/python/**
python: python:
- changed-files: - '**/*.py'
- any-glob-to-any-file:
- '**/*.py'
documentation: documentation:
- changed-files: - docs/**/*
- any-glob-to-any-file: translation:
- docs/** - docs/fr-fr/**/*
- builddefs/docsgen/** - docs/es/**/*
- docs/ja/**/*
- docs/he-il/**/*
- docs/pt-br/**/*
- docs/zh-cn/**/*
- docs/de/**/*
- docs/ru-ru/**/*
CI: CI:
- changed-files: - .github/**/*
- any-glob-to-any-file:
- .github/**
dd: dd:
- changed-files: - data/constants/**/*
- any-glob-to-any-file: - data/mappings/**/*
- data/constants/** - data/schemas/**/*
- data/mappings/**
- data/schemas/**

View File

@ -13,8 +13,8 @@ jobs:
if: github.repository == 'qmk/qmk_firmware' if: github.repository == 'qmk/qmk_firmware'
steps: steps:
- uses: zvecr/automatic-approve-action@safe_files - uses: mheap/automatic-approve-action@v1
with: with:
token: ${{ secrets.QMK_BOT_TOKEN }} token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "labeler.yml,lint.yml,docs.yml" workflows: "format.yml,lint.yml,unit_test.yml"
safe_files: "keyboards/,docs/" dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"

View File

@ -52,9 +52,9 @@ jobs:
run: | run: |
target_count=$( { target_count=$( {
qmk find -km default 2>/dev/null qmk find -km default 2>/dev/null
# qmk find -km xap 2>/dev/null qmk find -km via 2>/dev/null
} | sort | uniq | wc -l) } | sort | uniq | wc -l)
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution as we're splitting default and via
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
build_targets: build_targets:
@ -63,8 +63,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
keymap: [default] keymap: [default, via]
# keymap: [default, xap]
uses: ./.github/workflows/ci_build_major_branch_keymap.yml uses: ./.github/workflows/ci_build_major_branch_keymap.yml
with: with:
branch: ${{ inputs.branch || github.ref_name }} branch: ${{ inputs.branch || github.ref_name }}
@ -78,59 +77,44 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Disable safe.directory check
run: |
git config --global --add safe.directory '*'
- name: Checkout QMK Firmware
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download firmwares - name: Download firmwares
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
pattern: firmware-* pattern: firmware-*
path: . path: firmwares
merge-multiple: true merge-multiple: true
- name: Generate index page
run: |
python3 -m pip install -r ./util/ci/requirements.txt
./util/ci/index_generator.py > index.html
./util/ci/firmware_list_generator.py > firmware_list.json
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }} - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
uses: jakejarvis/s3-sync-action@master uses: jakejarvis/s3-sync-action@master
with: with:
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' args: --acl public-read --follow-symlinks --delete
env: env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
SOURCE_DIR: . SOURCE_DIR: firmwares
DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }} DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
uses: jakejarvis/s3-sync-action@master uses: jakejarvis/s3-sync-action@master
with: with:
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' args: --acl public-read --follow-symlinks --delete
env: env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
SOURCE_DIR: . SOURCE_DIR: firmwares
DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
- name: Check if failure marker file exists - name: Check if failure marker file exists
id: check_failure_marker id: check_failure_marker
uses: andstor/file-existence-action@v3 uses: andstor/file-existence-action@v3
with: with:
files: ./.failed files: firmwares/.failed
- name: Fail build if needed - name: Fail build if needed
if: steps.check_failure_marker.outputs.files_exists == 'true' if: steps.check_failure_marker.outputs.files_exists == 'true'

View File

@ -108,7 +108,7 @@ jobs:
- name: Build targets - name: Build targets
continue-on-error: true continue-on-error: true
run: | run: |
export NCPUS=$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -1 )) export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed
- name: Upload binaries - name: Upload binaries
@ -172,10 +172,10 @@ jobs:
targets-${{ inputs.keymap }} targets-${{ inputs.keymap }}
- name: 'CI Discord Notification' - name: 'CI Discord Notification'
if: always() && !cancelled() if: always()
working-directory: util/ci/ working-directory: util/ci/
env: env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: | run: |
python3 -m pip install -r requirements.txt python3 -m pip install -r requirements.txt
python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --sha $(git rev-parse HEAD) --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

View File

@ -8,27 +8,20 @@ on:
branches: branches:
- master - master
paths: paths:
- 'builddefs/docsgen/**'
- 'tmk_core/**' - 'tmk_core/**'
- 'quantum/**' - 'quantum/**'
- 'platforms/**' - 'platforms/**'
- 'docs/**' - 'docs/**'
- '.github/workflows/docs.yml' - '.github/workflows/docs.yml'
pull_request:
paths:
- 'builddefs/docsgen/**'
- 'docs/**'
- '.github/workflows/docs.yml'
defaults:
run:
shell: bash
jobs: jobs:
generate: generate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli container: ghcr.io/qmk/qmk_cli
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -36,30 +29,18 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
apt-get update && apt-get install -y rsync doxygen apt-get update && apt-get install -y rsync nodejs npm doxygen
# install nvm npm install -g moxygen
touch $HOME/.bashrc
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- name: Install node
run: |
source $HOME/.bashrc
nvm install 20
nvm use 20
corepack enable
- name: Build docs - name: Build docs
run: | run: |
source $HOME/.bashrc
nvm use 20
qmk --verbose generate-docs qmk --verbose generate-docs
- name: Deploy - name: Deploy
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} uses: JamesIves/github-pages-deploy-action@v4.6.1
uses: JamesIves/github-pages-deploy-action@v4.7.2
with: with:
token: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages BASE_BRANCH: master
folder: .build/docs BRANCH: gh-pages
git-config-name: QMK Bot FOLDER: .build/docs
git-config-email: hello@qmk.fm GIT_CONFIG_EMAIL: hello@qmk.fm

View File

@ -35,7 +35,7 @@ jobs:
- name: Get changed files - name: Get changed files
id: file_changes id: file_changes
uses: tj-actions/changed-files@v45 uses: tj-actions/changed-files@v44
with: with:
use_rest_api: true use_rest_api: true

View File

@ -47,7 +47,7 @@ jobs:
git config user.email 'hello@qmk.fm' git config user.email 'hello@qmk.fm'
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v6
if: ${{ github.repository == 'qmk/qmk_firmware'}} if: ${{ github.repository == 'qmk/qmk_firmware'}}
with: with:
token: ${{ secrets.QMK_BOT_TOKEN }} token: ${{ secrets.QMK_BOT_TOKEN }}

View File

@ -1,13 +1,18 @@
name: "Pull Request Labeler" name: "Pull Request Labeler"
permissions:
contents: read
pull-requests: write
on: on:
- pull_request_target pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, locked]
jobs: jobs:
triage: triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/labeler@v5 - uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'

View File

@ -27,7 +27,7 @@ jobs:
- name: Get changed files - name: Get changed files
id: file_changes id: file_changes
uses: tj-actions/changed-files@v45 uses: tj-actions/changed-files@v44
with: with:
use_rest_api: true use_rest_api: true

View File

@ -34,7 +34,7 @@ jobs:
git config user.email 'hello@qmk.fm' git config user.email 'hello@qmk.fm'
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v6
if: ${{ github.repository == 'qmk/qmk_firmware'}} if: ${{ github.repository == 'qmk/qmk_firmware'}}
with: with:
token: ${{ secrets.QMK_BOT_TOKEN }} token: ${{ secrets.QMK_BOT_TOKEN }}

3
.gitignore vendored
View File

@ -25,8 +25,6 @@
*.la *.la
*.stackdump *.stackdump
*.sym *.sym
index.html
firmware_list.json
# QMK-specific # QMK-specific
api_data/v1 api_data/v1
@ -118,5 +116,4 @@ compile_commands.json
# VIA(L) files that don't belong in QMK repo # VIA(L) files that don't belong in QMK repo
via*.json via*.json
/keyboards/**/keymaps/via/*
/keyboards/**/keymaps/vial/* /keyboards/**/keymaps/vial/*

View File

@ -21,7 +21,7 @@ DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QMK Firmware" PROJECT_NAME = "QMK Firmware"
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families" PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
OUTPUT_DIRECTORY = .build/docs/static/doxygen OUTPUT_DIRECTORY = .build/doxygen
ALLOW_UNICODE_NAMES = NO ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
@ -40,8 +40,8 @@ ABBREVIATE_BRIEF = "The $name class" \
ALWAYS_DETAILED_SEC = NO ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES FULL_PATH_NAMES = YES
STRIP_FROM_PATH = STRIP_FROM_PATH =
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
SHORT_NAMES = NO SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO QT_AUTOBRIEF = NO
@ -49,13 +49,13 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4 TAB_SIZE = 4
ALIASES = ALIASES =
TCL_SUBST = TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 2 TOC_INCLUDE_HEADINGS = 2
AUTOLINK_SUPPORT = YES AUTOLINK_SUPPORT = YES
@ -104,14 +104,14 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS = ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES SHOW_USED_FILES = YES
SHOW_FILES = YES SHOW_FILES = YES
SHOW_NAMESPACES = YES SHOW_NAMESPACES = YES
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
LAYOUT_FILE = LAYOUT_FILE =
CITE_BIB_FILES = CITE_BIB_FILES =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to warning and progress messages # Configuration options related to warning and progress messages
@ -124,7 +124,7 @@ WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text" WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE = WARN_LOGFILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the input files # Configuration options related to the input files
@ -143,19 +143,19 @@ FILE_PATTERNS = *.c \
*.hpp \ *.hpp \
*.h++ *.h++
RECURSIVE = YES RECURSIVE = YES
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS = */protocol/arm_atsam/*
EXCLUDE_SYMBOLS = EXCLUDE_SYMBOLS =
EXAMPLE_PATH = EXAMPLE_PATH =
EXAMPLE_PATTERNS = * EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO EXAMPLE_RECURSIVE = NO
IMAGE_PATH = IMAGE_PATH =
INPUT_FILTER = INPUT_FILTER =
FILTER_PATTERNS = FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS = FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE = USE_MDFILE_AS_MAINPAGE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to source browsing # Configuration options related to source browsing
@ -177,7 +177,7 @@ VERBATIM_HEADERS = YES
ALPHABETICAL_INDEX = YES ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5 COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX = IGNORE_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to disabled outputs # Configuration options related to disabled outputs
@ -207,18 +207,18 @@ ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES SEARCH_INCLUDES = YES
INCLUDE_PATH = INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = __DOXYGEN__ PROGMEM PREDEFINED = __DOXYGEN__ PROGMEM
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to external references # Configuration options related to external references
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
TAGFILES = TAGFILES =
GENERATE_TAGFILE = GENERATE_TAGFILE =
ALLEXTERNALS = NO ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES EXTERNAL_PAGES = YES
@ -229,14 +229,14 @@ PERL_PATH = /usr/bin/perl
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES CLASS_DIAGRAMS = YES
MSCGEN_PATH = MSCGEN_PATH =
DIA_PATH = DIA_PATH =
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO HAVE_DOT = NO
DOT_NUM_THREADS = 0 DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10 DOT_FONTSIZE = 10
DOT_FONTPATH = DOT_FONTPATH =
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES GROUP_GRAPHS = YES
@ -251,13 +251,13 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO INTERACTIVE_SVG = NO
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =
MSCFILE_DIRS = MSCFILE_DIRS =
DIAFILE_DIRS = DIAFILE_DIRS =
PLANTUML_JAR_PATH = PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE = PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH = PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50 DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0 MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO DOT_TRANSPARENT = NO

View File

@ -465,18 +465,3 @@ distclean_userspace: clean
rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2 rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2
echo 'done.' echo 'done.'
endif endif
# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA.
CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt
.PHONY: format-core
format-core:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a"
.PHONY: pytest
pytest:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest"
.PHONY: format-and-pytest
format-and-pytest:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest"

View File

@ -21,10 +21,8 @@ $(TEST_OUTPUT)_SRC := \
$(SRC) \ $(SRC) \
$(QUANTUM_PATH)/keymap_introspection.c \ $(QUANTUM_PATH)/keymap_introspection.c \
tests/test_common/matrix.c \ tests/test_common/matrix.c \
tests/test_common/pointing_device_driver.c \
tests/test_common/test_driver.cpp \ tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \ tests/test_common/keyboard_report_util.cpp \
tests/test_common/mouse_report_util.cpp \
tests/test_common/keycode_util.cpp \ tests/test_common/keycode_util.cpp \
tests/test_common/keycode_table.cpp \ tests/test_common/keycode_table.cpp \
tests/test_common/test_fixture.cpp \ tests/test_common/test_fixture.cpp \

View File

@ -34,13 +34,10 @@ ifeq ($(strip $(DUMP_CI_METADATA)),yes)
endif endif
# Force expansion # Force expansion
override TARGET := $(TARGET) TARGET := $(TARGET)
ifneq ($(FORCE_LAYOUT),) ifneq ($(FORCE_LAYOUT),)
override TARGET := $(TARGET)_$(FORCE_LAYOUT) TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif
ifneq ($(CONVERT_TO),)
override TARGET := $(TARGET)_$(CONVERT_TO)
endif endif
# Object files and generated keymap directory # Object files and generated keymap directory
@ -61,6 +58,9 @@ ifdef SKIP_GIT
VERSION_H_FLAGS += --skip-git VERSION_H_FLAGS += --skip-git
endif endif
# Generate the board's version.h file.
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)
# Determine which subfolders exist. # Determine which subfolders exist.
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD) KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1))) KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
@ -186,10 +186,7 @@ endif
# Have we found a keymap.json? # Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "") ifneq ("$(wildcard $(KEYMAP_JSON))", "")
ifneq ("$(wildcard $(KEYMAP_C))", "") ifneq ("$(wildcard $(KEYMAP_C))", "")
# Allow a separately-found keymap.c next to keymap.json -- the keymap.c $(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.)
# generator will include the other keymap.c in the process, if supplied.
OTHER_KEYMAP_C := $(KEYMAP_C)
OPT_DEFS += -DOTHER_KEYMAP_C=\"$(OTHER_KEYMAP_C)\"
endif endif
KEYMAP_PATH := $(KEYMAP_JSON_PATH) KEYMAP_PATH := $(KEYMAP_JSON_PATH)
@ -197,10 +194,8 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "")
KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c
KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h
ifeq ($(OTHER_KEYMAP_C),) # Load the keymap-level rules.mk if exists
# Load the keymap-level rules.mk if exists (and we havent already loaded it for keymap.c) -include $(KEYMAP_PATH)/rules.mk
-include $(KEYMAP_PATH)/rules.mk
endif
# Load any rules.mk content from keymap.json # Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/rules.mk $(KEYMAP_JSON)) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/rules.mk $(KEYMAP_JSON))
@ -217,20 +212,12 @@ $(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON)) $(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON))
@$(BUILD_CMD) @$(BUILD_CMD)
$(INTERMEDIATE_OUTPUT)/src/keymap.h: $(KEYMAP_JSON) generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keymap-h --quiet --output $(INTERMEDIATE_OUTPUT)/src/keymap.h $(KEYMAP_JSON))
@$(BUILD_CMD)
generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c $(INTERMEDIATE_OUTPUT)/src/keymap.h
endif endif
include $(BUILDDEFS_PATH)/converters.mk include $(BUILDDEFS_PATH)/converters.mk
# Generate the board's version.h file.
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)
MCU_ORIG := $(MCU) MCU_ORIG := $(MCU)
include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk) include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk)

View File

@ -47,8 +47,7 @@ PLATFORM:=TEST
PLATFORM_KEY:=test PLATFORM_KEY:=test
BOOTLOADER_TYPE:=none BOOTLOADER_TYPE:=none
DEBUG ?= 0 ifeq ($(strip $(DEBUG)), 1)
ifneq ($(strip $(DEBUG)), 0)
CONSOLE_ENABLE = yes CONSOLE_ENABLE = yes
endif endif

View File

@ -28,7 +28,6 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/sync_timer.c \ $(QUANTUM_DIR)/sync_timer.c \
$(QUANTUM_DIR)/logging/debug.c \ $(QUANTUM_DIR)/logging/debug.c \
$(QUANTUM_DIR)/logging/sendchar.c \ $(QUANTUM_DIR)/logging/sendchar.c \
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
VPATH += $(QUANTUM_DIR)/logging VPATH += $(QUANTUM_DIR)/logging
# Fall back to lib/printf if there is no platform provided print # Fall back to lib/printf if there is no platform provided print
@ -130,13 +129,13 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
MOUSE_ENABLE := yes MOUSE_ENABLE := yes
VPATH += $(QUANTUM_DIR)/pointing_device VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom) ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
endif endif
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER)) OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER))
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_NAME=$(strip $(POINTING_DEVICE_DRIVER))
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800) ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
SPI_DRIVER_REQUIRED = yes SPI_DRIVER_REQUIRED = yes
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
@ -216,7 +215,7 @@ else
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
COMMON_VPATH += $(DRIVER_PATH)/flash COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx AT32F415 GD32VF103),) else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),)
# Wear-leveling EEPROM implementation, backed by MCU flash # Wear-leveling EEPROM implementation, backed by MCU flash
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING
SRC += eeprom_driver.c eeprom_wear_leveling.c SRC += eeprom_driver.c eeprom_wear_leveling.c
@ -239,6 +238,10 @@ else
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
SRC += eeprom_driver.c eeprom_transient.c SRC += eeprom_driver.c eeprom_transient.c
endif endif
else ifeq ($(PLATFORM),ARM_ATSAM)
# arm_atsam EEPROM
OPT_DEFS += -DEEPROM_SAMD
SRC += eeprom_samd.c
else ifeq ($(PLATFORM),TEST) else ifeq ($(PLATFORM),TEST)
# Test harness "EEPROM" # Test harness "EEPROM"
OPT_DEFS += -DEEPROM_TEST_HARNESS OPT_DEFS += -DEEPROM_TEST_HARNESS
@ -279,17 +282,18 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none)
endif endif
endif endif
VALID_FLASH_DRIVER_TYPES := spi custom VALID_FLASH_DRIVER_TYPES := spi
FLASH_DRIVER ?= none FLASH_DRIVER ?= none
ifneq ($(strip $(FLASH_DRIVER)), none) ifneq ($(strip $(FLASH_DRIVER)), none)
ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver) $(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver)
else else
OPT_DEFS += -DFLASH_ENABLE -DFLASH_DRIVER -DFLASH_DRIVER_$(strip $(shell echo $(FLASH_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DFLASH_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/flash
ifeq ($(strip $(FLASH_DRIVER)),spi) ifeq ($(strip $(FLASH_DRIVER)),spi)
SRC += flash_spi.c
SPI_DRIVER_REQUIRED = yes SPI_DRIVER_REQUIRED = yes
OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI
COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += flash_spi.c
endif endif
endif endif
endif endif
@ -307,11 +311,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_ENABLE
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif endif
ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812) ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812)
@ -457,16 +461,12 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h
# TODO: Remove this
SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb_matrix.c
SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
LIB8TION_ENABLE := yes LIB8TION_ENABLE := yes
CIE1931_CURVE := yes CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s) ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s)
SPI_DRIVER_REQUIRED = yes SPI_DRIVER_REQUIRED = yes
@ -569,6 +569,10 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif endif
endif endif
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
endif
VARIABLE_TRACE ?= no VARIABLE_TRACE ?= no
ifneq ($(strip $(VARIABLE_TRACE)),no) ifneq ($(strip $(VARIABLE_TRACE)),no)
SRC += $(QUANTUM_DIR)/variable_trace.c SRC += $(QUANTUM_DIR)/variable_trace.c
@ -878,7 +882,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
NO_USB_STARTUP_CHECK := yes NO_USB_STARTUP_CHECK := yes
COMMON_VPATH += $(DRIVER_PATH)/bluetooth COMMON_VPATH += $(DRIVER_PATH)/bluetooth
SRC += outputselect.c process_connection.c SRC += outputselect.c
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le) ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
SPI_DRIVER_REQUIRED = yes SPI_DRIVER_REQUIRED = yes
@ -933,7 +937,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += ws2812.c ws2812_$(strip $(WS2812_DRIVER)).c SRC += ws2812_$(strip $(WS2812_DRIVER)).c
ifeq ($(strip $(PLATFORM)), CHIBIOS) ifeq ($(strip $(PLATFORM)), CHIBIOS)
ifeq ($(strip $(WS2812_DRIVER)), pwm) ifeq ($(strip $(WS2812_DRIVER)), pwm)

View File

@ -43,25 +43,25 @@ ifneq ($(USE_CCACHE),no)
CC_PREFIX ?= ccache CC_PREFIX ?= ccache
endif endif
#---------------- Debug Options ----------------
DEBUG_ENABLE ?= no
ifeq ($(strip $(DEBUG_ENABLE)),yes)
CFLAGS += -ggdb3
CXXFLAGS += -ggdb3
ASFLAGS += -ggdb3
# Create a map file when debugging
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
endif
#---------------- C Compiler Options ---------------- #---------------- C Compiler Options ----------------
ifeq ($(strip $(LTO_ENABLE)), yes) ifeq ($(strip $(LTO_ENABLE)), yes)
ifeq ($(PLATFORM),ARM_ATSAM)
$(info Enabling LTO on arm_atsam-targeting boards is known to have a high likelihood of failure.)
$(info If unsure, set LTO_ENABLE = no.)
endif
CDEFS += -flto CDEFS += -flto
CDEFS += -DLTO_ENABLE CDEFS += -DLTO_ENABLE
endif endif
DEBUG_ENABLE ?= yes
ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
DEBUG_ENABLE=no
endif
ifeq ($(strip $(DEBUG_ENABLE)),yes)
CFLAGS += -g$(DEBUG)
endif
CFLAGS += $(CDEFS) CFLAGS += $(CDEFS)
CFLAGS += -O$(OPT) CFLAGS += -O$(OPT)
# add color # add color
@ -83,6 +83,9 @@ CFLAGS += -fcommon
#---------------- C++ Compiler Options ---------------- #---------------- C++ Compiler Options ----------------
ifeq ($(strip $(DEBUG_ENABLE)),yes)
CXXFLAGS += -g$(DEBUG)
endif
CXXFLAGS += $(CXXDEFS) CXXFLAGS += $(CXXDEFS)
CXXFLAGS += -O$(OPT) CXXFLAGS += -O$(OPT)
# to suppress "warning: only initialized variables can be placed into program memory area" # to suppress "warning: only initialized variables can be placed into program memory area"
@ -103,10 +106,14 @@ endif
#---------------- Linker Options ---------------- #---------------- Linker Options ----------------
CREATE_MAP ?= yes
ifeq ($(CREATE_MAP),yes)
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
endif
ifeq ($(VERBOSE_LD_CMD),yes) ifeq ($(VERBOSE_LD_CMD),yes)
LDFLAGS += -v LDFLAGS += -v
endif endif
#LDFLAGS += -Wl,--relax
LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
LDFLAGS += -lm LDFLAGS += -lm
@ -119,11 +126,15 @@ ADHLNS_ENABLE ?= no
ifeq ($(ADHLNS_ENABLE),yes) ifeq ($(ADHLNS_ENABLE),yes)
# Avoid "Options to '-Xassembler' do not match" - only specify assembler options at LTO link time # Avoid "Options to '-Xassembler' do not match" - only specify assembler options at LTO link time
ifeq ($(strip $(LTO_ENABLE)), yes) ifeq ($(strip $(LTO_ENABLE)), yes)
LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst
else else
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 ifeq ($(strip $(DEBUG_ENABLE)),yes)
ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
else
ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
endif
endif endif
endif endif

View File

@ -32,6 +32,9 @@ ifneq ($(CONVERT_TO),)
PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2) PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2)
# force setting as value can be from environment
override TARGET := $(TARGET)_$(CONVERT_TO)
# Configure any defaults # Configure any defaults
OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]') OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\" OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\"

View File

@ -1,5 +0,0 @@
node_modules
.vitepress/cache
.vitepress/.temp
.vitepress/dist
docs

View File

@ -1,58 +0,0 @@
import { defineConfig } from "vitepress";
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";
import sidebar from "../../../docs/_sidebar.json";
// https://vitepress.dev/reference/site-config
export default defineConfig(({ mode }) => {
const prod = mode === "production";
return {
title: "QMK Firmware",
description: "Documentation for QMK Firmware",
srcDir: prod ? "docs" : "../../docs",
outDir: "../../.build/docs",
cleanUrls: true,
markdown: {
config(md) {
md.use(tabsMarkdownPlugin);
},
},
vite: {
resolve: {
preserveSymlinks: true,
},
},
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: {
light: "/qmk-logo-light.svg",
dark: "/qmk-logo-dark.svg",
},
title: 'QMK Firmware',
nav: [{ text: "Home", link: "/" }],
search: {
provider: "local",
},
editLink: {
pattern: 'https://github.com/qmk/qmk_firmware/edit/master/docs/:path'
},
lastUpdated: true,
sidebar: sidebar,
externalLinkIcon: true,
socialLinks: [
{ icon: { svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px"><path d="M 29 3 C 28.0625 3 27.164063 3.382813 26.5 4 C 25.835938 4.617188 25.363281 5.433594 25 6.40625 C 24.355469 8.140625 24.085938 10.394531 24.03125 13.03125 C 19.234375 13.179688 14.820313 14.421875 11.28125 16.46875 C 10.214844 15.46875 8.855469 14.96875 7.5 14.96875 C 6.089844 14.96875 4.675781 15.511719 3.59375 16.59375 C 1.425781 18.761719 1.425781 22.238281 3.59375 24.40625 L 3.84375 24.65625 C 3.3125 26.035156 3 27.488281 3 29 C 3 33.527344 5.566406 37.585938 9.5625 40.4375 C 13.558594 43.289063 19.007813 45 25 45 C 30.992188 45 36.441406 43.289063 40.4375 40.4375 C 44.433594 37.585938 47 33.527344 47 29 C 47 27.488281 46.6875 26.035156 46.15625 24.65625 L 46.40625 24.40625 C 48.574219 22.238281 48.574219 18.761719 46.40625 16.59375 C 45.324219 15.511719 43.910156 14.96875 42.5 14.96875 C 41.144531 14.96875 39.785156 15.46875 38.71875 16.46875 C 35.195313 14.433594 30.800781 13.191406 26.03125 13.03125 C 26.09375 10.546875 26.363281 8.46875 26.875 7.09375 C 27.164063 6.316406 27.527344 5.757813 27.875 5.4375 C 28.222656 5.117188 28.539063 5 29 5 C 29.460938 5 29.683594 5.125 30.03125 5.40625 C 30.378906 5.6875 30.785156 6.148438 31.3125 6.6875 C 32.253906 7.652344 33.695313 8.714844 36.09375 8.9375 C 36.539063 11.238281 38.574219 13 41 13 C 43.75 13 46 10.75 46 8 C 46 5.25 43.75 3 41 3 C 38.605469 3 36.574219 4.710938 36.09375 6.96875 C 34.3125 6.796875 33.527344 6.109375 32.75 5.3125 C 32.300781 4.851563 31.886719 4.3125 31.3125 3.84375 C 30.738281 3.375 29.9375 3 29 3 Z M 41 5 C 42.667969 5 44 6.332031 44 8 C 44 9.667969 42.667969 11 41 11 C 39.332031 11 38 9.667969 38 8 C 38 6.332031 39.332031 5 41 5 Z M 25 15 C 30.609375 15 35.675781 16.613281 39.28125 19.1875 C 42.886719 21.761719 45 25.226563 45 29 C 45 32.773438 42.886719 36.238281 39.28125 38.8125 C 35.675781 41.386719 30.609375 43 25 43 C 19.390625 43 14.324219 41.386719 10.71875 38.8125 C 7.113281 36.238281 5 32.773438 5 29 C 5 25.226563 7.113281 21.761719 10.71875 19.1875 C 14.324219 16.613281 19.390625 15 25 15 Z M 7.5 16.9375 C 8.203125 16.9375 8.914063 17.148438 9.53125 17.59375 C 7.527344 19.03125 5.886719 20.769531 4.75 22.71875 C 3.582031 21.296875 3.660156 19.339844 5 18 C 5.714844 17.285156 6.609375 16.9375 7.5 16.9375 Z M 42.5 16.9375 C 43.390625 16.9375 44.285156 17.285156 45 18 C 46.339844 19.339844 46.417969 21.296875 45.25 22.71875 C 44.113281 20.769531 42.472656 19.03125 40.46875 17.59375 C 41.085938 17.148438 41.796875 16.9375 42.5 16.9375 Z M 17 22 C 14.800781 22 13 23.800781 13 26 C 13 28.199219 14.800781 30 17 30 C 19.199219 30 21 28.199219 21 26 C 21 23.800781 19.199219 22 17 22 Z M 33 22 C 30.800781 22 29 23.800781 29 26 C 29 28.199219 30.800781 30 33 30 C 35.199219 30 37 28.199219 37 26 C 37 23.800781 35.199219 22 33 22 Z M 17 24 C 18.117188 24 19 24.882813 19 26 C 19 27.117188 18.117188 28 17 28 C 15.882813 28 15 27.117188 15 26 C 15 24.882813 15.882813 24 17 24 Z M 33 24 C 34.117188 24 35 24.882813 35 26 C 35 27.117188 34.117188 28 33 28 C 31.882813 28 31 27.117188 31 26 C 31 24.882813 31.882813 24 33 24 Z M 34.15625 33.84375 C 34.101563 33.851563 34.050781 33.859375 34 33.875 C 33.683594 33.9375 33.417969 34.144531 33.28125 34.4375 C 33.28125 34.4375 32.757813 35.164063 31.4375 36 C 30.117188 36.835938 28.058594 37.6875 25 37.6875 C 21.941406 37.6875 19.882813 36.835938 18.5625 36 C 17.242188 35.164063 16.71875 34.4375 16.71875 34.4375 C 16.492188 34.082031 16.066406 33.90625 15.65625 34 C 15.332031 34.082031 15.070313 34.316406 14.957031 34.632813 C 14.84375 34.945313 14.894531 35.292969 15.09375 35.5625 C 15.09375 35.5625 15.863281 36.671875 17.46875 37.6875 C 19.074219 38.703125 21.558594 39.6875 25 39.6875 C 28.441406 39.6875 30.925781 38.703125 32.53125 37.6875 C 34.136719 36.671875 34.90625 35.5625 34.90625 35.5625 C 35.207031 35.273438 35.296875 34.824219 35.128906 34.441406 C 34.960938 34.058594 34.574219 33.820313 34.15625 33.84375 Z"/></svg>' }, link: "https://reddit.com/r/olkb" },
{ icon: "discord", link: "https://discord.gg/qmk" },
{ icon: "github", link: "https://github.com/qmk/qmk_firmware" },
],
}
};
});

View File

@ -1,29 +0,0 @@
<script setup>
import DefaultTheme from 'vitepress/theme'
import { useRouter } from 'vitepress'
import { onBeforeMount } from 'vue';
import aliases from "../../../../docs/_aliases.json";
const router = useRouter()
onBeforeMount(async () => {
// Convert from docsify-style to vitepress-style URLs
let newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
// Convert any aliases
let testUrl = new URL(newUrl);
while (testUrl.pathname in aliases) {
testUrl.pathname = aliases[testUrl.pathname];
}
newUrl = testUrl.toString();
// Redirect if required
if (newUrl != window.location.href) {
window.history.replaceState({}, '', newUrl);
await router.go(newUrl);
}
});
</script>
<template>
<DefaultTheme.Layout/>
</template>

View File

@ -1,19 +0,0 @@
/* Override <kbd> as vitepress doesn't put them with borders */
kbd {
border: 1px solid var(--vp-c-text-1);
border-radius: 5px;
margin: 0.2em;
padding: 0.2em;
}
:root {
--vp-nav-logo-height: 32px;
--vp-layout-max-width: calc(98% + 64px);
--vp-sidebar-width: 300px;
}
.VPDoc.has-aside .content-container {
max-width: unset !important;
}

View File

@ -1,13 +0,0 @@
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
import QMKLayout from './QMKLayout.vue'
import './custom.css'
export default {
extends: DefaultTheme,
Layout: QMKLayout,
enhanceApp({ app }) {
enhanceAppWithTabs(app)
}
} satisfies Theme

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
yarn install
[[ -e docs ]] || ln -sf ../../docs docs
DEBUG='vitepress:*,vite:*' yarn run docs:build

View File

@ -1,14 +0,0 @@
{
"license": "GPL-2.0-or-later",
"devDependencies": {
"vite": "^5.2.14",
"vitepress": "^1.1.0",
"vitepress-plugin-tabs": "^0.5.0",
"vue": "^3.4.24"
},
"scripts": {
"docs:dev": "vitepress dev --host 0.0.0.0",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview --host 0.0.0.0"
}
}

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
yarn install
DEBUG='vitepress:*,vite:*' yarn run docs:dev

Some files were not shown because too many files have changed in this diff Show More