Compare commits

...

158 Commits

Author SHA1 Message Date
Jack Humbert 92005dee35 using data/mappings for processing 2023-04-07 16:25:51 -04:00
Jack Humbert 5dd8efc7c0 chibios compiling, layout keymaps 2023-04-06 16:22:14 -04:00
Jack Humbert cc22d67b32 some chibios experiments 2023-04-05 18:27:47 -04:00
Jack Humbert a1cb005981 storm commit, chibios exp 2023-04-05 12:59:16 -04:00
Jack Humbert cfde338998 generate compile_commands.json and configure clangd 2023-04-04 23:39:52 -04:00
Jack Humbert 4d1ad14596 Merge branch 'cmake-experiments' of https://github.com/qmk/qmk_firmware into cmake-experiments 2023-04-04 20:55:17 -04:00
Jack Humbert c34f0e4998 test out compile_flags.txt 2023-04-04 20:55:10 -04:00
Jack Humbert 94d76a4f9e fix case issues 2023-04-04 16:55:03 -04:00
Jack Humbert fe59b4e5d6 load keyboard ui through vscode 2023-04-04 16:26:44 -04:00
Jack Humbert 7093a41c6c clean-up 2023-04-04 14:19:52 -04:00
Jack Humbert c9ca9b9875 one target one target one target 2023-04-04 13:42:50 -04:00
Jack Humbert 060c15f32b fully compiling with qmk target 2023-04-04 12:46:29 -04:00
Jack Humbert 6a960cbf05 move to single lib 2023-04-04 12:29:01 -04:00
Jack Humbert 531c37b256 closer, tasks populating targets 2023-04-04 12:07:58 -04:00
Jack Humbert 6468360ff1 example tasks 2023-04-03 23:22:59 -04:00
Jack Humbert 40a3a431ef unknown state 2023-04-03 21:02:40 -04:00
Jack Humbert 4d999378d0 more absolute keyboard/keymap support 2023-04-03 13:43:40 -04:00
Jack Humbert 2ebad0d33f basic json validator supporting most used properties. converted some regex to cmake-compatible expressions 2023-04-03 13:19:45 -04:00
Jack Humbert d5760d02a6 some relative/abs keymap folder stuff 2023-04-02 23:46:40 -04:00
Jack Humbert 9ae271c844 capitalization matters on linux 2023-04-02 22:40:34 -04:00
Jack Humbert 4aea69ba21 start arm stuff, better keyboard folder path management 2023-04-02 16:38:37 -04:00
Jack Humbert 2031d063b5 split up functions/scripts a bit. downloads avr-gcc 2023-04-02 11:20:49 -04:00
Jack Humbert d32724c08f refix windows compiling 2023-04-01 23:39:13 -04:00
Jack Humbert 26756d05a2 look for make independently, osx compiling 2023-04-01 23:24:46 -04:00
Jack Humbert b45dbcd4c1 fix linux compiling 2023-04-01 23:10:44 -04:00
Jack Humbert 6fe0cd47ca multi folder targets 2023-04-01 22:04:00 -04:00
Jack Humbert ca8596e4a8 compiling basic AVR 2023-04-01 18:03:54 -04:00
Nick Brassel c3c401f91d [QP] Fix up delta frame boundaries (#20296) 2023-03-31 08:41:11 +11:00
Alejandro Chacón b63e388692 [Keyboard update] Fix json error (#20299) 2023-03-30 18:25:42 +01:00
Nick Brassel 81f3f0f3e9 Revert to hex output for kint41 (#20295) 2023-03-30 01:41:36 +01:00
Maverick0197 d0c36a7683 [Keyboard] Add KeyDeck8 (#20107)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-29 13:13:05 -07:00
4pplet c6cc638752 [Keyboard] Add Steezy60 Rev B (#19688)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Wolf Van Herreweghe <wolfvh@getupgamesofficial.com>
Co-authored-by: yiancar <yiancar@gmail.com>
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com>
Co-authored-by: Jue Liu <youturn@Jues-MacBook-Pro.local>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Shandon Anderson <shandon@shandon.codes>
Co-authored-by: jack <0x6A73@pm.me>
Co-authored-by: jason <jrucker2004@gmail.com>
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
2023-03-29 13:10:47 -07:00
Sắn 621dbdf8ee [Keyboard] Add Plaque80 (#20240)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Joel Challis <git@zvecr.com>
2023-03-29 13:34:42 -06:00
Alejandro Chacón 896f38c52c [Keyboard] Add alhenkb macropad (#20123) 2023-03-29 11:47:14 -07:00
Joel Challis f56580404d Minify content published to API (#20285) 2023-03-29 13:01:16 +01:00
Nick Brassel 5bb8f7ae84 Add ability for qmk mass-compile to build specified targets (#20294) 2023-03-29 21:26:05 +11:00
Nick Brassel d31d1488e8 Fixup CI command failures. (#20291) 2023-03-29 16:48:57 +11:00
Nick Brassel 6bdbf77238 Add step summary output to CI builds, with failure logs. (#20288) 2023-03-29 15:55:31 +11:00
Ryan e2630f9b40 Fix some invalid layout macros (#20256) 2023-03-29 15:51:22 +11:00
Nick Brassel c94241d447 CI Builds: master/develop, default/via, twice daily. (#20283) 2023-03-29 12:51:39 +11:00
Joel Challis e0b1637e15 I have zero involvement with this keyboard... (#20287) 2023-03-29 02:09:26 +01:00
takashicompany a6b2b1ca41 Add new keyboard Tightwriter (#20136)
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
2023-03-28 10:24:53 -06:00
Albert Y 02cb5db67b Remove invalid characters (#20277) 2023-03-28 14:33:00 +01:00
blindassassin111 00c3946fbe [keyboard] Correcting info.JSON for OSAv2 (#20247) 2023-03-27 23:42:04 -06:00
Nick Brassel 3ee17cd5d3 [chore] keyboards/tzarc: Alignment with clang-format. (#20265) 2023-03-26 23:56:09 +01:00
Ryan d6ce42ae5b Check for multiple matrix positions assigned to same key (#20039) 2023-03-24 13:46:42 +11:00
Pablo Martínez 67dae1222f [Documentation] Pointing device minor rewrite (#19641) 2023-03-23 22:35:02 +00:00
dependabot[bot] 8d0f97d110 Bump actions/stale from 7 to 8 (#20246)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 21:09:21 +00:00
Andrew Kannan 153bcdcd8d Add CannonKeys Bakeneko65 Hotswap ISO PCB to QMK (#20131)
* Add CannonKeys Bakeneko65 Hotswap ISO PCB to QMK

* Add 65_iso_blocker community layout support
2023-03-23 20:25:15 +00:00
blindassassin111 37ac5e68e6 [Keyboard]Viktus Minne - Topre variant (#20044)
* Adding the Viktus Minne topre pcb variant

* Update keyboards/viktus/minne_topre/readme.md

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update rules.mk

* Moving layouts from *.h to info.json

* Removing minne_topre.h and updating others

* fixing *.c's

* Switch from int to void for ec_init

* Update info.json

* Update info.json

---------

Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-23 20:22:47 +00:00
blindassassin111 b035cd094b [keyboard] Correcting info.JSON for Viktus Minne (#20244) 2023-03-23 14:20:12 -06:00
Cipulot 15cb7ded76 EC ProX PCB (#20047)
* Add EC Pro X

Addition of EC Pro X PCB series.
This series comprises 2 versions:
- ANSI/ISO
- JIS

The PCBs are different and are compatible only with their respective cases.

* Moved from data driven row/col def to config def

* Added project url in info.json

* Implemented proper `LAYOUT_` changes

* Removen unnecessary `.h` includes

* Removal of `"w": 1`

* Added `DISCHARGE_TIME`

Addition of a `DISCHARGE_TIME` time. This is to ensure that the ghost capacitor  that is the row strobed for the ADC read, is fully drained and doesn't carry charges that deviates the readings.

Tested on multiple hardware and confirmed working and improving the readings, both in terms of stability and consistency for baseline noise.

* Fixed keymap error in ordering

* Update keyboards/cipulot/ec_prox/jis/readme.md

Co-authored-by: Tom Barnes <barnestom@me.com>

* Update keyboards/cipulot/ec_prox/ansi_iso/readme.md

Co-authored-by: Tom Barnes <barnestom@me.com>

* Removal of `info.json` lines as suggested

* Update to comply with `_kb` and `_user` separation

* Update keyboards/cipulot/ec_prox/jis/rules.mk

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update rules.mk

---------

Co-authored-by: Tom Barnes <barnestom@me.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-23 10:09:50 +00:00
Cipulot 5428d922a5 EC 23U PCB (#20049)
* Add EC 23U PCB firmware

* Moved from data driven row/col def to config def

* Implemented proper LAYOUT_ changes

* Removed unnecessary `.h` includes

* Updated default thresholds

* Added `DISCHARGE_TIME`

Addition of a `DISCHARGE_TIME` time. This is to ensure that the ghost capacitor  that is the row strobed for the ADC read, is fully drained and doesn't carry charges that deviates the readings.

Tested on multiple hardware and confirmed working and improving the readings, both in terms of stability and consistency for baseline noise.

* Update readme.md

Added missing `cipulot/` in example commands.

* Removal of `info.json` lines as suggested

* Update to comply with `_kb` and `_user` separation

* Update rules.mk
2023-03-23 10:06:38 +00:00
Cipulot 3303f7ea5d EC 60 PCB (#20050)
* Add EC 60 PCB firmware

* Moved from data driven row/col def to config def

* Implemented proper LAYOUT_ changes

* Removed unnecessary `.h` includes

* Added `DISCHARGE_TIME`

Addition of a `DISCHARGE_TIME` time. This is to ensure that the ghost capacitor  that is the row strobed for the ADC read, is fully drained and doesn't carry charges that deviates the readings.

Tested on multiple hardware and confirmed working and improving the readings, both in terms of stability and consistency for baseline noise.

* Update readme.md

Added missing `cipulot/`in readme example commands

* Update keyboards/cipulot/ec_60/readme.md

Co-authored-by: Tom Barnes <barnestom@me.com>

* Removal of `info.json` lines as suggested

* Update to comply with `_kb` and `_user` separation

* Update keyboards/cipulot/ec_60/rules.mk

Co-authored-by: Drashna Jaelre <drashna@live.com>

---------

Co-authored-by: Tom Barnes <barnestom@me.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-23 10:05:49 +00:00
Less/Rikki bb4abc8a9f [jacky_studio/piggy60] warn about incompatible PCB rev (#20232) 2023-03-23 19:18:30 +11:00
spbgzh 0e4221fdf7 [Keyboard] Fix tata80 wkl layout (#20195) 2023-03-23 00:12:38 -07:00
SHVD3x 4f374640d0 [Keyboard] Ymd09 config updates (#20124)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-22 23:52:31 -07:00
Moritz Plattner e624ce959a [Keyboard] Add Geistmaschine Geist (#20117)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-22 22:09:33 -07:00
jotix 8cd78b392f [Keyboard] Add via support for jotanck keyboard (#20146)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-22 21:38:35 -07:00
Less/Rikki 5ace174cd3 fixup: correct filename (#20212) 2023-03-21 23:23:21 +00:00
Jason Hazel b1e6b3798a Adding Bad Wings Support (#20153) 2023-03-21 20:53:06 +00:00
spbgzh 0bb9eada83 [Keyboard] update creek70 change rgb num (#20196)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-21 12:07:47 -07:00
Ning ac75242132 [Keyboard] Add tiny board 16 rgb keyboard (#20158)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-21 11:20:25 -07:00
mechlovin 650a0b8ad4 [Keyboard] Olly Orion: Disable SWD and JTAG (#20169)
Co-authored-by: Joel Challis <git@zvecr.com>
2023-03-21 01:17:24 -07:00
blindassassin111 0f07fcc8d4 [Keyboard] OSAv2 (#20166) 2023-03-21 01:12:21 -07:00
hulahermit b6a636d954 [Keyboard] Add pteropus keyboard (#20147)
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Chi-Han Yang <chyang@enrichtx.com>
2023-03-20 23:44:56 -07:00
Andrew Kannan 44cd8a2f88 [Keyboard] Add CannonKeys Bakeneko60 ISO Hotswap PCB (#20130) 2023-03-20 23:20:30 -07:00
Tobias Minn f55d2cd6b6 [Keyboard] Add Kuro65 keyboard (#20122)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
2023-03-20 22:30:21 -07:00
Sid Quinsaat 63af5cd50e [Keymap] for sharkby7e (#20121)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-20 22:28:54 -07:00
Agent Blu, 006 8bb7d24fba [Keyboard] Add Blu vimclutch (#20060)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-20 20:13:27 -07:00
Laneware 50b12ece13 Update lpad info.json (#20184)
Update incorrect row and col pins, now confirmed working via manual build in QMK MSYS
2023-03-19 23:19:28 +00:00
QMK Bot c5b0e3a6a3 Format code according to conventions (#20175) 2023-03-18 18:15:26 +00:00
jack a1a5dd6ddd Fixup kbdfans/tiger80 RGB animations (#20164) 2023-03-18 11:38:24 -06:00
Laneware da52450152 Add Support for LPAD (#19852)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-18 11:33:20 -06:00
Dam Vu Duy 7b9d471ba0 [Keyboard] Add Coban Pad 3A (#19634) 2023-03-18 11:32:29 -06:00
toinux 319da117b7 [Keymap] crkbd toinux update (#19673) 2023-03-18 11:26:42 -06:00
Nick Brassel f8e89a1fe4 De-parallelise CI (#20171)
* De-parallelise CI

No speed increase.

* Update .github/workflows/ci_builds.yml
2023-03-18 15:58:51 +00:00
JX e437560144 [Keyboard] Add yandrstudio/transition80 (#19790)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-17 10:14:21 -07:00
Fabien d026803147 [Keyboard] Fix typos in readme for Lily58 R2G (#20149) 2023-03-17 10:27:39 -06:00
blindassassin111 687b7341ed [keyboard] Viktus Minne (#19977)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-17 10:26:52 -06:00
ziptyze 0f323a45ce [Keyboard] 1upkeyboards/pi40 update (#20066) 2023-03-17 10:07:26 -06:00
Nick Brassel 1b3f7fcf7d Add qmk find command, reuse logic for qmk mass-compile. (#20139) 2023-03-16 20:35:49 +00:00
ToffeeStudio f3f634ef67 [Keyboard] Add Blueberry (#19915)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2023-03-16 11:11:58 -06:00
Kyle McCreery b2ee950d9e [Keymap] Sugarglider VIA keymap enhancement (#20140) 2023-03-16 09:58:49 -06:00
lalalademaxiya1 2f7a06cf73 Update keychron_common.c (#20055) 2023-03-16 12:30:09 +11:00
Joel Challis 7654c2a23b Update keycodes_0.0.1_basic.hjson (#20129) 2023-03-16 00:37:58 +00:00
しぐれ 012fa6dd45 [Doc] Add example to keyboard housekeeping and some minor fixes (#19968)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-15 16:55:18 -06:00
mjbogusz 54dca8cbff [Keyboard] Add Atlantis PS17 (#19952) 2023-03-15 14:30:29 -06:00
dztech 3eb04fee87 add tiger80 iso layout support (#19975)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-15 10:53:28 -06:00
Josh Hinnebusch 0996bca9e9 [Keyboard] Add hineybush/h87_g2 (#20053)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-15 10:43:06 -06:00
Conor Burns c18d5ebd2d add new board: splaytoraid (#20052)
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
2023-03-15 15:53:02 +00:00
Kyle McCreery 915d7a18d7 [Keyboard] New Keyboard - Sugar Glider (#19933)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-15 15:49:14 +00:00
Nick Brassel e62fc866db Let's use workflows to parallelise the builds. (#20120)
* Let's use workflows to parallelise the builds.

* Nofail if files aren't present.

* Formatting.
2023-03-15 08:31:10 +11:00
d-floe c91296f001 [Keyboard] Add KP60 (#20096)
Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-14 12:56:31 -07:00
Sophie Machen 99a39a1198 Update newbs_getting_started to include instructions for apple silicon (#19579)
Co-authored-by: Joel Challis <git@zvecr.com>
2023-03-14 12:58:08 -04:00
Cipulot 4283e69ac7 RF R1 8-9Xu PCB (#20048)
Co-authored-by: Tom Barnes <barnestom@me.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-14 07:41:06 +00:00
Albert Y a71e58270c Document Autocorrect callback functions (#20115) 2023-03-13 13:34:23 -06:00
Albert Y e0bd6fac10 Move Ferris Sweep to data-driven (#20111) 2023-03-12 23:33:31 -06:00
Darkhan a5e7390419 [keyboard] Prevent LED flicker when connecting AnnePro 2 (#19709) 2023-03-12 21:23:39 +11:00
Nick Brassel bcfe67883e Allow for CI builds to run for 23 hours, instead of 6. (part deux) (#20095) 2023-03-12 12:55:26 +11:00
Nick Brassel 6b9dced611 Allow for CI builds to run for 23 hours, instead of 6. (#20094) 2023-03-12 01:18:49 +00:00
Andrew Kannan 042e42d1b7 Add Chimera65 Hotswap keyboard (#20038)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-11 14:04:26 -07:00
jonylee@hfd dff9ee25e2 [Keyboard] Add k83 (#19896) 2023-03-11 10:52:35 -07:00
Dan White 6fe223b5ee Ketch LGUI/LALT key transposed on Minivan layout (#20025) 2023-03-11 10:29:20 -07:00
azhizhinov b281d6efa2 [Keyboard] Change pierce vendor ID (#20088) 2023-03-11 10:26:47 -07:00
ebastler 36292faf94 Teleport native bugfix (changed F411CC wear levelling) (#20090)
* workaround for flash size issue

* enable mousekeys due to requests by some users
2023-03-11 16:52:45 +00:00
Nick Brassel e8a5630c7c Yet another adventure in trying to fit things into a 32U4 (#20091) 2023-03-11 23:56:01 +11:00
Christopher Hoage 96b0baa230 [Keyboard] Add Spleeb default and custom firmware (#19481)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-10 22:33:52 -07:00
Vino Rodrigues dbd1d3cba1 [Keyboard] Add Binpad BN009 R2 3x3 macropad (#19992)
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-10 20:12:14 -08:00
azhizhinov 1d04a818d7 [Keyboard] VIA support for Pierce keyboard (#20045) 2023-03-10 19:47:03 -08:00
Andrew Kannan df814dec7a Caerdroia Keyboard Firmware (#20036) 2023-03-10 10:57:11 -07:00
paulgali 950afdceeb Zeno pcb V0.0.4 update via + fileformatting (#20023)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-10 10:51:15 -07:00
Albert Y 7be63bb524 Move macro3 to data-driven (#20046) 2023-03-10 10:38:56 -07:00
Danny 943d0ff619 Fix incorrect matrix positions for RGB LEDs (#20082) 2023-03-10 16:08:07 +00:00
Andrew Kannan bf4121a770 [Keyboard] Add Ortho48v2 Keyboard (#18889)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-10 02:23:53 -08:00
Kuribayashi Atsushi 24bf0dfb37 [Keyboard] Add tsubasa keyboard (#19352)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-10 01:20:37 -08:00
Paul Enrico N. Viola 3b89fb61e8 [Keyboard] update matrix pins for Polly40 (#20002) 2023-03-09 23:52:36 -08:00
Mark Stosberg eed3eb0b1d [Keymap] add crkbd/keymaps/markstos (#19010)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2023-03-09 23:19:20 -08:00
frobiac 313fc4cb8f [Keyboard] frobiac custom boards and layout (#19883) 2023-03-09 23:05:20 -08:00
Budiman Jojo 62a8f41209 [Keymap] Fix the secondary keyboard not updating WPM (#20069) 2023-03-09 17:21:19 -07:00
Nick Brassel ceb8222e57 Add CI builds for default and via keymaps (#20071) 2023-03-10 09:36:20 +11:00
Flame Soulis 17bbef5200 Keebio/KBO-5000 Encoder Misconfiguration Fix for #20073 (#20074) 2023-03-09 15:32:46 -05:00
Ryan 76fb534269 qmk info: add warning when layout is offset (#20070) 2023-03-09 20:27:04 +00:00
Anjheos 65f380c768 Adding firmware for New Proto[Typist] in-stock PCBs. (#19958)
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Anjheos <Anjheos.Designs@gmail.com>
2023-03-09 12:42:09 -07:00
jack 9c79d2933c [Doc] Update PR checklist (#19988) 2023-03-08 12:58:23 -07:00
Albert Y ec3c2b75de [Docs] Add mod-tap section header (#20041) 2023-03-08 12:36:36 -07:00
Cipulot 5e4d23c54c EC Pro 2 PCB (#19917)
* EC Pro 2 firmware by Cipulot
2023-03-08 10:43:57 +00:00
Freather 2317c768e4 [Keyboard] Teahouse Ayleen TKL (#19900)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: CMM.Studio Freather <50167286+frankBTHID@users.noreply.github.com>
2023-03-08 00:50:37 -08:00
Joel Challis 952b88528f Fix processing of recently added system keycodes (#20058) 2023-03-08 06:38:11 +00:00
Niles Tanner c1664ac6e3 VIA keymap for djinn (#19881) 2023-03-08 09:50:32 +11:00
peepeetee 3d0f03f21e implement rgb matrix for momokai keyboards (#19904)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-07 14:07:47 -07:00
Olivia 25cb1c6a5a [Keymap] Smooted's BM80v2 keymap (#19873) 2023-03-07 10:29:03 -08:00
Robert Mills 8812db1d64 [Keyboard] Add Karn Keyboard (#19846)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-07 10:13:46 -08:00
Albert Y e6e11dfde7 Add disable git safe directory check step (#20040) 2023-03-07 01:05:34 +00:00
Dmitry Nosachev c8237a7691 [Keyboard] Sejin EAT-1010R2 keyboard (#19809)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-06 11:39:13 -08:00
souvlakeeb f067f42305 [Docs] Discuss layout macro (#19803)
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2023-03-06 11:24:56 -08:00
gumorr ca5eb9f664 [Keyboard] Add gummykey (#19695)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-06 11:17:29 -08:00
Leon Anavi 61f3f5676a keyboards/anavi: Add ANAVI Knobs 3 (#18624) 2023-03-05 18:28:01 -07:00
Joel Challis 500c4b7484 Reject VIA keys within info.json (#20026) 2023-03-06 10:07:47 +11:00
Sergey Vlasov 07b7fed122 Unbreak switchplate/southpaw_65 after #16277 (#20015)
Apparently the changes done in #16277 swapped the values read from the
PCA9555 expanders by mistake, which resulted in mixed up matrix columns.
Fix the chip and register addresses to match the original code.
2023-03-05 13:29:10 +00:00
lalalademaxiya1 77f7351991 Add Keychron Q12 (#19844)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-03-04 11:53:09 +11:00
Elliot Powell 127b53bd23 Add Support for Lilly58 r2g (#19862)
* Add support for lilly58 r2g by Mechboards
2023-03-03 23:04:00 +00:00
Guillermo Aguirre 95dd5738d2 Add new keymap for Preonic rev3 (#19706) 2023-03-03 15:01:22 -07:00
Nick Brassel d1a430b348 Initial deprecation policy documentation. (#19908) 2023-03-03 14:16:32 +11:00
Nick Brassel 7ebb8c2dec Update branch names to reflect configurator's new deployment. (#19999) 2023-03-03 14:16:06 +11:00
Ryan 6fabc330e3 Check all keys have matrix positions when parsing C LAYOUT macros (#19781) 2023-03-02 10:56:45 +11:00
Albert Y 80c6fbad1c [Keyboard] Clean up contra & move to data-driven (#19973)
Co-authored-by: Joel Challis <git@zvecr.com>
2023-03-01 10:53:31 -07:00
David Rambo f6390892e3 [Keymap] Add davidrambo lulu keymap (#19448)
Co-authored-by: Joel Challis <git@zvecr.com>
2023-03-01 10:49:33 -07:00
Paul Enrico N. Viola aeb3ed64c3 added Polly40 keyboard (#19936)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: jack <0x6a73@protonmail.com>
2023-03-01 10:05:36 -07:00
Joel Challis 3fc9c03559 Remove all from list of animations in info.json (#19978) 2023-03-01 02:55:14 +00:00
Joel Challis 53727062db Disable safe.directory check (#19970) 2023-02-28 20:27:11 +00:00
gkeyboard d35cdcc933 [Keyboard] Add GPAD8-2R (gpad8_2r) Macro Pad (#19914)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-02-28 12:24:35 -08:00
Michal S b85a9abc96 [Keymap] sofle/keymaps/michal: rewrite (#19938) 2023-02-28 12:23:47 -08:00
studiokestra ee90ad28e6 [Keyboard] Add FRL84 PCB. (#19942)
Co-authored-by: jack <0x6a73@protonmail.com>
2023-02-28 12:22:14 -08:00
dependabot[bot] e14254335d Bump tj-actions/changed-files from 34 to 35 (#19971)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34 to 35.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v34...v35)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 20:10:08 +00:00
Shawn Meier 0596720f7f [Keyboard] remove non-existent method from ploopy documentation (#19957) 2023-02-28 11:15:19 -08:00
Drashna Jaelre 051401175d [Keymap] Drashna updates for 0.20.0 (#19960) 2023-02-28 11:14:48 -08:00
Joel Challis 05631b276d Flag "builddefs" as core changes (#19950) 2023-02-28 14:18:43 +00:00
800 changed files with 33277 additions and 3300 deletions
+3
View File
@@ -0,0 +1,3 @@
CompileFlags:
Remove: -mcall-prologues
Add: -nostdinc
+1
View File
@@ -5,6 +5,7 @@ core:
- tests/**/*
- util/**/*
- platforms/**/*
- builddefs/**/*
- Makefile
- '*.mk'
dependencies:
+60
View File
@@ -0,0 +1,60 @@
name: CI Builds
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 0,12 * * *'
jobs:
ci_builds:
name: "CI Build"
runs-on: self-hosted
timeout-minutes: 1380
if: github.repository == 'qmk/qmk_firmware'
strategy:
fail-fast: false
matrix:
branch: [master, develop]
keymap: [default, via]
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ matrix.branch }}
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
run: |
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes || touch .failed
# Generate the step summary markdown
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
# Truncate to a maximum of 1MB to deal with GitHub workflow limit
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
# Exit with failure if the compilation stage failed
[ ! -f .failed ] || exit 1
- name: 'Upload artifacts'
uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
+4
View File
@@ -21,9 +21,13 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Run tests
+4 -1
View File
@@ -22,6 +22,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -32,7 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v34
uses: tj-actions/changed-files@v35
- name: Run qmk formatters
shell: 'bash {0}'
+3
View File
@@ -16,6 +16,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
fetch-depth: 0
+4 -1
View File
@@ -15,6 +15,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -24,7 +27,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v34
uses: tj-actions/changed-files@v35
- name: Print info
run: |
+3
View File
@@ -16,6 +16,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
- name: Run qmk generators
+3
View File
@@ -16,6 +16,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
- name: Run qmk generators
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
+4 -1
View File
@@ -52,9 +52,12 @@ quantum/version.h
.history/
build/
cmake-build-debug
CMakeLists.txt
# CMakeLists.txt
*.pdf
# cmake toolchain downloads
/toolchains
# Let these ones be user specific, since we have so many different configurations
*.code-workspace
.stfolder
+9
View File
@@ -0,0 +1,9 @@
[
{
"name": "AVR GCC",
"compilers": {
"CC": "C:\\QMK_MSYS\\mingw64\\bin\\avr-gcc.exe",
"CXX": "C:\\QMK_MSYS\\mingw64\\bin\\avr-g++.exe"
}
}
]
+2 -2
View File
@@ -5,8 +5,8 @@
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/.build": true,
"**/*.hex": true,
"**/*.bin": true,
// "**/*.hex": true,
// "**/*.bin": true,
"**/*.uf2": true
},
"files.associations": {
+114
View File
@@ -0,0 +1,114 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Load Keyboard",
"dependsOrder": "sequence",
"dependsOn":[
"Only Load Keyboard",
"Configure CMake"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Only Load Keyboard",
"type": "shell",
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -D QMK_KEYMAP_FOLDER=\"${input:keyboard_keymap}\" -P ${workspaceFolder}/cmake/ConfigureKeyboard.cmake",
"problemMatcher": []
},
{
"label": "Configure CMake",
"type": "cmake",
"command": "configure"
},
{
"label": "Build",
"problemMatcher": [
{
"base": "$gcc",
"fileLocation": ["relative", "${workspaceFolder}/build"]
},
],
"options": {
"environment": {
"CLICOLOR_FORCE": "1"
}
},
"type": "cmake",
"command": "build",
"targets":[
"${input:keyboard_target}"
],
"group": {
"kind": "build",
"isDefault": true
},
},
// {
// "label": "Rebuild",
// "problemMatcher": [
// {
// "base": "$gcc",
// "fileLocation": ["relative", "${workspaceFolder}/build"]
// },
// ],
// "options": {
// "environment": {
// "CLICOLOR_FORCE": "1"
// }
// },
// "type": "cmake",
// "command": "cleanRebuild",
// "targets":[
// "${input:keyboard_target}"
// ],
// "group": {
// "kind": "build",
// "isDefault": true
// },
// }
],
"inputs": [
{
"id": "keyboard_target",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "type build\\targets",
"description": "Target:",
"fieldSeparator": "|"
},
},
{
"id": "all_keyboards",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "type build\\all_keyboards",
"description": "Keyboard:",
"default": ""
},
},
{
"id": "keymap",
"description": "Keymap:",
"type": "pickString",
"options":[
"default"
]
},
{
"id": "keyboard_keymap",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -P ${workspaceFolder}/cmake/GetKeymaps.cmake && type build\\keyboard_keymaps",
"description": "Keymap:",
"default": ""
},
},
]
}
+97
View File
@@ -0,0 +1,97 @@
cmake_minimum_required(VERSION 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(UpdateSubmodule)
include(ResolveKeyboard)
include(ValidateJson)
include(ProcessKeyboard)
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
function(_get_all_cmake_targets out_var current_dir)
get_property(targets DIRECTORY ${current_dir} PROPERTY BUILDSYSTEM_TARGETS)
get_property(subdirs DIRECTORY ${current_dir} PROPERTY SUBDIRECTORIES)
foreach(subdir ${subdirs})
_get_all_cmake_targets(subdir_targets ${subdir})
list(APPEND targets ${subdir_targets})
endforeach()
set(${out_var} ${targets} PARENT_SCOPE)
endfunction()
if(NOT DEFINED QMK_KEYBOARD)
# configure step - populate targets
project(qmk_firmware)
add_subdirectory(keyboards)
else()
# build step
if(NOT DEFINED QMK_KEYMAP_FOLDER)
set(QMK_KEYMAP_FOLDER "default")
endif()
resolve_keyboard(${QMK_KEYBOARD_FOLDER} QMK_KEYBOARD_FOLDER_ABS)
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${QMK_KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
resolve_config_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_CONFIG_H)
process_keyboard()
resolve_keyboard_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_H)
resolve_keymap_c(${QMK_KEYBOARD_FOLDER_ABS} ${QMK_KEYMAP_FOLDER} QMK_KEYMAP_C)
message(STATUS "config.h: ${QMK_KEYBOARD_CONFIG_H}")
message(STATUS "keyboard.h: ${QMK_KEYBOARD_H}")
message(STATUS "keymap.c: ${QMK_KEYMAP_C}")
project(${QMK_KEYBOARD}
LANGUAGES C CXX ASM
HOMEPAGE_URL ${URL}
VERSION ${DEVICE_VER})
# add_compile_options(
# -include ${QMK_KEYBOARD_CONFIG_H}
# )
add_compile_definitions(
QMK_KEYBOARD_H="${QMK_KEYBOARD_H}"
KEYBOARD_${QMK_KEYBOARD}
KEYMAP_C="${QMK_KEYMAP_C}"
MATRIX_ROWS=8
MATRIX_COLS=6
)
if(DEFINED DIODE_DIRECTION)
add_compile_definitions(DIODE_DIRECTION=${DIODE_DIRECTION})
endif()
include_directories(${CMAKE_SOURCE_DIR})
# if(EXISTS ${QMK_KEYBOARD_FOLDER_ABS}/CMakeLists.txt)
# add_subdirectory(${QMK_KEYBOARD_FOLDER_ABS})
# else()
file(GLOB KEYBOARD_SRC "${QMK_KEYBOARD_FOLDER_ABS}/*.c")
list(REMOVE_ITEM KEYBOARD_SRC "${QMK_KEYMAP_C}")
add_qmk_executable(${TARGET_NAME} ${KEYBOARD_SRC})
# endif()
# add_library(qmk)
target_precompile_headers(qmk PUBLIC
${QMK_KEYBOARD_CONFIG_H}
)
resolve_keyboard_includes(${QMK_KEYBOARD_FOLDER_ABS})
add_subdirectory(quantum)
add_subdirectory(platforms)
add_subdirectory(tmk_core/protocol)
include(features/oled)
include(features/backlight)
include(features/eeprom)
include(features/matrix)
include(features/fnv)
endif()
+5
View File
@@ -29,6 +29,11 @@ KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
ifeq ($(strip $(DUMP_CI_METADATA)),yes)
$(info CI Metadata: KEYBOARD=$(KEYBOARD))
$(info CI Metadata: KEYMAP=$(KEYMAP))
endif
# Force expansion
TARGET := $(TARGET)
+41
View File
@@ -0,0 +1,41 @@
{
"MKL26Z64" : {
"MCU" : "cortex-m0plus",
"ARMV": 6,
"MCU_FAMILY": "KINETIS",
"MCU_SERIES": "KL2x",
"MCU_LDSCRIPT": "MKL26Z64",
"MCU_STARTUP": "kl2x",
"BOARD": "PJRC_TEENSY_LC"
},
"MK20DX128" : {
"MCU" : "cortex-m4",
"ARMV": 7,
"MCU_FAMILY": "KINETIS",
"MCU_SERIES": "K20x",
"MCU_LDSCRIPT": "MK20DX128",
"MCU_STARTUP": "k20x5",
"BOARD": "PJRC_TEENSY_3"
},
"MK20DX256" : {
"MCU" : "cortex-m4",
"ARMV": 7,
"MCU_FAMILY": "KINETIS",
"MCU_SERIES": "K20x",
"MCU_LDSCRIPT": "MK20DX256",
"MCU_STARTUP": "k20x7",
"BOARD": "PJRC_TEENSY_3_1"
},
"STM32F303" : {
"MCU" : "cortex-m4",
"ARMV": 7,
"MCU_FAMILY": "STM32",
"MCU_SERIES": "STM32F3xx",
"MCU_LDSCRIPT": "STM32F303xC",
"MCU_STARTUP": "stm32f3xx",
"BOARD": "GENERIC_STM32_F303XC",
"USE_FPU": true,
"UF2_FAMILY": "STM32F3",
"STM32_BOOTLOADER_ADDRESS": "0x1FFFD800"
}
}
+83
View File
@@ -0,0 +1,83 @@
include(ResolveKeyboard)
include(ValidateJson)
include(ResolveToolchain)
macro(add_keyboard KEYBOARD_FOLDER KEYMAP_FOLDER)
# not entirely sure why this is necessary
# set(TEMP_PATH ${KEYBOARD_FOLDER})
# cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
# if(${IS_KEYBOARD_FOLDER_RELATIVE})
# set(KEYBOARD_FOLDER_ABS ${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD_FOLDER})
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
# # message(FATAL_ERROR "Keyboard does not exist in QMK - try using an absolute path to the keyboard folder")
# resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
# endif()
# else()
# set(KEYBOARD_FOLDER_ABS ${KEYBOARD_FOLDER})
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
# message(FATAL_ERROR "Absolute path to keyboard does not exist")
# endif()
# endif()
resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
set(TEMP_PATH ${KEYBOARD_FOLDER})
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
set(TEMP_PATH ${KEYMAP_FOLDER})
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
if(${IS_KEYMAP_FOLDER_RELATIVE})
set(KEYMAP_NAME ${KEYMAP_FOLDER})
else()
if(WIN32)
set(KEYMAP_NAME $ENV{USERNAME})
else()
set(KEYMAP_NAME $ENV{USE})
endif()
endif()
# find the right toolchain
# not sure we need to validate here
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
string(JSON PROCESSOR GET ${JSON_STRING} processor)
resolve_toolchain(${PROCESSOR} TOOLCHAIN)
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
if(${IS_KEYBOARD_FOLDER_RELATIVE})
string(MAKE_C_IDENTIFIER ${KEYBOARD_FOLDER} KEYBOARD_SLUG)
else()
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
endif()
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
ExternalProject_Add(${TARGET_NAME}
SOURCE_DIR ${CMAKE_SOURCE_DIR}
# PREFIX ${CMAKE_SOURCE_DIR}/build/keyboards/${KEYBOARD_FOLDER}
TMP_DIR ${CMAKE_SOURCE_DIR}/build/tmp
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/build/download
BINARY_DIR ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}
STAMP_DIR ${CMAKE_SOURCE_DIR}/build/stamp
LOG_DIR ${CMAKE_SOURCE_DIR}/build/log
INSTALL_DIR ${CMAKE_SOURCE_DIR}/build/install
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/${TARGET_NAME}${QMK_EXTENSION} ${CMAKE_SOURCE_DIR}/${TARGET_NAME}${QMK_EXTENSION}
# this seems to work well for all systems so far - not sure if it'd be useful to customize
CMAKE_GENERATOR "Unix Makefiles"
CMAKE_ARGS
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchains/${TOOLCHAIN}.cmake
-DQMK_KEYBOARD=${KEYBOARD_SLUG}
-DQMK_KEYBOARD_FOLDER=${KEYBOARD_FOLDER}
-DQMK_KEYMAP_FOLDER=${KEYMAP_FOLDER}
-DTARGET_NAME=${TARGET_NAME}
)
ExternalProject_Add_Step(${TARGET_NAME} copy_compile_commands
DEPENDEES configure
DEPENDERS build
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}/compile_commands.json ${CMAKE_SOURCE_DIR}/compile_commands.json
# BYPRODUCTS ${CMAKE_SOURCE_DIR}/compile_commands.json
ALWAYS TRUE
)
# file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${KEYMAP_FOLDER}|${KEYBOARD_FOLDER}|Made by: ${MANUFACTURER}\n")
endmacro(add_keyboard)
+44
View File
@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.20)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(ResolveKeyboard)
include(ValidateJSON)
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
if(NOT DEFINED QMK_KEYMAP_FOLDER)
set(QMK_KEYMAP_FOLDER default)
endif()
set(TEMP_PATH ${QMK_KEYBOARD_FOLDER})
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
set(TEMP_PATH ${QMK_KEYMAP_FOLDER})
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
if(${IS_KEYMAP_FOLDER_RELATIVE})
set(KEYMAP_NAME ${QMK_KEYMAP_FOLDER})
else()
if(WIN32)
set(KEYMAP_NAME $ENV{USERNAME})
else()
set(KEYMAP_NAME $ENV{USE})
endif()
endif()
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
if(${IS_KEYBOARD_FOLDER_RELATIVE})
string(MAKE_C_IDENTIFIER ${QMK_KEYBOARD_FOLDER} KEYBOARD_SLUG)
else()
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
endif()
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${QMK_KEYMAP_FOLDER}|${QMK_KEYBOARD_FOLDER}:${QMK_KEYMAP_FOLDER}|Made by: ${MANUFACTURER}\n")
message(STATUS "Added keyboard '${QMK_KEYBOARD_FOLDER}' with keymap '${QMK_KEYMAP_FOLDER}'")
+14
View File
@@ -0,0 +1,14 @@
macro(find_arm_toolchain)
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
if(NOT TOOLCHAIN_ROOT)
include(GetARMToolchain)
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
endif()
if(NOT TOOLCHAIN_ROOT)
message(FATAL_ERROR "ARM Toolchain could not be found")
endif()
message(STATUS "ARM toolchain found: ${TOOLCHAIN_ROOT}")
endmacro()
+20
View File
@@ -0,0 +1,20 @@
macro(find_avr_toolchain)
find_toolchain(avr TOOLCHAIN_ROOT)
if(NOT TOOLCHAIN_ROOT)
include(GetAVRToolchain)
find_toolchain(avr TOOLCHAIN_ROOT)
endif()
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
if(${DFU_PROGRAMMER} STREQUAL "DFU_PROGRAMMER-NOTFOUND")
include(GetDfuProgrammer)
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
endif()
if(NOT TOOLCHAIN_ROOT)
message(FATAL_ERROR "AVR Toolchain could not be found")
endif()
message(STATUS "AVR toolchain found: ${TOOLCHAIN_ROOT}")
endmacro()
+282
View File
@@ -0,0 +1,282 @@
include(ParseMakefile)
# STM32F303
set(MCU "cortex-m4")
set(ARMV 7)
set(MCU_FAMILY "STM32")
set(MCU_SERIES "STM32F3xx")
string(TOUPPER ${MCU_SERIES} MCU_SERIES_UPPER)
set(MCU_LDSCRIPT "STM32F303xC")
set(MCU_STARTUP "stm32f3xx")
set(BOARD "GENERIC_STM32_F303XC")
set(USE_FPU TRUE)
set(UF2_FAMILY "STM32F3")
set(STM32_BOOTLOADER_ADDRESS 0x1FFFD800)
set(EEPROM_DRIVER "wear_leveling" FORCE)
set(WEAR_LEVELING_DRIVER "embedded_flash" FORCE)
target_compile_definitions(qmk PUBLIC
QMK_MCU_FAMILY_${MCU_FAMILY}
QMK_MCU_SERIES_${MCU_SERIES_UPPER}
)
target_compile_options(qmk PUBLIC
-march=armv7-m
)
target_compile_definitions(qmk PUBLIC
MCU_${MCU_FAMILY}
__ARM_ARCH_7M__
)
# platforms/chibios/platform.mk
if(NOT DEFINED USE_PROCESS_STACKSIZE)
set(USE_PROCESS_STACKSIZE 0x800)
endif()
if(NOT DEFINED USE_EXCEPTIONS_STACKSIZE)
set(USE_EXCEPTIONS_STACKSIZE 0x400)
endif()
target_link_options(qmk PUBLIC
-Wl,--defsym=__process_stack_size__=${USE_PROCESS_STACKSIZE},--defsym=__main_stack_size__=${USE_EXCEPTIONS_STACKSIZE}
)
if(NOT DEFINED MCU_PORT_NAME)
set(MCU_PORT_NAME ${MCU_FAMILY})
endif()
set(MCU_ARCH ${MCU})
if(NOT DEFINED CHIBIOS_PORT)
set(CHIBIOS_PORT "ARMv${ARMV}-M")
endif()
if(NOT DEFINED PLATFORM_NAME)
set(PLATFORM_NAME platform)
endif()
set(CHIBIOS ${CMAKE_SOURCE_DIR}/lib/chibios)
set(CHIBIOS_CONTRIB ${CMAKE_SOURCE_DIR}/lib/chibios-contrib)
# port*.mk
include(chibios/ports/${CHIBIOS_PORT})
# platform.mk
include(chibios/ports/${MCU_SERIES})
# startup_*.mk - might need to convert these
find_file(STARTUP_MK startup_${MCU_STARTUP}.mk
${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/mk
${CHIBIOS}/os/common/startup/ARMCMx/compilers/GCC/mk
${CHIBIOS_CONTRIB}/os/common/startup/ARMCMx/compilers/GCC/mk
)
get_filename_component(STARTUP_DIR ${STARTUP_MK} DIRECTORY)
ParseMakefile(${STARTUP_MK})
target_sources(qmk PUBLIC ${STARTUPSRC})
target_sources(qmk PUBLIC ${STARTUPASM})
target_include_directories(qmk PUBLIC ${STARTUPINC})
# board paths - we should just standardize these
find_path(BOARD_PATH
NAMES
boards/${BOARD}/board.mk
board/board.mk
PATHS
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}
${CHIBIOS}/os/hal/
${CHIBIOS_CONTRIB}/os/hal/
)
# if(EXISTS ${BOARD_PATH}/rules.mk)
# ParseMakefile(${BOARD_PATH}/rules.mk)
# endif()
if(EXISTS ${BOARD_PATH}/configs/config.h)
target_precompile_headers(qmk PUBLIC
${BOARD_PATH}/configs/config.h
)
endif()
if(EXISTS ${BOARD_PATH}/configs/post_config.h)
target_precompile_headers(qmk PUBLIC
${BOARD_PATH}/configs/post_config.h
)
endif()
find_file(BOARD_MK board.mk
${BOARD_PATH}/boards/${BOARD}
${BOARD_PATH}/board
)
ParseMakefile(${BOARD_MK})
target_sources(qmk PUBLIC ${BOARDSRC})
target_include_directories(qmk PUBLIC ${BOARDINC})
# allow board.c to be overriden
file(RELATIVE_PATH INIT_HOOK_RELATIVE ${CMAKE_BINARY_DIR}
"${CMAKE_SOURCE_DIR}/tmk_core/protocol/chibios/init_hooks.h")
set_source_files_properties(${BOARDSRC} TARGET_DIRECTORY qmk PROPERTIES
# COMPILE_OPTIONS "-include ../../../tmk_core/protocol/chibios/init_hooks.h"
COMPILE_OPTIONS "-include ${INIT_HOOK_RELATIVE}"
)
# bootloader
if(DEFINED STM32_BOOTLOADER_ADDRESS)
target_compile_definitions(qmk PUBLIC STM32_BOOTLOADER_ADDRESS=${STM32_BOOTLOADER_ADDRESS})
endif()
if(DEFINED WB32_BOOTLOADER_ADDRESS)
target_compile_definitions(qmk PUBLIC WB32_BOOTLOADER_ADDRESS=${WB32_BOOTLOADER_ADDRESS})
endif()
find_file(BOOTLOADER_DEFS_H bootloader_defs.h
${QMK_KEYBOARD_FOLDER}
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
${BOARD_PATH}/configs
)
if(EXISTS ${BOOTLOADER_DEFS_H})
target_compile_options(qmk PUBLIC -include ${BOOTLOADER_DEFS_H})
endif()
# chconf directories
find_path(CHCONFDIR chconf.h
${QMK_KEYBOARD_FOLDER}
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
)
target_include_directories(qmk PUBLIC ${CHCONFDIR})
# halconf directories
find_path(HALCONFDIR halconf.h
${QMK_KEYBOARD_FOLDER}
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
)
target_include_directories(qmk PUBLIC ${HALCONFDIR})
# linker script
find_file(LDSCRIPT ${MCU_LDSCRIPT}.ld
${QMK_KEYBOARD_FOLDER}/ld
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/ld
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/ld
${STARTUPLD}
${STARTUPLD_CONTRIB}
)
get_filename_component(LDSCRIPT_PATH ${LDSCRIPT} DIRECTORY)
target_link_options(qmk PUBLIC
-T ${LDSCRIPT}
-L ${LDSCRIPT_PATH}
)
# os/hal/hal.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/hal/src/hal.c
${CHIBIOS}/os/hal/src/hal_st.c
${CHIBIOS}/os/hal/src/hal_buffers.c
${CHIBIOS}/os/hal/src/hal_queues.c
${CHIBIOS}/os/hal/src/hal_flash.c
${CHIBIOS}/os/hal/src/hal_mmcsd.c
${CHIBIOS}/os/hal/src/hal_adc.c
${CHIBIOS}/os/hal/src/hal_can.c
${CHIBIOS}/os/hal/src/hal_crypto.c
${CHIBIOS}/os/hal/src/hal_dac.c
${CHIBIOS}/os/hal/src/hal_efl.c
${CHIBIOS}/os/hal/src/hal_gpt.c
${CHIBIOS}/os/hal/src/hal_i2c.c
${CHIBIOS}/os/hal/src/hal_i2s.c
${CHIBIOS}/os/hal/src/hal_icu.c
${CHIBIOS}/os/hal/src/hal_mac.c
${CHIBIOS}/os/hal/src/hal_mmc_spi.c
${CHIBIOS}/os/hal/src/hal_pal.c
${CHIBIOS}/os/hal/src/hal_pwm.c
${CHIBIOS}/os/hal/src/hal_rtc.c
${CHIBIOS}/os/hal/src/hal_sdc.c
${CHIBIOS}/os/hal/src/hal_serial.c
${CHIBIOS}/os/hal/src/hal_serial_usb.c
${CHIBIOS}/os/hal/src/hal_sio.c
${CHIBIOS}/os/hal/src/hal_spi.c
${CHIBIOS}/os/hal/src/hal_trng.c
${CHIBIOS}/os/hal/src/hal_uart.c
${CHIBIOS}/os/hal/src/hal_usb.c
${CHIBIOS}/os/hal/src/hal_wdg.c
${CHIBIOS}/os/hal/src/hal_wspi.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/hal/include
)
# os/hal/osal/rt-nil/osal.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/hal/osal/rt-nil/osal.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/hal/osal/rt-nil
)
# os/rt/rt.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/rt/src/chsys.c
${CHIBIOS}/os/rt/src/chrfcu.c
${CHIBIOS}/os/rt/src/chdebug.c
${CHIBIOS}/os/rt/src/chtrace.c
${CHIBIOS}/os/rt/src/chvt.c
${CHIBIOS}/os/rt/src/chschd.c
${CHIBIOS}/os/rt/src/chinstances.c
${CHIBIOS}/os/rt/src/chthreads.c
${CHIBIOS}/os/rt/src/chsys.c
${CHIBIOS}/os/rt/src/chrfcu.c
${CHIBIOS}/os/rt/src/chdebug.c
${CHIBIOS}/os/rt/src/chtrace.c
${CHIBIOS}/os/rt/src/chvt.c
${CHIBIOS}/os/rt/src/chschd.c
${CHIBIOS}/os/rt/src/chinstances.c
${CHIBIOS}/os/rt/src/chthreads.c
${CHIBIOS}/os/rt/src/chtm.c
${CHIBIOS}/os/rt/src/chstats.c
${CHIBIOS}/os/rt/src/chregistry.c
${CHIBIOS}/os/rt/src/chsem.c
${CHIBIOS}/os/rt/src/chmtx.c
${CHIBIOS}/os/rt/src/chcond.c
${CHIBIOS}/os/rt/src/chevents.c
${CHIBIOS}/os/rt/src/chmsg.c
${CHIBIOS}/os/rt/src/chdynamic.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/rt/include
)
# os/oslib/oslib.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/oslib/src/chmboxes.c
${CHIBIOS}/os/oslib/src/chmemcore.c
${CHIBIOS}/os/oslib/src/chmemheaps.c
${CHIBIOS}/os/oslib/src/chmempools.c
${CHIBIOS}/os/oslib/src/chpipes.c
${CHIBIOS}/os/oslib/src/chobjcaches.c
${CHIBIOS}/os/oslib/src/chdelegates.c
${CHIBIOS}/os/oslib/src/chfactory.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/oslib/include
)
# os/hal/lib/streams/streams.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/hal/lib/streams/chprintf.c
${CHIBIOS}/os/hal/lib/streams/chscanf.c
${CHIBIOS}/os/hal/lib/streams/memstreams.c
${CHIBIOS}/os/hal/lib/streams/nullstreams.c
${CHIBIOS}/os/hal/lib/streams/bufstreams.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/hal/lib/streams
)
# resume platform.mk
target_sources(qmk PUBLIC
${CHIBIOS}/os/various/syscalls.c
)
target_include_directories(qmk PUBLIC
${CHIBIOS}/os/license
${CHIBIOS}/os/oslib/include
${CHIBIOS}/os/various
)
+27
View File
@@ -0,0 +1,27 @@
include(UpdateSubmodule)
update_submodule(lib/lufa)
set(LUFA_PATH ${CMAKE_SOURCE_DIR}/lib/lufa)
set(LUFA_ROOT_PATH ${LUFA_PATH}/LUFA)
target_sources(qmk PUBLIC
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBController_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBInterrupt_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/ConfigDescriptors.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/Events.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/USBTask.c
${LUFA_ROOT_PATH}/Drivers/USB/Class/Common/HIDParser.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Host_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Pipe_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/PipeStream_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/HostStandardReq.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Device_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Endpoint_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/EndpointStream_${ARCH}.c
${LUFA_ROOT_PATH}/Drivers/USB/Core/DeviceStandardReq.c
${LUFA_PATH}/LUFA/Drivers/USB/USB.h
)
target_include_directories(qmk PUBLIC ${LUFA_PATH})
# target_link_libraries(lufa ${QMK_TARGET})
# target_link_libraries(lufa tmk_core_protocol)
# target_link_libraries(lufa tmk_core_protocol_lufa)
+24
View File
@@ -0,0 +1,24 @@
message("Downloading gcc-arm-none-eabi")
if(WIN32)
file(DOWNLOAD
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip?rev=8f4a92e2ec2040f89912f372a55d8cf3&hash=8A9EAF77EF1957B779C59EADDBF2DAC118170BBF
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
EXPECTED_HASH MD5=2bc8f0c4c4659f8259c8176223eeafc1
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
)
elseif(UNIX)
file(DOWNLOAD
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2?rev=78196d3461ba4c9089a67b5f33edf82a&hash=D484B37FF37D6FC3597EBE2877FB666A41D5253B
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
EXPECTED_HASH MD5=3fe3d8bb693bd0a6e4615b6569443d0d
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
)
endif()
+24
View File
@@ -0,0 +1,24 @@
message("Downloading avr-gcc")
if(WIN32)
file(DOWNLOAD
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-windows.zip
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
EXPECTED_HASH SHA256=e921a964fdeaedbe963352d0f26c6520a0a3eb8effc6ff232f3824b06c4ea0e2
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
)
elseif(UNIX)
file(DOWNLOAD
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-linux.tar.bz2
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
EXPECTED_HASH SHA256=feb034f4b85237032da8bac1f03765af5ebc4a8939b69bed57ff31bc482ca1a6
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
)
endif()
+22
View File
@@ -0,0 +1,22 @@
message("Downloading dfu-programmer")
if(WIN32)
file(DOWNLOAD
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-x64-1.0.0.7z
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
)
elseif(UNIX)
file(DOWNLOAD
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-linux-1.0.0.7z
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
SHOW_PROGRESS
)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
)
endif()
+51
View File
@@ -0,0 +1,51 @@
cmake_minimum_required(VERSION 3.20)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(ResolveKeyboard)
include(ValidateJson)
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
set(CMAKE_MESSAGE_INDENT "")
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STR)
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
file(WRITE "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "")
if(${IS_KEYBOARDS_FOLDER})
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
file(GLOB KEYMAPS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/*/keymap.c")
foreach(KEYMAP ${KEYMAPS})
file(RELATIVE_PATH KEYMAP_C "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps" "${KEYMAP}")
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
# message(STATUS "${KEYMAP_FOLDER}")
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
endforeach()
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
endwhile()
else()
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keymap.c")
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymap.c" PARENT_SCOPE)
elseif(EXISTS "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c")
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
endif()
endif()
string(JSON COMMUNITY_LAYOUTS ERROR_VARIABLE NO_COMMUNITY_LAYOUTS GET ${JSON_STR} community_layouts)
if(${NO_COMMUNITY_LAYOUTS} STREQUAL "NOTFOUND")
string(JSON NUM_LAYOUTS LENGTH ${COMMUNITY_LAYOUTS})
math(EXPR MAX "${NUM_LAYOUTS} - 1")
foreach(IDX RANGE ${MAX})
string(JSON LAYOUT GET ${COMMUNITY_LAYOUTS} ${IDX})
file(GLOB KEYMAPS "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/*/keymap.c")
foreach(KEYMAP ${KEYMAPS})
file(RELATIVE_PATH KEYMAP_C "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}" "${KEYMAP}")
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
# message(STATUS "${KEYMAP_FOLDER}")
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
endforeach()
endforeach()
endif()
+64
View File
@@ -0,0 +1,64 @@
# Simple CMake utility to read variables from MK files
# - Gets contents from given file (name or path)
# - Parses the assignment statements
# - Makes the same assignments in the PARENT_SCOPE
if(POLICY CMP0007)
cmake_policy(SET CMP0007 NEW)
endif()
function(ParseHeader HeaderFile Prefix)
_ParseHeader(${HeaderFile} ${Prefix})
endfunction()
macro(_ParseHeader HeaderFile Prefix)
message(CHECK_START "Parsing Header")
list(APPEND CMAKE_MESSAGE_INDENT " ")
message(STATUS "Reading \"${HeaderFile}\"")
file(READ "${HeaderFile}" FileContents)
string(REGEX REPLACE "/\\*.*\\*/" "" FileContents ${FileContents})
# replace the \ newlines with spaces
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
# turn each line into an item in a list
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
list(REMOVE_ITEM FileLines "")
foreach(line ${FileLines})
# remove comments from the ends of each line
string(REGEX REPLACE "//.*" "" line ${line})
# remove now-empty lines
if("${line}" STREQUAL "")
continue()
endif()
# try to process includes, if the file exists
if(line MATCHES "^#include \"(.+)\"")
set(INCLUDED_HEADER ${CMAKE_MATCH_1})
if(EXISTS ${INCLUDED_HEADER})
_ParseHeader("${INCLUDED_HEADER}" ${Prefix})
else()
message(STATUS "Could not read ${INCLUDED_HEADER}")
endif()
continue()
endif()
# array
if(line MATCHES "#define ([A-Za-z0-9_]+) {(.*)}")
set(VARIABLE_NAME ${CMAKE_MATCH_1})
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
endif()
# regular variable
if(line MATCHES "#define ([A-Za-z0-9_]+) (.*)")
set(VARIABLE_NAME ${CMAKE_MATCH_1})
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
endif()
endforeach()
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "Complete")
endmacro()
+98
View File
@@ -0,0 +1,98 @@
# Simple CMake utility to read variables from MK files
# - Gets contents from given file (name or path)
# - Parses the assignment statements
# - Makes the same assignments in the PARENT_SCOPE
if(POLICY CMP0007)
cmake_policy(SET CMP0007 NEW)
endif()
function(ParseMakefile MKFile)
_ParseMakefile(${MKFile} ${ARGN})
endfunction()
macro(_ParseMakefile MKFile)
message(CHECK_START "Parsing Makefile")
list(APPEND CMAKE_MESSAGE_INDENT " ")
message(STATUS "Reading \"${MKFile}\"")
file(READ "${MKFile}" FileContents)
# replace the \ newlines with spaces
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
# turn each line into an item in a list
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
list(REMOVE_ITEM FileLines "")
foreach(line ${FileLines})
# remove comments from the ends of each line
string(REGEX REPLACE "#.*" "" line ${line})
# remove now-empty lines
if("${line}" STREQUAL "")
continue()
endif()
# try to process includes, if the file exists
if(line MATCHES "^-?include (.+)$")
set(MAKE_CHILD ${CMAKE_MATCH_1})
if(EXISTS ${MAKE_CHILD})
_ParseMakefile("${MAKE_CHILD}" ${ARGN})
else()
message(STATUS "Could not read ${MAKE_CHILD}")
endif()
continue()
endif()
# turn the assignment into a list with the first item being the variable name
string(REPLACE "=" ";" line_split ${line})
list(LENGTH line_split count)
if(count LESS 2)
message(STATUS "Skipping ${line}")
continue()
endif()
list(GET line_split -1 value)
string(STRIP ${value} value)
# separate_arguments(value)
# string(REPLACE " " ";" value ${value})
list(REMOVE_AT line_split -1)
foreach(var_name ${line_split})
string(STRIP ${var_name} var_name)
# replace $(?) with the variable ? from cmake
if(value MATCHES "\\$\\(([^\\(\\)]+)\\)")
set(MAKE_VARIABLE "${CMAKE_MATCH_1}")
string(REPLACE "$(${MAKE_VARIABLE})" "${${MAKE_VARIABLE}}" value ${value})
endif()
# look for +, assuming it used to be +=
if(${var_name} MATCHES "([^ \\+]+) *\\+")
message(STATUS "Appending \"${CMAKE_MATCH_1}\" with \"${value}\"")
# read parent variable in local & append
set(LOCAL_${CMAKE_MATCH_1} ${CMAKE_MATCH_1})
# APPEND accepts spaces between values
list(APPEND LOCAL_${CMAKE_MATCH_1} ${value})
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}})
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}} PARENT_SCOPE)
else()
# set needs ; between elements to be considered a list
string(REGEX REPLACE " +" ";" value ${value})
# try to find variable in cache and FORCE wtih INTERNAL if it exists
if(DEFINED CACHE${${var_name}})
message(STATUS "Caching \"${var_name}\" to \"${value}\"")
# set locally so replacement still work
set(${var_name} ${value})
set(${var_name} ${value} CACHE INTERNAL "")
else()
message(STATUS "Setting \"${var_name}\" to \"${value}\"")
set(${var_name} ${value})
set(${var_name} ${value} PARENT_SCOPE)
endif()
endif()
endforeach()
endforeach()
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "Complete")
endmacro()
+78
View File
@@ -0,0 +1,78 @@
include(ParseMakefile)
include(Utils)
macro(process_keyboard)
message(CHECK_START "Processing keyboard")
list(APPEND CMAKE_MESSAGE_INDENT " ")
validate_json(${QMK_KEYBOARD_FOLDER_ABS}/info.json keyboard QMK_KEYBOARD_INFO_JSON_STRING)
# process rules from info.json
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_rules.hjson JSON_STRING)
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
math(EXPR MAX "${MAPPING_LENGTH} - 1")
foreach(IDX RANGE ${MAX})
string(JSON RULE_KEY MEMBER ${JSON_STRING} ${IDX})
# string(JSON INFO_KEY GET ${JSON_STRING} ${RULE_KEY} info_key)
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${RULE_KEY} info_key)
string(REPLACE "." " " INFO_KEYS ${INFO_KEY})
string(JSON RULE_VALUE ERROR_VARIABLE RULE_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
if(${RULE_KEY_NOT_FOUND} STREQUAL "NOTFOUND")
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${RULE_KEY} value_type)
if(${VALUE_TYPE} STREQUAL "list")
string(JSON NUM_VALUES LENGTH ${RULE_VALUE})
math(EXPR MAX "${NUM_VALUES} - 1")
foreach(IDX RANGE ${MAX})
string(JSON VALUE GET ${RULE_VALUE} ${IDX})
list(APPEND ${RULE_KEY} ${VALUE})
endforeach()
message(STATUS "Found rule '${INFO_KEY}': '${${RULE_KEY}}' assigned to '${RULE_KEY}'")
else()
set(${RULE_KEY} ${RULE_VALUE})
message(STATUS "Found rule '${INFO_KEY}': '${RULE_VALUE}' assigned to '${RULE_KEY}'")
endif()
endif()
endforeach()
# process definitions from info.json
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_config.hjson JSON_STRING)
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
math(EXPR MAX "${MAPPING_LENGTH} - 1")
foreach(IDX RANGE ${MAX})
string(JSON CONFIG_KEY MEMBER ${JSON_STRING} ${IDX})
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${CONFIG_KEY} info_key)
string(REPLACE "." ";" INFO_KEYS ${INFO_KEY})
# string(JSON CONFIG_VALUE ERROR_VARIABLE CONFIG_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
json_get_with_default(CONFIG_VALUE ${QMK_KEYBOARD_INFO_JSON_STRING} NOTFOUND ${INFO_KEYS})
if(NOT CONFIG_VALUE STREQUAL "NOTFOUND")
set(${CONFIG_KEY} ${CONFIG_VALUE})
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${CONFIG_KEY} value_type)
if(${VALUE_TYPE} STREQUAL "str")
add_compile_definitions(${CONFIG_KEY}="${CONFIG_VALUE}")
message(STATUS "Found definition '${INFO_KEY}': '\"${CONFIG_VALUE}\"' assigned to '${CONFIG_KEY}'")
elseif(${VALUE_TYPE} STREQUAL "bcd_version")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSION_MATCH ${CONFIG_VALUE})
set(VERSION_MAJOR ${CMAKE_MATCH_1})
set(VERSION_MINOR ${CMAKE_MATCH_2})
set(VERSION_PATCH ${CMAKE_MATCH_3})
math(EXPR BCD_VERSION "${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}" OUTPUT_FORMAT HEXADECIMAL)
add_compile_definitions(${CONFIG_KEY}=${BCD_VERSION})
message(STATUS "Found definition '${INFO_KEY}': '${BCD_VERSION}' assigned to '${CONFIG_KEY}'")
else()
add_compile_definitions(${CONFIG_KEY}=${CONFIG_VALUE})
message(STATUS "Found definition '${INFO_KEY}': '${CONFIG_VALUE}' assigned to '${CONFIG_KEY}'")
endif()
endif()
endforeach()
string(JSON KEYBOARD_NAME GET ${QMK_KEYBOARD_INFO_JSON_STRING} keyboard_name)
string(JSON MANUFACTURER GET ${QMK_KEYBOARD_INFO_JSON_STRING} manufacturer)
string(JSON URL GET ${QMK_KEYBOARD_INFO_JSON_STRING} url)
string(JSON QMK_MCU GET ${QMK_KEYBOARD_INFO_JSON_STRING} processor)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "info.json validated and loaded")
ParseMakefile(${QMK_KEYBOARD_FOLDER_ABS}/rules.mk)
endmacro()

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