commit
bf66b91433
@ -0,0 +1,49 @@ |
||||
name: Lint Format |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- master |
||||
- develop |
||||
|
||||
jobs: |
||||
lint: |
||||
runs-on: ubuntu-latest |
||||
|
||||
container: qmkfm/qmk_cli |
||||
|
||||
steps: |
||||
- name: Install dependencies |
||||
run: | |
||||
apt-get update && apt-get install -y dos2unix |
||||
|
||||
- uses: actions/checkout@v2 |
||||
with: |
||||
fetch-depth: 0 |
||||
|
||||
- name: Run qmk formatters |
||||
shell: 'bash {0}' |
||||
run: | |
||||
qmk format-c -a |
||||
qmk format-python -a |
||||
qmk format-text -a |
||||
git diff |
||||
|
||||
- uses: rlespinasse/github-slug-action@v3.x |
||||
|
||||
- name: Become QMK Bot |
||||
run: | |
||||
git config user.name 'QMK Bot' |
||||
git config user.email 'hello@qmk.fm' |
||||
|
||||
- name: Create Pull Request |
||||
uses: peter-evans/create-pull-request@v3 |
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}} |
||||
with: |
||||
token: ${{ secrets.QMK_BOT_TOKEN }} |
||||
delete-branch: true |
||||
branch: bugfix/format_${{ env.GITHUB_REF_SLUG }} |
||||
author: QMK Bot <hello@qmk.fm> |
||||
committer: QMK Bot <hello@qmk.fm> |
||||
commit-message: Format code according to conventions |
||||
title: '[CI] Format code according to conventions' |
@ -0,0 +1,30 @@ |
||||
name: Unit Tests |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- master |
||||
- develop |
||||
pull_request: |
||||
paths: |
||||
- 'builddefs/**' |
||||
- 'quantum/**' |
||||
- 'platforms/**' |
||||
- 'tmk_core/**' |
||||
- 'tests/**' |
||||
- '*.mk' |
||||
- 'Makefile' |
||||
- '.github/workflows/unit_test.yml' |
||||
|
||||
jobs: |
||||
test: |
||||
runs-on: ubuntu-latest |
||||
|
||||
container: qmkfm/base_container |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
with: |
||||
submodules: recursive |
||||
- name: Run tests |
||||
run: make test:all |
@ -0,0 +1,52 @@ |
||||
# Copyright 2021 QMK
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SPACE_CADET_ENABLE ?= yes
|
||||
GRAVE_ESC_ENABLE ?= yes
|
||||
|
||||
GENERIC_FEATURES = \
|
||||
COMBO \
|
||||
COMMAND \
|
||||
DEFERRED_EXEC \
|
||||
DIGITIZER \
|
||||
DIP_SWITCH \
|
||||
DYNAMIC_KEYMAP \
|
||||
DYNAMIC_MACRO \
|
||||
ENCODER \
|
||||
GRAVE_ESC \
|
||||
HAPTIC \
|
||||
KEY_LOCK \
|
||||
KEY_OVERRIDE \
|
||||
LEADER \
|
||||
PROGRAMMABLE_BUTTON \
|
||||
SPACE_CADET \
|
||||
SWAP_HANDS \
|
||||
TAP_DANCE \
|
||||
VELOCIKEY \
|
||||
WPM \
|
||||
DYNAMIC_TAPPING_TERM \
|
||||
|
||||
define HANDLE_GENERIC_FEATURE |
||||
# $$(info "Processing: $1_ENABLE $2.c")
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
||||
OPT_DEFS += -D$1_ENABLE
|
||||
endef |
||||
|
||||
$(foreach F,$(GENERIC_FEATURES),\
|
||||
$(if $(filter yes, $(strip $($(F)_ENABLE))),\
|
||||
$(eval $(call HANDLE_GENERIC_FEATURE,$(F),$(shell echo $(F) | tr '[:upper:]' '[:lower:]'))) \
|
||||
) \
|
||||
) |
@ -0,0 +1,4 @@ |
||||
// Copyright %(YEAR)s %(YOUR_NAME)s (@%(USER_NAME)s)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "%(KEYBOARD)s.h" |
@ -0,0 +1,22 @@ |
||||
// Copyright %(YEAR)s %(YOUR_NAME)s (@%(USER_NAME)s)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once |
||||
|
||||
#include "quantum.h" |
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
* |
||||
* The first section contains all of the arguments representing the physical |
||||
* layout of the board and position of the keys. |
||||
* |
||||
* The second converts the arguments into a two-dimensional array which |
||||
* represents the switch matrix. |
||||
*/ |
||||
#define LAYOUT( \ |
||||
k00, k01, k02, \
|
||||
k10, k12 \
|
||||
) { \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, KC_NO, k12 } \
|
||||
} |
@ -1 +1 @@ |
||||
# The default keymap for %KEYBOARD% |
||||
# The default keymap for %(KEYBOARD)s |
||||
|
@ -0,0 +1,457 @@ |
||||
# QMK Breaking Changes - 2021 November 27 Changelog |
||||
|
||||
## 2000 keyboards! :id=qmk-2000th-keyboard |
||||
|
||||
QMK had it's 2000th keyboard submitted during this breaking changes cycle.... and it only _just_ made the cut-off! |
||||
|
||||
```shell |
||||
% qmk list-keyboards | wc -l |
||||
2003 |
||||
``` |
||||
|
||||
From the whole QMK team, a major thankyou to the community for embracing QMK as your preferred keyboard firmware! |
||||
|
||||
## Notable Features :id=notable-features |
||||
|
||||
### Expanded Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) :id=expanded-pointing-device |
||||
|
||||
Pointing device support has been reworked and reimplemented to allow for easier integration of new peripherals. |
||||
|
||||
Usages of `POINTING_DEVICE_ENABLE = yes` in `rules.mk` files now need to be accompanied by a corresponding `POINTING_DEVICE_DRIVER = ???` line, specifying which driver to use during the build. Existing keyboards have already been migrated across to the new usage pattern, so most likely no change is required by users. |
||||
|
||||
QMK now has core-supplied support for the following pointing device peripherals: |
||||
|
||||
| `rules.mk` line | Supported device | |
||||
|------------------------------------------------|-----------------------------------------| |
||||
| `POINTING_DEVICE_DRIVER = analog_joystick` | Analog joysticks, such as PSP joysticks | |
||||
| `POINTING_DEVICE_DRIVER = adns5050` | ADNS 5050 sensor | |
||||
| `POINTING_DEVICE_DRIVER = adns9800` | ADNS 9800 laser sensor | |
||||
| `POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c` | Cirque touchpad, I2C mode | |
||||
| `POINTING_DEVICE_DRIVER = cirque_pinnacle_spi` | Cirque Touchpad, SPI mode | |
||||
| `POINTING_DEVICE_DRIVER = pimoroni_trackball` | Pimoroni Trackball | |
||||
| `POINTING_DEVICE_DRIVER = pmw3360` | PMW 3360 | |
||||
|
||||
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 |
||||
|
||||
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. |
||||
|
||||
If you're in this stage of discovery, you can now add `DYNAMIC_TAPPING_TERM_ENABLE = yes` to your `rules.mk`, which enables the use of the following keycodes in your keymap: |
||||
|
||||
| Key | Description | |
||||
|-----------|-------------------------------------------------------------------------------| |
||||
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | |
||||
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by 5ms | |
||||
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by 5ms | |
||||
|
||||
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 |
||||
|
||||
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: |
||||
|
||||
```json |
||||
{ |
||||
"keyboard": "handwired/my_macropad", |
||||
"keymap": "my_keymap", |
||||
"macros": [ |
||||
[ // first listed is MACRO_0... |
||||
{"action":"down", "keycodes": ["LSFT"]}, |
||||
"hello world1", |
||||
{"action": "up","keycodes": ["LSFT"]} |
||||
], |
||||
[ // ...then MACRO_1... |
||||
{"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]} |
||||
], |
||||
[ // ...then MACRO_2... |
||||
"ding!", |
||||
{"action":"beep"} |
||||
], |
||||
[ // ...and MACRO_3. |
||||
{"action":"tap", "keycodes": ["F1"]}, |
||||
{"action":"delay", "duration": "1000"}, |
||||
{"action":"tap", "keycodes": ["PGDN"]} |
||||
] |
||||
], |
||||
"layout": "LAYOUT_all", |
||||
"layers": [ |
||||
["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"] |
||||
] |
||||
} |
||||
``` |
||||
|
||||
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 |
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases |
||||
|
||||
The following keyboards have had their source moved within QMK: |
||||
|
||||
| Old Keyboard Name | New Keyboard Name | |
||||
|------------------------|---------------------------------| |
||||
| aozora/hotswap | aozora | |
||||
| gskt00 | kapcave/gskt00 | |
||||
| handwired/dtisaac01 | dtisaac/dtisaac01 | |
||||
| kprepublic/bm60poker | kprepublic/bm60hsrgb_poker/rev1 | |
||||
| kprepublic/bm60rgb | kprepublic/bm60hsrgb/rev1 | |
||||
| kprepublic/bm60rgb_iso | kprepublic/bm60hsrgb_iso/rev1 | |
||||
| kprepublic/bm65iso | kprepublic/bm65hsrgb_iso | |
||||
| kprepublic/bm68rgb | kprepublic/bm68hsrgb | |
||||
| paladin64 | kapcave/paladin64 | |
||||
| portal_66 | portal_66/soldered | |
||||
| 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 |
||||
|
||||
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 |
||||
|
||||
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. |
||||
|
||||
Most keyboards keep their original functionality, but over time the QMK maintainers have found that removal of animations ends up being the quickest way to free up space... and some keyboards have had animations such as reactive effects disabled by default in order to still fit within the flash space available. |
||||
|
||||
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 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. |
||||
|
||||
This changes the standard OLED drawing function model to allow for a base implementation to be provided by a keyboard, but also still allow for keymap-level overrides without needing to modify the keyboard's code. |
||||
|
||||
The old keymap code went something like this: |
||||
|
||||
```c |
||||
void oled_task_user(void) { |
||||
// keymap drawing code |
||||
} |
||||
``` |
||||
|
||||
...but the new keymap code looks like this: |
||||
```c |
||||
bool oled_task_user(void) { |
||||
// keymap drawing code |
||||
return false; |
||||
} |
||||
``` |
||||
|
||||
Keyboard designers should now structure their keyboard-level drawing routines like the following, in order to allow for keymap overrides: |
||||
|
||||
```c |
||||
bool oled_task_kb(void) { |
||||
// Defer to the keymap if they want to override |
||||
if(!oled_task_user()) { return false; } |
||||
|
||||
// default keyboard drawing code |
||||
return false; |
||||
} |
||||
``` |
||||
|
||||
### Bootmagic Full Removal ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) :id=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. |
||||
|
||||
This removal is now complete! |
||||
|
||||
This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `lite` or `full` results in an error, allowing only `yes` or `no`, with `yes` mirroring historical `lite` functionality. |
||||
|
||||
All use of the `lite` keyword within the repository has been migrated to `yes` -- any new submissions using `lite` will now fail to build and should be updated accordingly. |
||||
|
||||
#### Bootmagic Full Deprecation Schedule: Complete! |
||||
|
||||
This is the historical timeline for the behavior of `BOOTMAGIC_ENABLE`: |
||||
|
||||
- (done) From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic. |
||||
- (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 |
||||
|
||||
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 |
||||
|
||||
### New MCU Support :id=new-mcu-support |
||||
|
||||
QMK firmware picked up support for a handful of new MCU families, potentially making it a bit easier to source components. |
||||
|
||||
QMK firmware is now no longer limited to AVR and ARM - it also picked up support for our first RISC-V chip, the GD32VF103. |
||||
|
||||
* Add support for RISC-V builds and GD32VF103 MCU ([#12508](https://github.com/qmk/qmk_firmware/pull/12508)) |
||||
* Add HT32 support to core ([#14388](https://github.com/qmk/qmk_firmware/pull/14388)) |
||||
* 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 |
||||
|
||||
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. |
||||
|
||||
* massdrop alt/ctrl: support saving into nvm ([#6068](https://github.com/qmk/qmk_firmware/pull/6068)) |
||||
* Implement F4 eeprom ([#14195](https://github.com/qmk/qmk_firmware/pull/14195)) |
||||
* make the full 4096 bytes of EEPROM work on Teensy 3.6 ([#12947](https://github.com/qmk/qmk_firmware/pull/12947)) |
||||
* 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 |
||||
|
||||
A clang-compatible compilation database generator has been added as an option in order to help development environments such as Visual Studio Code. |
||||
|
||||
Running `qmk generate-compilation-database -kb <yourkb> -km <yourkeymap>` from within the QMK firmware directory will generate a `compile_commands.json` file -- using a compatible IDE will likely see this and correctly start detecting the correct locations for source files as well as type and function information that are relevant to your build. |
||||
|
||||
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 |
||||
|
||||
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: |
||||
|
||||
* add 'include keyboard_features.mk' into build_keyboard.mk ([#8422](https://github.com/qmk/qmk_firmware/pull/8422)) |
||||
* Infer more when building features ([#13890](https://github.com/qmk/qmk_firmware/pull/13890)) |
||||
* Move `tmk_core/common/<plat>` ([#13918](https://github.com/qmk/qmk_firmware/pull/13918)) |
||||
* Move feature suspend logic out of platform specific code ([#14210](https://github.com/qmk/qmk_firmware/pull/14210)) |
||||
* Remove bin/qmk ([#14231](https://github.com/qmk/qmk_firmware/pull/14231)) |
||||
* Move Audio drivers from quantum to platform drivers folder ([#14308](https://github.com/qmk/qmk_firmware/pull/14308)) |
||||
* Remove Arduino-style `analogRead()` ([#14348](https://github.com/qmk/qmk_firmware/pull/14348)) |
||||
* Remove unreferenced IBM4704, Sony NEWS, NeXT keyboard code. ([#14380](https://github.com/qmk/qmk_firmware/pull/14380)) |
||||
* Move Bluetooth config to common_features.mk ([#14404](https://github.com/qmk/qmk_firmware/pull/14404)) |
||||
* Relocate Adafruit BLE code ([#14530](https://github.com/qmk/qmk_firmware/pull/14530)) |
||||
* Change `MK66F18` -> `MK66FX1M0` ([#14659](https://github.com/qmk/qmk_firmware/pull/14659)) |
||||
* Remove sysex API ([#14723](https://github.com/qmk/qmk_firmware/pull/14723)) |
||||
* Basic keycode overhaul ([#14726](https://github.com/qmk/qmk_firmware/pull/14726)) |
||||
* Remove SERIAL_LINK feature ([#14727](https://github.com/qmk/qmk_firmware/pull/14727)) |
||||
* Move converter specific tmk_core protocols ([#14743](https://github.com/qmk/qmk_firmware/pull/14743)) |
||||
* Align PS/2 GPIO defines ([#14745](https://github.com/qmk/qmk_firmware/pull/14745)) |
||||
* Clean up LED/RGB Matrix driver config ([#14760](https://github.com/qmk/qmk_firmware/pull/14760)) |
||||
* Update UART driver API ([#14839](https://github.com/qmk/qmk_firmware/pull/14839)) |
||||
* Tidy up LCD_ENABLE/visualizer references ([#14855](https://github.com/qmk/qmk_firmware/pull/14855)) |
||||
* Remove legacy Makefile functionality ([#14858](https://github.com/qmk/qmk_firmware/pull/14858)) |
||||
* Begin to carve out platform/protocol API - Migrate keyboard_* calls ([#14888](https://github.com/qmk/qmk_firmware/pull/14888)) |
||||
* Rename platform SRC variable ([#14894](https://github.com/qmk/qmk_firmware/pull/14894)) |
||||
* Relocate PS2 code ([#14895](https://github.com/qmk/qmk_firmware/pull/14895)) |
||||
* Move USE_CCACHE logic to common location ([#14899](https://github.com/qmk/qmk_firmware/pull/14899)) |
||||
* Migrate makefile utilities to sub-directory ([#14917](https://github.com/qmk/qmk_firmware/pull/14917)) |
||||
* Remove SERIAL_MOUSE ([#14969](https://github.com/qmk/qmk_firmware/pull/14969)) |
||||
* Relocate protocol files within tmk_core/common/ ([#14972](https://github.com/qmk/qmk_firmware/pull/14972)) |
||||
* More platform/protocol alignment ([#14976](https://github.com/qmk/qmk_firmware/pull/14976)) |
||||
* Fix uart function prototypes ([#15162](https://github.com/qmk/qmk_firmware/pull/15162)) |
||||
* Remove deprecated KEYMAP alias ([#15037](https://github.com/qmk/qmk_firmware/pull/15037)) |
||||
* Move non-assignment code to post_rules.mk ([#14207](https://github.com/qmk/qmk_firmware/pull/14207)) |
||||
* Helix use `post_rules.mk` ([#14216](https://github.com/qmk/qmk_firmware/pull/14216)) |
||||
* Make ChibiOS PAL interactions less STM32 specific - Round 2 ([#14456](https://github.com/qmk/qmk_firmware/pull/14456)) |
||||
|
||||
--- |
||||
|
||||
## Full changelist |
||||
|
||||
Core: |
||||
* massdrop alt/ctrl: support saving into nvm ([#6068](https://github.com/qmk/qmk_firmware/pull/6068)) |
||||
* Made AVR backlight pwm resolution configurable ([#7521](https://github.com/qmk/qmk_firmware/pull/7521)) |
||||
* add 'include keyboard_features.mk' into build_keyboard.mk ([#8422](https://github.com/qmk/qmk_firmware/pull/8422)) |
||||
* New feature: `DYNAMIC_TAPPING_TERM_ENABLE` ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) |
||||
* Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts ([#11059](https://github.com/qmk/qmk_firmware/pull/11059)) |
||||
* Add support for RISC-V builds and GD32VF103 MCU ([#12508](https://github.com/qmk/qmk_firmware/pull/12508)) |
||||
* Add Fractal RGB matrix effects ([#12670](https://github.com/qmk/qmk_firmware/pull/12670)) |
||||
* Added power tracking api ([#12691](https://github.com/qmk/qmk_firmware/pull/12691)) |
||||
* haptic: Feature to disable it when usb port is not configured or suspended. ([#12692](https://github.com/qmk/qmk_firmware/pull/12692)) |
||||
* make the full 4096 bytes of EEPROM work on Teensy 3.6 ([#12947](https://github.com/qmk/qmk_firmware/pull/12947)) |
||||
* Add Support for USB programmable buttons ([#12950](https://github.com/qmk/qmk_firmware/pull/12950)) |
||||
* [Tests] Increase QMK test coverage ([#13789](https://github.com/qmk/qmk_firmware/pull/13789)) |
||||
* Add support for ISSI drivers on both sides of a split keyboard ([#13842](https://github.com/qmk/qmk_firmware/pull/13842)) |
||||
* Infer more when building features ([#13890](https://github.com/qmk/qmk_firmware/pull/13890)) |
||||
* Reimplements WPM feature to be smaller & precise ([#13902](https://github.com/qmk/qmk_firmware/pull/13902)) |
||||
* Move `tmk_core/common/<plat>` ([#13918](https://github.com/qmk/qmk_firmware/pull/13918)) |
||||
* Improvements to handling of disconnected split keyboards. ([#14033](https://github.com/qmk/qmk_firmware/pull/14033)) |
||||
* Add Pixel Rain RGB Matrix effect ([#14155](https://github.com/qmk/qmk_firmware/pull/14155)) |
||||
* Remove QWIIC_DRIVERS ([#14174](https://github.com/qmk/qmk_firmware/pull/14174)) |
||||
* Add LM() keys to the list of keys disabled by NO_HAPTIC_MOD ([#14181](https://github.com/qmk/qmk_firmware/pull/14181)) |
||||
* Implement F4 eeprom ([#14195](https://github.com/qmk/qmk_firmware/pull/14195)) |
||||
* define to AUTO_SHIFT_DISABLED_AT_STARTUP ([#14201](https://github.com/qmk/qmk_firmware/pull/14201)) |
||||
* Move feature suspend logic out of platform specific code ([#14210](https://github.com/qmk/qmk_firmware/pull/14210)) |
||||
* Remove bin/qmk ([#14231](https://github.com/qmk/qmk_firmware/pull/14231)) |
||||
* Change keyboard level include guards to `pragma once` ([#14248](https://github.com/qmk/qmk_firmware/pull/14248)) |
||||
* i2c_master: Add support for reading/writing to 16-bit registers ([#14289](https://github.com/qmk/qmk_firmware/pull/14289)) |
||||
* Move Audio drivers from quantum to platform drivers folder ([#14308](https://github.com/qmk/qmk_firmware/pull/14308)) |
||||
* Add RGBW support to PWM and SPI drivers for ChibiOS ([#14327](https://github.com/qmk/qmk_firmware/pull/14327)) |
||||
* Rework and expand Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) |
||||
* Remove Arduino-style `analogRead()` ([#14348](https://github.com/qmk/qmk_firmware/pull/14348)) |
||||
* Macros in JSON keymaps ([#14374](https://github.com/qmk/qmk_firmware/pull/14374)) |
||||
* Remove unreferenced IBM4704, Sony NEWS, NeXT keyboard code. ([#14380](https://github.com/qmk/qmk_firmware/pull/14380)) |
||||
* Add HT32 support to core ([#14388](https://github.com/qmk/qmk_firmware/pull/14388)) |
||||
* Align ChibiOS I2C defs with other drivers ([#14399](https://github.com/qmk/qmk_firmware/pull/14399)) |
||||
* Move Bluetooth config to common_features.mk ([#14404](https://github.com/qmk/qmk_firmware/pull/14404)) |
||||
* Westberrytech pr ([#14422](https://github.com/qmk/qmk_firmware/pull/14422)) |
||||
* Refactor use of STM32_SYSCLK ([#14430](https://github.com/qmk/qmk_firmware/pull/14430)) |
||||
* Migrate STM32_EEPROM_ENABLE to use EEPROM_DRIVER ([#14433](https://github.com/qmk/qmk_firmware/pull/14433)) |
||||
* Refactor use of _STM32_ defines ([#14439](https://github.com/qmk/qmk_firmware/pull/14439)) |
||||
* Add i2c defaults for Convert to Proton C ([#14470](https://github.com/qmk/qmk_firmware/pull/14470)) |
||||
* Use opendrain pin with external pullup again ([#14474](https://github.com/qmk/qmk_firmware/pull/14474)) |
||||
* Add ability to use numpad digits for unicode mode UC_WIN ([#14496](https://github.com/qmk/qmk_firmware/pull/14496)) |
||||
* Enable de-ghosting for RGB/LED matrix on all ISSI LED drivers ([#14508](https://github.com/qmk/qmk_firmware/pull/14508)) |
||||
* Relocate Adafruit BLE code ([#14530](https://github.com/qmk/qmk_firmware/pull/14530)) |
||||
* Initial pass of F405 support ([#14584](https://github.com/qmk/qmk_firmware/pull/14584)) |
||||
* Further tidy up of STM32 eeprom emulation ([#14591](https://github.com/qmk/qmk_firmware/pull/14591)) |
||||
* Remove GCC version check from song list inclusion ([#14600](https://github.com/qmk/qmk_firmware/pull/14600)) |
||||
* Change `MK66F18` -> `MK66FX1M0` ([#14659](https://github.com/qmk/qmk_firmware/pull/14659)) |
||||
* Add ifndef to WS2812 timing constraints ([#14678](https://github.com/qmk/qmk_firmware/pull/14678)) |
||||
* Reuse of EEPROM debounce logic ([#14699](https://github.com/qmk/qmk_firmware/pull/14699)) |
||||
* Remove sysex API ([#14723](https://github.com/qmk/qmk_firmware/pull/14723)) |
||||
* Basic keycode overhaul ([#14726](https://github.com/qmk/qmk_firmware/pull/14726)) |
||||
* Remove SERIAL_LINK feature ([#14727](https://github.com/qmk/qmk_firmware/pull/14727)) |
||||
* Enable CLI flashing via mdloader ([#14729](https://github.com/qmk/qmk_firmware/pull/14729)) |
||||
* Correct the Turkish F '?' keycode (TR_QUES) ([#14740](https://github.com/qmk/qmk_firmware/pull/14740)) |
||||
* Move converter specific tmk_core protocols ([#14743](https://github.com/qmk/qmk_firmware/pull/14743)) |
||||
* Align PS/2 GPIO defines ([#14745](https://github.com/qmk/qmk_firmware/pull/14745)) |
||||
* Improve Adafruit BLE configuration defines ([#14749](https://github.com/qmk/qmk_firmware/pull/14749)) |
||||
* Enable eeprom with F401xE ld ([#14752](https://github.com/qmk/qmk_firmware/pull/14752)) |
||||
* Clean up LED/RGB Matrix driver config ([#14760](https://github.com/qmk/qmk_firmware/pull/14760)) |
||||
* Initial USB2422 driver ([#14835](https://github.com/qmk/qmk_firmware/pull/14835)) |
||||
* Update UART driver API ([#14839](https://github.com/qmk/qmk_firmware/pull/14839)) |
||||
* Split out arm_atsam shift register logic ([#14848](https://github.com/qmk/qmk_firmware/pull/14848)) |
||||
* Split out HAPTIC_ENABLE to have separate DRIVER option ([#14854](https://github.com/qmk/qmk_firmware/pull/14854)) |
||||
* Tidy up LCD_ENABLE/visualizer references ([#14855](https://github.com/qmk/qmk_firmware/pull/14855)) |
||||
* Remove legacy Makefile functionality ([#14858](https://github.com/qmk/qmk_firmware/pull/14858)) |
||||
* Add support for deferred executors. ([#14859](https://github.com/qmk/qmk_firmware/pull/14859)) |
||||
* Change OLED task function to be boolean ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) |
||||
* Add a new led driver for Keychron's keyboards. ([#14872](https://github.com/qmk/qmk_firmware/pull/14872)) |
||||
* Begin to carve out platform/protocol API - Migrate keyboard_* calls ([#14888](https://github.com/qmk/qmk_firmware/pull/14888)) |
||||
* Rename platform SRC variable ([#14894](https://github.com/qmk/qmk_firmware/pull/14894)) |
||||
* Relocate PS2 code ([#14895](https://github.com/qmk/qmk_firmware/pull/14895)) |
||||
* Move USE_CCACHE logic to common location ([#14899](https://github.com/qmk/qmk_firmware/pull/14899)) |
||||
* Migrate makefile utilities to sub-directory ([#14917](https://github.com/qmk/qmk_firmware/pull/14917)) |
||||
* Remove legacy handling for ErgoDox Infinity handedness ([#14919](https://github.com/qmk/qmk_firmware/pull/14919)) |
||||
* Align usbasp flashing behaviour ([#14928](https://github.com/qmk/qmk_firmware/pull/14928)) |
||||
* Optimize matrix scanning by removing variable shifts ([#14947](https://github.com/qmk/qmk_firmware/pull/14947)) |
||||
* Stop-gap forward-port Drop LED features for CTRL and ALT ([#14967](https://github.com/qmk/qmk_firmware/pull/14967)) |
||||
* Remove SERIAL_MOUSE ([#14969](https://github.com/qmk/qmk_firmware/pull/14969)) |
||||
* Relocate protocol files within tmk_core/common/ ([#14972](https://github.com/qmk/qmk_firmware/pull/14972)) |
||||
* Move LTO logic from common.mk ([#14973](https://github.com/qmk/qmk_firmware/pull/14973)) |
||||
* More platform/protocol alignment ([#14976](https://github.com/qmk/qmk_firmware/pull/14976)) |
||||
* Add support to persist MD LED framework settings ([#14980](https://github.com/qmk/qmk_firmware/pull/14980)) |
||||
* Enable configuration of PWM frequency for IS31FL3733B ([#14983](https://github.com/qmk/qmk_firmware/pull/14983)) |
||||
* Remove `BOOTMAGIC_ENABLE = lite` option ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) |
||||
* Manually format develop ([#15003](https://github.com/qmk/qmk_firmware/pull/15003)) |
||||
* Require explicit enabling of RGB Matrix modes ([#15018](https://github.com/qmk/qmk_firmware/pull/15018)) |
||||
* Remove deprecated KEYMAP alias ([#15037](https://github.com/qmk/qmk_firmware/pull/15037)) |
||||
* Fix uart function prototypes ([#15162](https://github.com/qmk/qmk_firmware/pull/15162)) |
||||
* Rename RGB fractal ([#15174](https://github.com/qmk/qmk_firmware/pull/15174)) |
||||
* Format code according to conventions ([#15195](https://github.com/qmk/qmk_firmware/pull/15195)) |
||||
* Format code according to conventions ([#15196](https://github.com/qmk/qmk_firmware/pull/15196)) |
||||
* Add uint to char functions ([#15244](https://github.com/qmk/qmk_firmware/pull/15244)) |
||||
* [Tests] Increase QMK test coverage take 2 ([#15269](https://github.com/qmk/qmk_firmware/pull/15269)) |
||||
* Tidy up adjustable ws2812 timing ([#15299](https://github.com/qmk/qmk_firmware/pull/15299)) |
||||
* Add script for performing compilation size regression investigations. ([#15303](https://github.com/qmk/qmk_firmware/pull/15303)) |
||||
* WB32F3G71 config migration with removal of unnecessary items. ([#15309](https://github.com/qmk/qmk_firmware/pull/15309)) |
||||
* Re-add encoder tests ([#15312](https://github.com/qmk/qmk_firmware/pull/15312)) |
||||
|
||||
CLI: |
||||
* Add check for non-assignment code in rules.mk ([#12108](https://github.com/qmk/qmk_firmware/pull/12108)) |
||||
* Export list of `develop` PRs to be merged into `master` ([#13944](https://github.com/qmk/qmk_firmware/pull/13944)) |
||||
* remove qmk console, which is now part of the global cli ([#14206](https://github.com/qmk/qmk_firmware/pull/14206)) |
||||
* 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)) |
||||
|
||||
Submodule updates: |
||||
* Update to ChibiOS 20.3.4, support builds against trunk ([#14208](https://github.com/qmk/qmk_firmware/pull/14208)) |
||||
* Update ChibiOS-Contrib ([#14408](https://github.com/qmk/qmk_firmware/pull/14408)) |
||||
* Update ChibiOS-Contrib ([#14419](https://github.com/qmk/qmk_firmware/pull/14419)) |
||||
* Purge uGFX. ([#14720](https://github.com/qmk/qmk_firmware/pull/14720)) |
||||
|
||||
Keyboards: |
||||
* Add support for PaladinPad, Arya pcb and move keyboards by KapCave into their own directory ([#14194](https://github.com/qmk/qmk_firmware/pull/14194)) |
||||
* Move non-assignment code to post_rules.mk ([#14207](https://github.com/qmk/qmk_firmware/pull/14207)) |
||||
* Helix use `post_rules.mk` ([#14216](https://github.com/qmk/qmk_firmware/pull/14216)) |
||||
* handwired/symmetric70_proto use post_rules.mk ([#14235](https://github.com/qmk/qmk_firmware/pull/14235)) |
||||
* Add Adelais PCB. Adelais RGB rev.3, Adelais rev. 4 APM32F103, Adelais AVR rev. 1 ([#14252](https://github.com/qmk/qmk_firmware/pull/14252)) |
||||
* GMMK Pro keymap ([#14389](https://github.com/qmk/qmk_firmware/pull/14389)) |
||||
* Migrate boston_meetup/2019 away from QWIIC_DRIVERS ([#14413](https://github.com/qmk/qmk_firmware/pull/14413)) |
||||
* Migrate hadron away from QWIIC_DRIVERS ([#14415](https://github.com/qmk/qmk_firmware/pull/14415)) |
||||
* Enable Proton C defaults for SplitKB Kyria ([#14490](https://github.com/qmk/qmk_firmware/pull/14490)) |
||||
* Set USB max power consumption of kint* controllers to 100mA ([#14546](https://github.com/qmk/qmk_firmware/pull/14546)) |
||||
* Remove complex `fn_actions` macros ([#14662](https://github.com/qmk/qmk_firmware/pull/14662)) |
||||
* New Keyboard: TGR Jane CE ([#14713](https://github.com/qmk/qmk_firmware/pull/14713)) |
||||
* Migrate satisfaction75 away from QWIIC_DRIVERS ([#14747](https://github.com/qmk/qmk_firmware/pull/14747)) |
||||
* add Lefty keyboard ([#14898](https://github.com/qmk/qmk_firmware/pull/14898)) |
||||
* overnumpad controller: Add support for turning off solenoid enable in low power. ([#15021](https://github.com/qmk/qmk_firmware/pull/15021)) |
||||
* Reduce compile size for melgeek mach80 ([#15034](https://github.com/qmk/qmk_firmware/pull/15034)) |
||||
* Update updated KPrepublic boards to be prepared for the update ([#15040](https://github.com/qmk/qmk_firmware/pull/15040)) |
||||
* rename kprepublic bm keyboards to have a standardized naming format ([#15047](https://github.com/qmk/qmk_firmware/pull/15047)) |
||||
* matrix/abelx - Update ChibiOS conf files ([#15130](https://github.com/qmk/qmk_firmware/pull/15130)) |
||||
* Disable console on Keebio foldkb and iris rev3 ([#15260](https://github.com/qmk/qmk_firmware/pull/15260)) |
||||
* Disable console on Sofle default keymap ([#15261](https://github.com/qmk/qmk_firmware/pull/15261)) |
||||
* Disable features on SplitKB boards to fit under size ([#15262](https://github.com/qmk/qmk_firmware/pull/15262)) |
||||
* Enable LTO on viktus/sp_mini via keymap ([#15263](https://github.com/qmk/qmk_firmware/pull/15263)) |
||||
|
||||
Keyboard fixes: |
||||
* Fix number of elements in info.json does not match errors ([#14213](https://github.com/qmk/qmk_firmware/pull/14213)) |
||||
* Fix typos from 14248 ([#14261](https://github.com/qmk/qmk_firmware/pull/14261)) |
||||
* Stream cheap via fixes/updates ([#14325](https://github.com/qmk/qmk_firmware/pull/14325)) |
||||
* Map `PRODUCT` define to `keyboard_name` ([#14372](https://github.com/qmk/qmk_firmware/pull/14372)) |
||||
* Fix BT rules for dosa40rgb ([#14497](https://github.com/qmk/qmk_firmware/pull/14497)) |
||||
* Fix typo in mechloving adelais header files ([#14590](https://github.com/qmk/qmk_firmware/pull/14590)) |
||||
* Fix for mechlovin/adelais/standard_led/arm/rev4 ([#14639](https://github.com/qmk/qmk_firmware/pull/14639)) |
||||
* Fix OLED timeout on recent qwiic migrations ([#14775](https://github.com/qmk/qmk_firmware/pull/14775)) |
||||
* Fix OLED timeout on satisfaction75 after migration from QWIIC ([#14780](https://github.com/qmk/qmk_firmware/pull/14780)) |
||||
* Fix Compile issues for lefty ([#14982](https://github.com/qmk/qmk_firmware/pull/14982)) |
||||
* Fix missing return for oled task on Lefty ([#15010](https://github.com/qmk/qmk_firmware/pull/15010)) |
||||
* Fix missing return for oled task on Arabica37 ([#15011](https://github.com/qmk/qmk_firmware/pull/15011)) |
||||
* Fix missing return for oled task in drashna userspace ([#15012](https://github.com/qmk/qmk_firmware/pull/15012)) |
||||
* Fix size issues on pistachio pro via keymap ([#15017](https://github.com/qmk/qmk_firmware/pull/15017)) |
||||
* Fix keycode collision in craftwalk keymap ([#15055](https://github.com/qmk/qmk_firmware/pull/15055)) |
||||
* Fix compilation issues for yanghu Unicorne ([#15068](https://github.com/qmk/qmk_firmware/pull/15068)) |
||||
* Fixup broken build after #15040 ([#15073](https://github.com/qmk/qmk_firmware/pull/15073)) |
||||
* Fix compilation issues for Lime ([#15116](https://github.com/qmk/qmk_firmware/pull/15116)) |
||||
* Fix additional board sizes for RGB Matrix ([#15170](https://github.com/qmk/qmk_firmware/pull/15170)) |
||||
* Fix bandominedoni via keymap compilation ([#15171](https://github.com/qmk/qmk_firmware/pull/15171)) |
||||
* Fix handful of boards compiling too large due to RGB matrix changes ([#15184](https://github.com/qmk/qmk_firmware/pull/15184)) |
||||
* Fix oled_task_user for ffkeebs/puca ([#15185](https://github.com/qmk/qmk_firmware/pull/15185)) |
||||
* More headroom. ([#15301](https://github.com/qmk/qmk_firmware/pull/15301)) |
||||
* More headroom. ([#15302](https://github.com/qmk/qmk_firmware/pull/15302)) |
||||
|
||||
Others: |
||||
* Clean up some code block languages ([#14434](https://github.com/qmk/qmk_firmware/pull/14434)) |
||||
* Clarify "nested" and "rolling" key sequences ([#14655](https://github.com/qmk/qmk_firmware/pull/14655)) |
||||
* CI: Create GitHub Actions unit test workflow ([#15223](https://github.com/qmk/qmk_firmware/pull/15223)) |
||||
* Squeezing space out of AVR ([#15243](https://github.com/qmk/qmk_firmware/pull/15243)) |
||||
|
||||
Bugs: |
||||
* Fix parallel builds w/ LTO on systems where make is not GNU make. ([#13955](https://github.com/qmk/qmk_firmware/pull/13955)) |
||||
* fix automatic directory for qmk lint ([#14215](https://github.com/qmk/qmk_firmware/pull/14215)) |
||||
* RN42 Bluetooth typo fix ([#14421](https://github.com/qmk/qmk_firmware/pull/14421)) |
||||
* fix typo in backlight code from #14439 ([#14442](https://github.com/qmk/qmk_firmware/pull/14442)) |
||||
* fix compilation issues with USB programmable buttons ([#14454](https://github.com/qmk/qmk_firmware/pull/14454)) |
||||
* Fix descriptor for USB Programmable Buttons ([#14455](https://github.com/qmk/qmk_firmware/pull/14455)) |
||||
* Make ChibiOS PAL interactions less STM32 specific - Round 2 ([#14456](https://github.com/qmk/qmk_firmware/pull/14456)) |
||||
* fix logical minimum in Programmable Button rdesc ([#14464](https://github.com/qmk/qmk_firmware/pull/14464)) |
||||
* Fix i2c_readReg16 ([#14730](https://github.com/qmk/qmk_firmware/pull/14730)) |
||||
* Put back eeconfig_update_ functions ([#14751](https://github.com/qmk/qmk_firmware/pull/14751)) |
||||
* Fix misplaced endif in led_matrix_drivers.c ([#14785](https://github.com/qmk/qmk_firmware/pull/14785)) |
||||
* Fix builds for ChibiOS + Cortex-M0[+] ([#14879](https://github.com/qmk/qmk_firmware/pull/14879)) |
||||
* Fix ccache default ([#14906](https://github.com/qmk/qmk_firmware/pull/14906)) |
||||
* Fix issues with Oneshot disabling ([#14934](https://github.com/qmk/qmk_firmware/pull/14934)) |
||||
* Fix develop after recent changes ([#14975](https://github.com/qmk/qmk_firmware/pull/14975)) |
||||
* Fix up issues shown by clang-format of vusb ([#15004](https://github.com/qmk/qmk_firmware/pull/15004)) |
||||
* Fix unterminated ifdef in ISSI 3733 driver ([#15014](https://github.com/qmk/qmk_firmware/pull/15014)) |
||||
* Fix build failures caused by #12947. ([#15019](https://github.com/qmk/qmk_firmware/pull/15019)) |
||||
* Fixup LED matrix. ([#15020](https://github.com/qmk/qmk_firmware/pull/15020)) |
||||
* Revert to old init order for host driver ([#15029](https://github.com/qmk/qmk_firmware/pull/15029)) |
||||
* Fixup #15029 ([#15031](https://github.com/qmk/qmk_firmware/pull/15031)) |
||||
* RISC-V toolchain and picolibc fixes ([#15109](https://github.com/qmk/qmk_firmware/pull/15109)) |
||||
* gcc10 LTO - Only specify adhlns assembler options at link time ([#15115](https://github.com/qmk/qmk_firmware/pull/15115)) |
||||
* Add needed include to pointing_device.c ([#15167](https://github.com/qmk/qmk_firmware/pull/15167)) |
||||
* Fix missing variable for Backlight Breathing ([#15199](https://github.com/qmk/qmk_firmware/pull/15199)) |
||||
* Revert backlight pins on function call ([#15205](https://github.com/qmk/qmk_firmware/pull/15205)) |
||||
* Fix timer include in override_wiring.c ([#15221](https://github.com/qmk/qmk_firmware/pull/15221)) |
||||
* fix broken macro in transport.h ([#15239](https://github.com/qmk/qmk_firmware/pull/15239)) |
||||
* Short term bodge for PRODUCT warning ([#15240](https://github.com/qmk/qmk_firmware/pull/15240)) |
||||
* Remove use of __flash due to LTO issues ([#15268](https://github.com/qmk/qmk_firmware/pull/15268)) |
||||
* Documentation typo fix ([#15298](https://github.com/qmk/qmk_firmware/pull/15298)) |
||||
* [Core] Hotfix for HOLD_ON_OTHER_KEY_PRESS after #11059 ([#15307](https://github.com/qmk/qmk_firmware/pull/15307)) |
||||
* Fix call to pointing_device_handle_buttons ([#15313](https://github.com/qmk/qmk_firmware/pull/15313)) |
||||
* [Develop] Fix ploopy readme typos ([#15316](https://github.com/qmk/qmk_firmware/pull/15316)) |
@ -1,263 +1,242 @@ |
||||
# ISP Flashing Guide |
||||
|
||||
ISP flashing (also known as ICSP flashing) is the process of programming a microcontroller directly. This allows you to replace the bootloader, or change the "fuses" on the controller, which control a number of hardware- and software-related functions, such as the speed of the controller, how it boots, and other options. |
||||
In order to flash a microcontroller over USB, it needs something called a bootloader. This bootloader lives in a specific section of the flash memory, and allows you to load the actual application firmware (in this case, QMK) into the rest of the flash. |
||||
|
||||
The main use of ISP flashing for QMK is flashing or replacing the bootloader on your AVR-based controller (Pro Micros, or V-USB chips). |
||||
However, it can sometimes happen that the bootloader becomes corrupted and needs reflashing, or you may want to change the bootloader to another one. It's not possible to do this with the existing bootloader, because, of course, it is already running, and cannot overwrite itself. Instead, you will need to ISP flash the microcontroller. |
||||
|
||||
?> This is only for programming AVR based boards, such as the Pro Micro or other ATmega controllers. It is not for Arm controllers, such as the Proton C. |
||||
There are several different kinds of bootloaders available for AVR microcontrollers. Most STM32 ARM-based microcontrollers already have a USB-capable bootloader in ROM, so generally do not need to be ISP flashed. |
||||
|
||||
## Dealing with Corrupted Bootloaders |
||||
## Hardware |
||||
|
||||
If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following for a DFU based controller: |
||||
One of the following devices is required to perform the ISP flashing. The product links are to the official versions, however you can certainly source them elsewhere. |
||||
|
||||
libusb: warning [darwin_transfer_status] transfer error: timed out |
||||
dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60) |
||||
atmel.c:1627: atmel_flash: flash data dfu_download failed. |
||||
atmel.c:1629: Expected message length of 1072, got -60. |
||||
atmel.c:1434: Error flashing the block: err -2. |
||||
ERROR |
||||
Memory write error, use debug for more info. |
||||
commands.c:360: Error writing memory data. (err -4) |
||||
You'll also need some jumper wires to connect the ISP flasher and the target board. Some boards have an ISP header with the necessary pins broken out. If not, then you will need to temporarily solder the wires to the PCB -- usually to switch pins or directly to the MCU. |
||||
The wiring is fairly straightforward; for the most part, you'll be connecting like to like. Refer to the target MCU's datasheet for the exact `RESET`, `SCLK`, `MOSI` and `MISO` pins. |
||||
|
||||
dfu.c:844: -EPIPE: a) Babble detect or b) Endpoint stalled 0xffffffe0 (-32) |
||||
Device is write protected. |
||||
dfu.c:252: dfu_clear_status( 0x7fff4fc2ea80 ) |
||||
atmel.c:1434: Error flashing the block: err -2. |
||||
ERROR |
||||
Memory write error, use debug for more info. |
||||
commands.c:360: Error writing memory data. (err -4) |
||||
### Pro Micro as ISP |
||||
|
||||
Or, if you see this sort of message for a Pro Micro based controller: |
||||
[SparkFun Pro Micro](https://www.sparkfun.com/products/12640) |
||||
|
||||
avrdude: butterfly_recv(): programmer is not responding |
||||
avrdude: butterfly_recv(): programmer is not responding |
||||
avrdude: verification error, first mismatch at byte 0x002a |
||||
0x2b != 0x75 |
||||
avrdude: verification error; content mismatch |
||||
avrdude: verification error; content mismatch |
||||
To use a 5V/16MHz Pro Micro as an ISP flashing tool, you will first need to load a [special firmware](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) onto it that emulates a hardware ISP flasher. |
||||
|
||||
**AVRDUDE Programmer**: `avrisp` |
||||
**AVRDUDE Port**: Serial |
||||
|
||||
You're likely going to need to ISP flash your board/device to get it working again. |
||||
#### Wiring |
||||
|
||||
## Hardware Needed |
||||
|Pro Micro |Keyboard| |
||||
|-----------|--------| |
||||
|`VCC` |`VCC` | |
||||
|`GND` |`GND` | |
||||
|`10` (`B6`)|`RESET` | |
||||
|`15` (`B1`)|`SCLK` | |
||||
|`16` (`B2`)|`MOSI` | |
||||
|`14` (`B3`)|`MISO` | |
||||
|
||||
You'll need one of the following to actually perform the ISP flashing (followed by the protocol they use): |
||||
!> Note that the `10` pin on the Pro Micro should be wired to the `RESET` pin on the keyboard's controller. ***DO NOT*** connect the `RESET` pin on the Pro Micro to the `RESET` on the keyboard. |
||||
|
||||
* [SparkFun PocketAVR](https://www.sparkfun.com/products/9825) - (USB Tiny) |
||||
* [USBtinyISP AVR Programmer Kit](https://www.adafruit.com/product/46) - (USB Tiny) |
||||
* [USBasp](https://www.fischl.de/usbasp/) - (usbasp) |
||||
* [Teensy 2.0](https://www.pjrc.com/store/teensy.html) - (avrisp) |
||||
* [Pro Micro](https://www.sparkfun.com/products/12640) - (avrisp) |
||||
* [Bus Pirate](https://www.adafruit.com/product/237) - (buspirate) |
||||
### Teensy 2.0 as ISP |
||||
|
||||
There are other devices that can be used to ISP flash, but these are the main ones. Also, all product links are to the official versions. You can source them elsewhere. |
||||
[PJRC Teensy 2.0](https://www.pjrc.com/store/teensy.html) |
||||
|
||||
You'll also need something to wire your "ISP Programmer" to the device that you're programming. Some PCBs may have ISP headers that you can use directly, but this often isn't the case, so you'll likely need to solder to the controller itself or to different switches or other components. |
||||
To use a Teensy 2.0 as an ISP flashing tool, you will first need to load a [special firmware](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) onto it that emulates a hardware ISP flasher. |
||||
|
||||
### The ISP Firmware |
||||
**AVRDUDE Programmer**: `avrisp` |
||||
**AVRDUDE Port**: Serial |
||||
|
||||
The Teensy and Pro Micro controllers will need you to flash the ISP firmware to the controllers before you can use them as an ISP programmer. The rest of the hardware should come preprogrammed. So, for these controllers, download the correct hex file, and flash it first. |
||||
#### Wiring |
||||
|
||||
* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`) |
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`10/B6`) |
||||
|Teensy|Keyboard| |
||||
|------|--------| |
||||
|`VCC` |`VCC` | |
||||
|`GND` |`GND` | |
||||
|`B0` |`RESET` | |
||||
|`B1` |`SCLK` | |
||||
|`B2` |`MOSI` | |
||||
|`B3` |`MISO` | |
||||
|
||||
Once you've flashed your controller, you won't need this hex file anymore. |
||||
!> Note that the `B0` pin on the Teensy should be wired to the `RESET` pin on the keyboard's controller. ***DO NOT*** connect the `RESET` pin on the Teensy to the `RESET` on the keyboard. |
||||
|
||||
## Software Needed |
||||
### SparkFun PocketAVR / USBtinyISP / USBasp |
||||
|
||||
The QMK Toolbox can be used for most (all) of this. |
||||
[SparkFun PocketAVR](https://www.sparkfun.com/products/9825) |
||||
[Adafruit USBtinyISP](https://www.adafruit.com/product/46) |
||||
[Thomas Fischl's USBasp](https://www.fischl.de/usbasp/) |
||||
|
||||
However, you can grab the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to flash your Teensy 2.0 board, if you are using that. Or you can use `avrdude` (installed as part of `qmk_install.sh`), or [AVRDUDESS](https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/) (for Windows) to flash the Pro Micro, and the ISP flashing. |
||||
**AVRDUDE Programmer**: `usbtiny` / `usbasp` |
||||
**AVRDUDE Port**: `usb` |
||||
|
||||
#### Wiring |
||||
|
||||
## Wiring |
||||
|ISP |Keyboard| |
||||
|---------|--------| |
||||
|`VCC` |`VCC` | |
||||
|`GND` |`GND` | |
||||
|`RST` |`RESET` | |
||||
|`SCLK` |`SCLK` | |
||||
|`MOSI` |`MOSI` | |
||||
|`MISO` |`MISO` | |
||||
|
||||
This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner. |
||||
|
||||
### SparkFun Pocket AVR |
||||
### Bus Pirate |
||||
|
||||
PocketAVR RST <-> Keyboard RESET |
||||
PocketAVR SCLK <-> Keyboard B1 (SCLK) |
||||
PocketAVR MOSI <-> Keyboard B2 (MOSI) |
||||
PocketAVR MISO <-> Keyboard B3 (MISO) |
||||
PocketAVR VCC <-> Keyboard VCC |
||||
PocketAVR GND <-> Keyboard GND |
||||
[Adafruit Bus Pirate](https://www.adafruit.com/product/237) |
||||
|
||||
### USBasp |
||||
!> The 5-pin "ICSP" header is for ISP flashing the PIC microcontroller of the Bus Pirate. Connect your target board to the 10-pin header opposite the USB connector instead. |
||||
|
||||
USBasp RST <-> Keyboard RESET |
||||
USBasp SCLK <-> Keyboard B1 (SCLK) |
||||
USBasp MOSI <-> Keyboard B2 (MOSI) |
||||
USBasp MISO <-> Keyboard B3 (MISO) |
||||
USBasp VCC <-> Keyboard VCC |
||||
USBasp GND <-> Keyboard GND |
||||
**AVRDUDE Programmer**: `buspirate` |
||||
**AVRDUDE Port**: Serial |
||||
|
||||
### Teensy 2.0 |
||||
#### Wiring |
||||
|
||||
Teensy B0 <-> Keyboard RESET |
||||
Teensy B1 <-> Keyboard B1 (SCLK) |
||||
Teensy B2 <-> Keyboard B2 (MOSI) |
||||
Teensy B3 <-> Keyboard B3 (MISO) |
||||
Teensy VCC <-> Keyboard VCC |
||||
Teensy GND <-> Keyboard GND |
||||
|
||||
!> Note that the B0 pin on the Teensy is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Teensy to the RESET on the keyboard. |
||||
|
||||
### Pro Micro |
||||
|
||||
Pro Micro 10 (B6) <-> Keyboard RESET |
||||
Pro Micro 15 (B1) <-> Keyboard B1 (SCLK) |
||||
Pro Micro 16 (B2) <-> Keyboard B2 (MOSI) |
||||
Pro Micro 14 (B3) <-> Keyboard B3 (MISO) |
||||
Pro Micro VCC <-> Keyboard VCC |
||||
Pro Micro GND <-> Keyboard GND |
||||
|
||||
!> Note that the 10/B6 pin on the Pro Micro is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Pro Micro to the RESET on the keyboard. |
||||
|
||||
|
||||
## Flashing Your Keyboard |
||||
|
||||
After you have your ISP programmer set up, and wired to your keyboard, it's time to flash your keyboard. |
||||
|
||||
### The Bootloader File |
||||
|
||||
The simplest and quickest way to get things back to normal is to flash only a bootloader to the keyboard. Once this is done, you can connect the keyboard normally and flash the keyboard like you normally would. |
||||
|
||||
You can find the stock bootloaders in the [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util). Be sure to flash the correct bootloader for your chip: |
||||
|
||||
* **Atmel DFU** |
||||
* [ATmega16U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega16u4_1.0.1.hex) |
||||
* [ATmega32U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1.0.0.hex) |
||||
* [AT90USB64](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb64_1.0.0.hex) |
||||
* [AT90USB128](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128_1.0.1.hex) |
||||
* **Caterina** |
||||
* [Pro Micro (5V/16MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) |
||||
* [Pro Micro (3.3V/8MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro8.hex) |
||||
* **BootloadHID (PS2AVRGB)** |
||||
* [ATmega32A](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_ps2avrgb_bootloadhid_1.0.1.hex) |
||||
|
||||
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU` and `BOOTLOADER` lines will have the value you need. It may differ between different versions of the board. |
||||
|
||||
### Production Techniques |
||||
|
||||
If you'd like to flash both the bootloader **and** the regular firmware at the same time, there are two options to do so. Manually, or with the `:production` target when compiling. |
||||
|
||||
To do this manually: |
||||
|
||||
1. Open the original firmware .hex file in a text editor |
||||
2. Remove the last line (which should be `:00000001FF` - this is an EOF message) |
||||
3. Copy the entire bootloader's contents onto a new line (with no empty lines between) and paste it at the end of the original file |
||||
4. Save it as a new file by naming it `<keyboard>_<keymap>_production.hex` |
||||
|Bus Pirate|Keyboard| |
||||
|----------|--------| |
||||
|`+5V` |`VCC` | |
||||
|`GND` |`GND` | |
||||
|`RST` |`RESET` | |
||||
|`CLK` |`SCLK` | |
||||
|`MOSI` |`MOSI` | |
||||
|`MISO` |`MISO` | |
||||
|
||||
?> It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard. |
||||
## Software |
||||
|
||||
#### Create QMK DFU Bootloader and Production images |
||||
[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) supports flashing both the ISP firmware and bootloader, but note that it cannot (currently) set the AVR fuse bytes for the actual ISP flashing step, so you may want to work with `avrdude` directly instead. |
||||
|
||||
You can create the firmware, the QMK DFU Bootloader and the production firmware images for the board using the `:production` target when compiling. Once this is done, you'll see three files: |
||||
* `<keyboard>_<keymap>.hex` |
||||
* `<keyboard>_<keymap>_bootloader.hex` |
||||
* `<keyboard>_<keymap>_production.hex` |
||||
Setting up the [QMK environment](newbs.md) is highly recommended, as it automatically installs `avrdude` along with a host of other tools. |
||||
|
||||
The QMK DFU bootloader has only really been tested on `atmega32u4` controllers (such as the AVR based Planck boards, and the Pro Micro), and hasn't been tested on other controllers. However, it will definitely not work on V-USB controllers, such as the `atmega32a` or `atmega328p`. |
||||
## Bootloader Firmware |
||||
|
||||
You can flash either the bootloader or the production firmware file. The production firmware file will take a lot longer to flash, since it's flashing a lot more data. |
||||
One of these files is what you will be ISP flashing onto the board. The default fuses are also listed. |
||||
|
||||
?> Note: You should stay with the same bootloader. If you're using DFU already, switching to QMK DFU is fine. But flashing QMK DFU onto a Pro Micro, for instance, has additional steps needed. |
||||
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU` and `BOOTLOADER` lines will have the values you need. It may differ between different versions of the board. |
||||
|
||||
## Flashing Your Bootloader/Production File |
||||
### Atmel DFU |
||||
|
||||
Make sure your keyboard is unplugged from any device, and plug in your ISP Programmer. |
||||
These are the [factory default bootloaders](https://www.microchip.com/content/dam/mchp/documents/OTH/ProductDocuments/SoftwareLibraries/Firmware/megaUSB_DFU_Bootloaders.zip) shipped by Atmel (now Microchip). Note that the AT90USB64 and AT90USB128 bootloaders are [slightly modified](https://github.com/qmk/qmk_firmware/pull/14064), due to a bug causing them to not enumerate properly in Windows 8 and later. |
||||
|
||||
If you want to change bootloader types, You'll need to use the command line. |
||||
|MCU |Low |High |Extended|USB ID | |
||||
|--------------------------------------------------------------------------------------------------|------|-------------------------------|--------|-----------| |
||||
|[ATmega16U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega16u4_1.0.1.hex)|`0x5E`|`0x99` / `0xD9` (JTAG disabled)|`0xF3` |`03EB:2FF3`| |
||||
|[ATmega32U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1.0.0.hex)|`0x5E`|`0x99` / `0xD9` (JTAG disabled)|`0xF3` |`03EB:2FF4`| |
||||
|[AT90USB64](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb64_1.0.0.hex) |`0x5E`|`0x9B` / `0xDB` (JTAG disabled)|`0xF3` |`03EB:2FF9`| |
||||
|[AT90USB128](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128_1.0.1.hex)|`0x5E`|`0x99` / `0xD9` (JTAG disabled)|`0xF3` |`03EB:2FFB`| |
||||
|
||||
### QMK Toolbox |
||||
### Caterina |
||||
|
||||
1. `AVRISP device connected` or `USB Tiny device connected` will show up in yellow |
||||
2. Select the correct bootloader/production .hex file with the `Open` dialog (spaces can't be in the path) |
||||
3. Be sure the correct `Microcontroller` option for the keyboard you're flashing (not the ISP programmer) is selected |
||||
4. Hit `Flash` |
||||
5. Wait, as nothing will output for a while, especially with production files |
||||
This is the default Arduino-style bootloader derived from the [LUFA CDC bootloader](https://github.com/abcminiuser/lufa/tree/master/Bootloaders/CDC), and is only for the ATmega32U4. |
||||
|
||||
If the verification and fuse checks are ok, you're done! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works. |
||||
There are several variants depending on the vendor, but they all mostly work the same way. The SparkFun variants, for example, require the `RESET` pin to be [grounded twice quickly](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide#ts-reset) in order to stay in bootloader mode for more than 750 ms. |
||||
|
||||
### Command Line |
||||
|MCU |Low |High |Extended|USB ID | |
||||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------|--------|-----------| |
||||
|[SparkFun Pro Micro (3V3/8MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro8.hex) |`0xFF`|`0xD8`|`0xFE` |`1B4F:9203`| |
||||
|[SparkFun Pro Micro (5V/16MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) |`0xFF`|`0xD8`|`0xFB` |`1B4F:9205`| |
||||
|[SparkFun LilyPadUSB (and some Pro Micro clones)](https://github.com/sparkfun/Arduino_Boards/blob/main/sparkfun/avr/bootloaders/caterina/Caterina-lilypadusb.hex)|`0xFF`|`0xD8`|`0xFE` |`1B4F:9207`| |
||||
|[Pololu A-Star 32U4](https://github.com/pololu/a-star/blob/master/bootloaders/caterina/Caterina-A-Star.hex)* |`0xFF`|`0xD0`|`0xF8` |`1FFB:0101`| |
||||
|[Adafruit Feather 32U4](https://github.com/adafruit/Caterina-Bootloader/blob/master/Built%20Firmwares/Caterina-Feather32u4.hex) |`0xFF`|`0xD8`|`0xFB` |`239A:000C`| |
||||
|[Adafruit ItsyBitsy 32U4 (3V3/8MHz)](https://github.com/adafruit/Caterina-Bootloader/blob/master/Caterina_itsybitsy3V.hex)* |`0xFF`|`0xD8`|`0xFB` |`239A:000D`| |
||||
|[Adafruit ItsyBitsy 32U4 (5V/16MHz)](https://github.com/adafruit/Caterina-Bootloader/blob/master/Caterina_itsybitsy5V.hex) |`0xFF`|`0xD8`|`0xFB` |`239A:000E`| |
||||
|[Arduino Leonardo](https://github.com/arduino/ArduinoCore-avr/blob/master/bootloaders/caterina/Caterina-Leonardo.hex)* |`0xFF`|`0xD8`|`0xFB` |`2341:0036`| |
||||
|[Arduino Micro](https://github.com/arduino/ArduinoCore-avr/blob/master/bootloaders/caterina/Caterina-Micro.hex)* |`0xFF`|`0xD8`|`0xFB` |`2341:0037`| |
||||
|
||||
Open a terminal (`cmd` on Windows, for instance) and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with: |
||||
?> Files marked with a * have combined Arduino sketches, which runs by default and also appears as a serial port. However, this is *not* the bootloader device. |
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 |
||||
### BootloadHID (PS2AVRGB) |
||||
|
||||
and you should get something like the following output: |
||||
This bootloader is primarily for keyboards originally designed for the PS2AVRGB firmware and Bootmapper Client. It is not recommended for use in new designs. |
||||
|
||||
avrdude: AVR device initialized and ready to accept instructions |
||||
|MCU |Low |High |USB ID | |
||||
|-----------------------------------------------------------------------------------------------------------|------|------|-----------| |
||||
|[ATmega32A](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_ps2avrgb_bootloadhid_1.0.1.hex)|`0x0F`|`0xD0`|`16C0:05DF`| |
||||
|
||||
Reading | ################################################## | 100% 0.02s |
||||
### USBaspLoader |
||||
|
||||
avrdude: Device signature = 0x1e9587 |
||||
USBaspLoader is a bootloader based on V-USB that emulates a hardware USBasp device. It runs on ATmega32A and ATmega328P MCUs. |
||||
|
||||
avrdude: safemode: Fuses OK |
||||
Precompiled `.hex` files are generally not available, but you can compile it yourself by setting up the QMK environment and following Coseyfannitutti's guide for the appropriate MCU: |
||||
|
||||
avrdude done. Thank you. |
||||
|MCU |Low |High |Extended|USB ID | |
||||
|-------------------------------------------------------------------------------------|------|------|--------|-----------| |
||||
|[ATmega32A](https://github.com/coseyfannitutti/discipline/tree/master/doc/bootloader)|`0x1F`|`0xC0`|*n/a* |`16C0:05DC`| |
||||
|[ATmega328P](https://github.com/coseyfannitutti/discipad/tree/master/doc/bootloader) |`0xD7`|`0xD0`|`0x04` |`16C0:05DC`| |
||||
|
||||
Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify. This is the full command: |
||||
Note that some boards may have their own specialized build of this bootloader in a separate repository. This will usually be linked to in the board's readme. |
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i |
||||
## Flashing the Bootloader |
||||
|
||||
If your board uses an `atmega32a` (e.g. on a jj40), the command is this (the extra code at the end sets the fuses correctly): |
||||
Open a new Terminal window - if you are on Windows, use MSYS2 or QMK MSYS, not the Command Prompt. Navigate to the directory your bootloader `.hex` is in. Now it's time to run the `avrdude` command. |
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m |
||||
The syntax of `avrdude` is: |
||||
|
||||
You should see a couple of progress bars, then you should see: |
||||
``` |
||||
avrdude -c <programmer> -P <port> -p <mcu> -U flash:w:<filename>:i |
||||
``` |
||||
|
||||
avrdude: verifying ... |
||||
avrdude: 32768 bytes of flash verified |
||||
* `<programmer>` corresponds to the programmer type listed for each ISP flasher in the [Hardware](#hardware) section, for example `avrisp`. |
||||
* `<port>` is the serial port that appears when you plug the ISP flasher in, if any. For some programmers this is simply `usb` (or you can omit the `-P` argument completely) since they do not operate as a serial device. |
||||
* Windows: `COMx` - check Device Manager, under the "Ports (COM & LPT)" section |
||||
* Linux: `/dev/ttyACMx` |
||||
* macOS: `/dev/tty.usbmodemXXXXXX` |
||||
* `<mcu>` should be the lowercase name of the target AVR microcontroller, for example `atmega32u4`. |
||||
* `<filename>` is the absolute or relative path to the bootloader to be flashed, for example `Caterina-Micro.hex`. |
||||
|
||||
avrdude: safemode: Fuses OK |
||||
You can also run `man avrdude` for more information. |
||||
|
||||
avrdude done. Thank you. |
||||
If all goes well, you should get output similar to the following: |
||||
|
||||
Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works. |
||||
``` |
||||
avrdude: AVR device initialized and ready to accept instructions |
||||
|
||||
If you're using a SparkFun PocketAVR Programmer, or another USB Tiny based ISP programmer, you will want to use something like this: |
||||
Reading | ################################################## | 100% 0.00s |
||||
|
||||
avrdude -c usbtiny -P usb -p atmega32u4 |
||||
avrdude: Device signature = 0x1e9587 (probably m32u4) |
||||
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed |
||||
To disable this feature, specify the -D option. |
||||
avrdude: erasing chip |
||||
avrdude: reading input file "Caterina-Micro.hex" |
||||
avrdude: writing flash (32730 bytes): |
||||
|
||||
#### Advanced: Changing Fuses |
||||
Writing | ################################################## | 100% 11.58s |
||||
|
||||
If you're switching bootloaders, such as flashing QMK DFU on a Pro Micro, you will need to change the fuses, in additional to flashing the bootloader hex file. This is because `caterina` (the Pro Micro bootloader) and `dfu` handle the startup routines differently, and that behavior is controlled by the fuses. |
||||
avrdude: 32730 bytes of flash written |
||||
avrdude: verifying flash memory against Caterina-Micro.hex: |
||||
avrdude: load data flash data from input file Caterina-Micro.hex: |
||||
avrdude: input file Caterina-Micro.hex contains 32730 bytes |
||||
avrdude: reading on-chip flash data: |
||||
|
||||
!> This is one area that it is very important to be careful, as changing fuses is one of the ways that you can permanently brick your controller. |
||||
Reading | ################################################## | 100% 10.33s |
||||
|
||||
For this, we are assuming the 5V 16MHz versions of the `atmega32u4` (such as the 5V Pro Micro). |
||||
avrdude: verifying ... |
||||
avrdude: 32730 bytes of flash verified |
||||
|
||||
For DFU on the `atmega32u4`, these are the fuse settings that you want: |
||||
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF) |
||||
|
||||
| Fuse | Setting | |
||||
|----------|------------------| |
||||
| Low | `0x5E` | |
||||
| High | `0xD9` or `0x99` | |
||||
| Extended | `0xC3` | |
||||
avrdude done. Thank you. |
||||
``` |
||||
|
||||
The High fuse can be 0xD9 or 0x99. The difference is that 0xD9 disables JTAG, which QMK Firmware disables via software as well, while 0x99 doesn't disable JTAG. |
||||
### Setting the Fuses |
||||
|
||||
To set this add `-U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` to your command. So the final command should look something like: |
||||
This is a slightly more advanced topic, but may be necessary if you are switching from one bootloader to another (for example, Caterina to Atmel/QMK DFU on a Pro Micro). Fuses control some of the low-level functionality of the AVR microcontroller, such as clock speed, whether JTAG is enabled, and the size of the section of flash memory reserved for the bootloader, among other things. You can find a fuse calculator for many AVR parts [here](https://www.engbedded.com/conffuse/). |
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m |
||||
!> **WARNING:** Setting incorrect fuse values, in particular the clock-related bits, may render the MCU practically unrecoverable without high voltage programming (not covered here)! Make sure to double check the commands you enter before you execute them. |
||||
|
||||
For Caterina on the `atmega32u4`, these are the fuse settings that you want: |
||||
To set the fuses, add the following to the `avrdude` command: |
||||
|
||||
| Fuse | Setting| |
||||
|----------|--------| |
||||
| Low | `0xFF` | |
||||
| High | `0xD8` | |
||||
| Extended | `0xCB` | |
||||
``` |
||||
-U lfuse:w:0xXX:m -U hfuse:w:0xXX:m -U efuse:w:0xXX:m |
||||
``` |
||||
|
||||
To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m` to your command. So the final command should look something like: |
||||
where the `lfuse`, `hfuse` and `efuse` arguments represent the low, high and extended fuse bytes as listed in the [Hardware](#hardware) section. |
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m |
||||
?> You may get a warning from `avrdude` that the extended fuse byte does not match what you provided when reading it back. If the second hex digit matches, this can usually be safely ignored, because the top four bits of this fuse do not actually exist on many AVR parts, and may read back as anything. |
||||
|
||||
## Creating a "Production" Firmware |
||||
|
||||
If you are using a different controller or want different configuration, you can use [this AVR Fuse Calculator](https://www.engbedded.com/fusecalc/) to find a better value for you. |
||||
For mass production purposes, it is possible to join the bootloader and QMK firmware together into a single file, due to the way the [Intel Hex format](https://en.wikipedia.org/wiki/Intel_HEX) works: |
||||
|
||||
## Help |
||||
1. Open the QMK firmware and bootloader `.hex` files in a text editor. |
||||
2. Remove the last line of the QMK firmware (which should be `:00000001FF` - this is just an "end of file" marker). |
||||
3. Paste the contents of the bootloader `.hex` file onto a new line at the end of the QMK firmware file, with no empty lines between. |
||||
4. Save it as a new file, for example `<keyboard>_<keymap>_production.hex`. |
||||
|
||||
If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)! |
||||
You can then ISP flash this combined firmware instead, which allows you to skip the extra step of flashing the QMK firmware over USB. |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue