Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dlip
Browse files Browse the repository at this point in the history
* upstream/master: (40 commits)
  [Keyboard] Add marshkeys flowerpad (qmk#23240)
  Add TechnicPad macropad (qmk#23238)
  Add handwired/Jotlily60 (qmk#23212)
  Add the EQUATOR keyboard (qmk#23237)
  Support for slice65 from PizzaKeyboards (qmk#23148)
  Add Swiss support (qmk#23272)
  Assume only 32u4 boards can run 'promicro' converters (qmk#23312)
  Add Macropad 6Pad (qmk#23099)
  Fix invalid use of stemcell converter (qmk#23317)
  Updates to PR Checklist (qmk#23318)
  [Keyboard] Add posey_split v4/v5 (qmk#23258)
  Added WT65-H3 (HIBI HIBIKI) (qmk#22886)
  Added WT65-G3 (HIBI HIBIKI) (qmk#22888)
  Modify wording in 'getting_started_introduction.md' (qmk#23232)
  Bump tj-actions/changed-files from 42 to 43 (qmk#23282)
  AMJKeyboard AMJ96 Layout Additions (qmk#23267)
  Fixup cipulot eeprom. (qmk#23280)
  Update feature_tri_layer.md - typo (qmk#23275)
  [Keyboard] add glyphkbd_v2 (qmk#23131)
  Add support new kb_elmo PCBs (qmk#23138)
  ...
  • Loading branch information
dlip committed Mar 21, 2024
2 parents b81d8b2 + 8a429fc commit 6077434
Show file tree
Hide file tree
Showing 210 changed files with 9,599 additions and 792 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v43
with:
use_rest_api: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v43
with:
use_rest_api: true

Expand Down
10 changes: 8 additions & 2 deletions builddefs/converters.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
endif

# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
ifneq (,$(filter $(MCU),atmega32u4))
# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
endif

# Remove whitespace from any rule.mk provided vars
# - env cannot be overwritten but cannot have whitespace anyway
Expand All @@ -16,6 +18,10 @@ ifneq ($(CONVERT_TO),)
# stash so we can overwrite env provided vars if needed
ACTIVE_CONVERTER=$(CONVERT_TO)

ifeq ($(PIN_COMPATIBLE),)
$(call CATASTROPHIC_ERROR,Converting to '$(CONVERT_TO)' not possible!)
endif

# glob to search each platfrorm and/or check for valid converter
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
ifeq ($(CONVERTER),)
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_tri_layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ Eg, if you wanted to set the "Adjust" layer to be layer 5, you'd add this to you
| `get_tri_layer_upper_layer()` | Gets the current "upper" layer. |
| `get_tri_layer_adjust_layer()` | Gets the current "adjust" layer. |
!> Note: these settings are not persisent, and will be reset to the default on power loss or power cycling of the controller.
!> Note: these settings are not persistent, and will be reset to the default on power loss or power cycling of the controller.
2 changes: 1 addition & 1 deletion docs/getting_started_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This page attempts to explain the basic information you need to know to work wit

## Basic QMK Structure

QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `keyboards` folder.

### Userspace Structure

Expand Down
74 changes: 74 additions & 0 deletions docs/other_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,77 @@ Using the [standard `compile_commands.json` database](https://clang.llvm.org/doc
1. Start typing `clangd: Restart Language Server` and select it when it appears.

Now you're ready to code QMK Firmware in VS Code!

# Debugging ARM MCUs with Visual Studio Code

**...and a Black Magic Probe.**

Visual Studio Code has the ability to debug applications, but requires some configuration in order to get it to be able to do so for ARM targets.

This documentation describes a known-working configuration for setting up the use of a Black Magic Probe to debug using VS Code.

It is assumed that you've correctly set up the electrical connectivity of the Black Magic Probe with your MCU. Wiring up `NRST`, `SWDIO`, `SWCLK`, and `GND` should be enough.

Install the following plugin into VS Code:

* [Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) -
This adds debugger support for ARM Cortex targets to VS Code.

A debugging target for the MCU for your board needs to be defined, and can be done so by adding the following to a `.vscode/launch.json` file:

```json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Black Magic Probe (OneKey Proton-C)",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/.build/handwired_onekey_proton_c_default.elf",
"servertype": "bmp",
"BMPGDBSerialPort": "COM4",
"svdFile": "Q:\\svd\\STM32F303.svd",
"device": "STM32F303",
"v1": false,
"windows": {
"armToolchainPath": "C:\\QMK_MSYS\\mingw64\\bin"
}
}
]
}
```

You'll need to perform some modifications to the file above in order to target your specific device:

* `"name"`: Can be anything, but if you're debugging multiple targets you'll want something descriptive here.
* `"cwd"`: The path to the QMK Firmware repository root directory -- _if using the `.vscode` directory existing in the `qmk_firmware` git repository, the default above should be correct_
* `"executable"`: The path to the `elf` file generated as part of the build for your keyboard -- _exists in `<qmk_firmware>/.build`_
* `"BMPGDBSerialPort"`: The `COM` port under Windows, or the `/dev/...` path for Linux/macOS. Two serial port devices will be created -- the Black Magic Probe debug port is *usually* the first. If it doesn't work, try the second.
* `"svdFile"`: _[Optional]_ The path to the SVD file that defines the register layout for the MCU -- the appropriate file can be downloaded from the [cmsis-svd repository](https://github.com/posborne/cmsis-svd/tree/master/data/STMicro)
* `"device"`: The name of the MCU, which matches the `<name>` tag at the top of the downloaded `svd` file.
* `"armToolchainPath"`: _[Optional]_ The path to the ARM toolchain installation location on Windows -- under normal circumstances Linux/macOS will auto-detect this correctly and will not need to be specified.

!> Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: ![VSCode Settings](https://i.imgur.com/EGrPM1L.png)

Optionally, the following modifications should also be made to the keyboard's `rules.mk` file to disable optimisations -- not strictly required but will ensure breakpoints and variable viewing works correctly:
```makefile
# Disable optimisations for debugging purposes
LTO_ENABLE = no
OPT = g
DEBUG = 3
```

At this point, you should build and flash your firmware through normal methods (`qmk compile ...` and `qmk flash ...`).

Once completed, you can:
* Switch to the debug view in VS Code (in the sidebar, the Play button with a bug next to it)
* Select the newly-created debug target in the dropdown at the top of the sidebar
* Click the green play button next to the dropdown

VS Code's debugger will then start executing the compiled firmware on the MCU.

At this stage, you should have full debugging set up, with breakpoints and variable listings working!
16 changes: 9 additions & 7 deletions docs/pr_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ If there are any inconsistencies with these recommendations, you're best off [cr
- PR should be submitted using a non-`master` branch on the source repository
- this does not mean you target a different branch for your PR, rather that you're not working out of your own master branch
- if submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](newbs_git_using_your_master_branch.md) page after merging -- (end of this document will contain the contents of the message)
- Note, frequently merging upstream with your branch is not needed and is discouraged. Valid reason for updating your branch may be resolving merge conflicts and pulling in new changes relevant to your PR.
- PRs should contain the smallest amount of modifications required for a single change to the codebase
- multiple keyboards at the same time is not acceptable
- **the smaller the PR, the higher likelihood of a quicker review, higher likelihood of quicker merge, and less chance of conflicts**
Expand Down Expand Up @@ -43,10 +44,10 @@ If there are any inconsistencies with these recommendations, you're best off [cr

- PRs for vendor specific keymaps will be permitted. The naming convention for these should be `default_${vendor}`, `via_${vendor}` i.e. `via_clueboard`.
- vendor specific keymaps do not necessarily need to be "vanilla" and can be more richly featured than `default` or `via` stock keymaps.
- #include QMK_KEYBOARD_H preferred to including specific board files
- `#include QMK_KEYBOARD_H` preferred to including specific board files
- prefer layer enums to #defines
- custom keycode enums must have first entry = SAFE_RANGE
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap
- custom keycode enums must have first entry = `QK_USER`
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap. Spaces are preferred to tabs

## Keyboard PRs

Expand Down Expand Up @@ -81,6 +82,8 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- Encoder Configuration
- Bootmagic Configuration
- LED Indicator Configuration
- RGB Light Configuration
- RGB Matrix Configuration
- Run `qmk format-json` on this file before submitting your PR. Be sure to append the `-i` flag to directly modify the file, or paste the outputted code into the file.
- `readme.md`
- must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md)
Expand All @@ -90,8 +93,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- a picture about the keyboard and preferably about the PCB, too
- images are not to be placed in the `qmk_firmware` repository
- images should be uploaded to an external image hosting service, such as [imgur](https://imgur.com/).
- if imgur is used, images should be resized appropriately: append "h" to the image url i.e. [https://i.imgur.com/vqgE7Ok.jpg](https://i.imgur.com/vqgE7Ok.jpg) becomes [https://i.imgur.com/vqgE7Ok**h**.jpg](https://i.imgur.com/vqgE7Okh.jpg)
- image links should link directly to the image, not a "preview" -- i.e. [https://imgur.com/vqgE7Ok](https://imgur.com/vqgE7Ok) should be [https://i.imgur.com/vqgE7Okh.jpg](https://i.imgur.com/vqgE7Okh.jpg) when using imgur
- image links should link directly to the image, not a "preview" -- i.e. [https://imgur.com/vqgE7Ok](https://imgur.com/vqgE7Ok) should be [https://i.imgur.com/vqgE7Ok.jpg](https://i.imgur.com/vqgE7Ok.jpg) when using imgur
- `rules.mk`
- removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE`
- modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth`
Expand Down Expand Up @@ -204,7 +206,7 @@ Additionally, PR reviews are something that is done in our free time. We are not
## Example GPLv2 Header

```
/* Copyright 2021 Your Name (@yourgithub)
/* Copyright 2024 Your Name (@yourgithub)
*
* 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
Expand All @@ -224,6 +226,6 @@ Additionally, PR reviews are something that is done in our free time. We are not
Or, optionally, using [SPDX identifier](https://spdx.org/licenses/) instead:

```
// Copyright 2021 Your Name (@yourgithub)
// Copyright 2024 Your Name (@yourgithub)
// SPDX-License-Identifier: GPL-2.0-or-later
```
Loading

0 comments on commit 6077434

Please sign in to comment.