Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard QK65 R2 #21896

Closed
wants to merge 7 commits into from
Closed

Add keyboard QK65 R2 #21896

wants to merge 7 commits into from

Conversation

Siilwyn
Copy link

@Siilwyn Siilwyn commented Sep 3, 2023

Description

Add Qwertykey's keyboard the QK65 round 2.
I've based this on Owllab's fork, for copied files I've kept their original copyright notice.
The default layout is a copy of the default 65_ansi_blocker keymap with a couple of less second layer keys.

Big thanks to the support in Discord!

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

keyboards/qwertykeys/qk65/r2/mcuconf.h Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/config.h Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/chconf.h Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/halconf.h Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/info.json Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/info.json Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/info.json Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/info.json Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/rules.mk Outdated Show resolved Hide resolved
keyboards/qwertykeys/qk65/r2/info.json Show resolved Hide resolved
@Siilwyn Siilwyn force-pushed the add-qk65-r2 branch 2 times, most recently from 7fe8b86 to c96e046 Compare September 5, 2023 07:26
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>
@Siilwyn
Copy link
Author

Siilwyn commented Sep 5, 2023

Looks like the CI fails on other keyboard configurations, don't think they're related to the changes in this PR.

@dunk2k
Copy link
Contributor

dunk2k commented Sep 5, 2023

Looks like the CI fails on other keyboard configurations, don't think they're related to the changes in this PR.

That's correct, the failing keymaps are from QMK userspaces, which:

  1. Thankfully isn't contributer's responsibility to fix
  2. Are currently undergoing a revamp, hence keymaps and userspace PRs are no being longer accepted (at time of writing).

@@ -0,0 +1,5 @@
MCU_LDSCRIPT = STM32F103x8_0x08006000_bootloader
BOOTLOADER_TYPE = stm32duino
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOOTLOADER_TYPE = stm32duino can move to info.json

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I move this the compile fails sadly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bootloader in info.json sets BOOTLOADER, not BOOTLOADER_TYPE, and then for BOOTLOADER = stm32duino it is impossible to override DFU_ARGS and DFU_SUFFIX_ARGS with the proper values that match the custom bootloader used on this PCB.

One possible option here is to specify "bootloader": "custom" (bootloader_jump() as provided by stm32duino.c apparently does not work on this PCB anyway).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't fully follow, would you like me to add "bootloader": "custom" to the info.json?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't fully follow, would you like me to add "bootloader": "custom" to the info.json?

Ideally, yes, and provide a bootloader_jump and mcu_reset function that works correctly with the bootloader that is being used here.

Without the correct functions+handling, that is why bootmagic and QMK_BOOT are not working.


Enter the bootloader in two ways:

* **Bootmagic reset**: Hold down the B key and plug in the keyboard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually not the bootmagic reset (the old “full bootmagic” code did that, but that code had been removed from QMK some time ago). If the “hold down the B key” method actually works on the board flashed with this QMK firmware, that method is actually implemented by the bootloader.

Also apparently the bootmagic reset does not work on this PCB (and neither does QK_BOOT), because the bootloader is not actually stm32duino, and the method to communicate with the bootloader is not actually known? Unfortunately, the code from https://github.com/owlab-git/qmk_firmware/tree/qk65/keyboards/qwertykeys/qk65/r2 does not offer anything better (it also pretends that the bootloader is stm32duino).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the “hold down the B key” method actually works on the board flashed with this QMK firmware, that method is actually implemented by the bootloader.

Yes this does work, should I call this by a different name? Maybe "Bootloader reset"?

Sadly QK_BOOT indeed does not work, shall I mention this in the readme?

@@ -0,0 +1,5 @@
MCU_LDSCRIPT = STM32F103x8_0x08006000_bootloader
BOOTLOADER_TYPE = stm32duino
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bootloader in info.json sets BOOTLOADER, not BOOTLOADER_TYPE, and then for BOOTLOADER = stm32duino it is impossible to override DFU_ARGS and DFU_SUFFIX_ARGS with the proper values that match the custom bootloader used on this PCB.

One possible option here is to specify "bootloader": "custom" (bootloader_jump() as provided by stm32duino.c apparently does not work on this PCB anyway).

Siilwyn and others added 2 commits September 21, 2023 16:46
Co-authored-by: Drashna Jaelre <drashna@live.com>
Copy link
Contributor

@ForsakenRei ForsakenRei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a photo I took from my board reflecting the R2 white PCB, just in case if you want to use.
https://i.imgur.com/hHxxshc.jpg

Copy link

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Nov 14, 2023
@Siilwyn
Copy link
Author

Siilwyn commented Nov 14, 2023

This PR is in progress, need to provide a bootloader_jump and mcu_reset function for the bootloader so GMK_BOOT works. Need help to figure out how to get these though.

@github-actions github-actions bot removed the stale Issues or pull requests that have become inactive without resolution. label Nov 15, 2023
@drashna
Copy link
Member

drashna commented Dec 23, 2023

This PR is in progress, need to provide a bootloader_jump and mcu_reset function for the bootloader so GMK_BOOT works. Need help to figure out how to get these though.

Set the bootloader to custom, and add those functions to a c file for the keyboard.

Comment on lines +24 to +25
"processor": "STM32F103",
"board": "STM32_F103_STM32DUINO",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"processor": "STM32F103",
"board": "STM32_F103_STM32DUINO",
"development_board": "bluepill",

Copy link

github-actions bot commented Feb 7, 2024

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Feb 7, 2024
Copy link

github-actions bot commented Mar 8, 2024

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]

@github-actions github-actions bot closed this Mar 8, 2024
@Siilwyn
Copy link
Author

Siilwyn commented Mar 23, 2024

@drashna could this PR be merged without the bootloader_jump and mcu_reset functions or are they a requirement?

@Siilwyn Siilwyn mentioned this pull request Jul 4, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keyboard keymap stale Issues or pull requests that have become inactive without resolution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants