You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

455 lines
15 KiB

Massdrop keyboard support (#3780) * Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
5 years ago
Massdrop keyboard support (#3780) * Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
5 years ago
Change split_common to use RGBLIGHT_SPLIT (#5509) * add I2C_slave_buffer_t to quantum/split_common/transport.c Improvements to ease the maintenance of the I2C slave buffer layout. And this commit does not change the compilation results. * add temporary pdhelix(Patched Helix) code * temporary cherry-pick from #5020 add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * add post_config.h support to build_keyboard.mk * add quantum/rgblight_post_config.h, quantum/split_common/post_config.h Add quantum/rgblight_post_config.h and quantum/split_common/post_config.h using POST_CONFIG_H variable of build_keyboard.mk. quantum/rgblight_post_config.h additionally defines RGBLIGHT_SPLIT if RGBLED_SPIT is defined. quantum/split_common/post_config.h defines RGBLIGHT_SPLIT additionally when master-slave communication is I2C. * Change split_common's transport.c I2C to use the synchronization feature of rgblight.c * Change split_common's transport.c serial to use the synchronization feature of rgblight.c * test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix * Test End Revert "test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix" This reverts commit 80118a6bbd3d9fc4c7797fef0c34bc67aa73aa98. [x] make RGBLIGHT_TEST=1 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/i2c:default (same RGBLIGHT_TEST=3) [x] make RGBLIGHT_TEST=3 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2_2oled:default * Test End, Revert "temporary cherry-pick from #5020" This reverts commit d35069f68bda0c50370442a5c7aae60c2f4ce5c0. * Test End, Revert "add temporary pdhelix(Patched Helix) code" This reverts commit aebddfc1a879796afae297ef0723a4fe73af3660. * temporarily cherry-pick from #5020 to see if it passes the travis-ci test. add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * Passed the travis-ci test. Revert "temporarily cherry-pick from #5020 to see if it passes the travis-ci test." This reverts commit 647c0a9755eb6a05f76d09b2d59bce67b85a841f. * update docs/config_options.md * update split_common/transport.c, improves maintainability of serial transaction IDs. No change in build result. * temporary cherry-pick from #5020 * fix build fail keebio/iris/rev3:default * fix build fail lets_split_eh/eh:default * Revert "temporary cherry-pick from #5020" This reverts commit be48ca1b4515366a097af8dd1cd7b28b7ee09947. * temporary cherry-pick from #5020 (0.6.336) * Revert "temporary cherry-pick from #5020 (0.6.336)" This reverts commit 978d26a8b3cf0acc485838a7d76d6128b77c630c. * temporary cherry-pick from #5020 (0.6.336)
5 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
Massdrop keyboard support (#3780) * Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
5 years ago
Massdrop keyboard support (#3780) * Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
5 years ago
Merge ChibiOS and LUFA descriptor support (#2362) * Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude
6 years ago
Change split_common to use RGBLIGHT_SPLIT (#5509) * add I2C_slave_buffer_t to quantum/split_common/transport.c Improvements to ease the maintenance of the I2C slave buffer layout. And this commit does not change the compilation results. * add temporary pdhelix(Patched Helix) code * temporary cherry-pick from #5020 add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * add post_config.h support to build_keyboard.mk * add quantum/rgblight_post_config.h, quantum/split_common/post_config.h Add quantum/rgblight_post_config.h and quantum/split_common/post_config.h using POST_CONFIG_H variable of build_keyboard.mk. quantum/rgblight_post_config.h additionally defines RGBLIGHT_SPLIT if RGBLED_SPIT is defined. quantum/split_common/post_config.h defines RGBLIGHT_SPLIT additionally when master-slave communication is I2C. * Change split_common's transport.c I2C to use the synchronization feature of rgblight.c * Change split_common's transport.c serial to use the synchronization feature of rgblight.c * test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix * Test End Revert "test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix" This reverts commit 80118a6bbd3d9fc4c7797fef0c34bc67aa73aa98. [x] make RGBLIGHT_TEST=1 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/i2c:default (same RGBLIGHT_TEST=3) [x] make RGBLIGHT_TEST=3 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2_2oled:default * Test End, Revert "temporary cherry-pick from #5020" This reverts commit d35069f68bda0c50370442a5c7aae60c2f4ce5c0. * Test End, Revert "add temporary pdhelix(Patched Helix) code" This reverts commit aebddfc1a879796afae297ef0723a4fe73af3660. * temporarily cherry-pick from #5020 to see if it passes the travis-ci test. add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * Passed the travis-ci test. Revert "temporarily cherry-pick from #5020 to see if it passes the travis-ci test." This reverts commit 647c0a9755eb6a05f76d09b2d59bce67b85a841f. * update docs/config_options.md * update split_common/transport.c, improves maintainability of serial transaction IDs. No change in build result. * temporary cherry-pick from #5020 * fix build fail keebio/iris/rev3:default * fix build fail lets_split_eh/eh:default * Revert "temporary cherry-pick from #5020" This reverts commit be48ca1b4515366a097af8dd1cd7b28b7ee09947. * temporary cherry-pick from #5020 (0.6.336) * Revert "temporary cherry-pick from #5020 (0.6.336)" This reverts commit 978d26a8b3cf0acc485838a7d76d6128b77c630c. * temporary cherry-pick from #5020 (0.6.336)
5 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
Add target 'check-md5' to `build_keyboard.mk` (#11338) * Add target 'build-for-compare' to `build_keyboard.mk` The `build-for-compare` target provides an easy way to check the md5 checksum of the generated binary. You can easily see if there is any change in the generated binaries between the two versions, as in the example below. ``` $ git checkout 0.11.0 M build_keyboard.mk M tmk_core/rules.mk Note: checking out '0.11.0'. HEAD is now at c66df1664 2020 November 28 Breaking Changes Update (#11053) $ make helix:all:build-for-compare | grep ^MD5 MD5 (.build/helix_rev2_default.hex) = 5c3606562c944bb4d18832e601b45d4a MD5 (.build/helix_rev2_edvorakjp.hex) = 9e43d13d389d518ba7e99cd7337e28d6 MD5 (.build/helix_rev2_five_rows.hex) = 8bcb61c2fd5d237c2997f2fa007d4934 MD5 (.build/helix_rev2_five_rows_jis.hex) = b97cd818d52f73ca2d4e78c86d90a791 MD5 (.build/helix_rev2_froggy.hex) = c492172364188f4e2918b10bf0f3a0a6 MD5 (.build/helix_rev2_froggy_106.hex) = b0861fd735a8f81881a8c02730641a2b MD5 (.build/helix_rev2_led_test.hex) = 5c97d982a5da5cfb3dacb28a8934b81d MD5 (.build/helix_rev2_xulkal.hex) = 01f603dc46bcf9094d7e106831d8f5b1 MD5 (.build/helix_rev2_yshrsmz.hex) = 5a008bca2d0c5790a151c02834c529ba $ git checkout 0.11.1 M build_keyboard.mk M tmk_core/rules.mk Previous HEAD position was c66df1664 2020 November 28 Breaking Changes Update (#11053) HEAD is now at cc08e3082 nix-shell: add milc dependency (#11086) $ make helix:all:build-for-compare | grep ^MD5 MD5 (.build/helix_rev2_default.hex) = 5c3606562c944bb4d18832e601b45d4a MD5 (.build/helix_rev2_edvorakjp.hex) = 9e43d13d389d518ba7e99cd7337e28d6 MD5 (.build/helix_rev2_five_rows.hex) = 8bcb61c2fd5d237c2997f2fa007d4934 MD5 (.build/helix_rev2_five_rows_jis.hex) = b97cd818d52f73ca2d4e78c86d90a791 MD5 (.build/helix_rev2_froggy.hex) = c492172364188f4e2918b10bf0f3a0a6 MD5 (.build/helix_rev2_froggy_106.hex) = b0861fd735a8f81881a8c02730641a2b MD5 (.build/helix_rev2_led_test.hex) = 5c97d982a5da5cfb3dacb28a8934b81d MD5 (.build/helix_rev2_xulkal.hex) = d848383adfd7463b138c6da179cf1436 MD5 (.build/helix_rev2_yshrsmz.hex) = 5a008bca2d0c5790a151c02834c529ba ``` * make builds reproducable by default * update build_keyboard.mk: remove 'build-for-compare' target * GNU make (3.81) on macOS 10.14(Mojave) does not have the 'undefine' directive. * Adopted fauxpark's suggestion. * Update tmk_core/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * update tmk_core/rules.mk * fix tmk_core/rules.mk Co-authored-by: Zach White <skullydazed@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
3 years ago
  1. # Determine what keyboard we are building and setup the build environment.
  2. #
  3. # We support folders up to 5 levels deep below `keyboards/`. This file is
  4. # responsible for determining which folder is being used and doing the
  5. # corresponding environment setup.
  6. ifndef VERBOSE
  7. .SILENT:
  8. endif
  9. .DEFAULT_GOAL := all
  10. include common.mk
  11. # Set the qmk cli to use
  12. QMK_BIN ?= qmk
  13. # Set the filename for the final firmware binary
  14. KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
  15. TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
  16. KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
  17. # Force expansion
  18. TARGET := $(TARGET)
  19. ifneq ($(FORCE_LAYOUT),)
  20. TARGET := $(TARGET)_$(FORCE_LAYOUT)
  21. endif
  22. # Object files and generated keymap directory
  23. # To put object files in current directory, use a dot (.), do NOT make
  24. # this an empty or blank macro!
  25. KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
  26. # For split boards we need to set a master half.
  27. MASTER ?= left
  28. ifdef master
  29. MASTER = $(master)
  30. endif
  31. ifeq ($(MASTER),right)
  32. OPT_DEFS += -DMASTER_IS_ON_RIGHT
  33. else
  34. ifneq ($(MASTER),left)
  35. $(error MASTER does not have a valid value(left/right))
  36. endif
  37. endif
  38. ifdef SKIP_VERSION
  39. OPT_DEFS += -DSKIP_VERSION
  40. endif
  41. # Determine which subfolders exist.
  42. KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
  43. KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
  44. KEYBOARD_FOLDER_PATH_3 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_2)))
  45. KEYBOARD_FOLDER_PATH_4 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_3)))
  46. KEYBOARD_FOLDER_PATH_5 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_4)))
  47. KEYBOARD_FOLDER_1 := $(notdir $(KEYBOARD_FOLDER_PATH_1))
  48. KEYBOARD_FOLDER_2 := $(notdir $(KEYBOARD_FOLDER_PATH_2))
  49. KEYBOARD_FOLDER_3 := $(notdir $(KEYBOARD_FOLDER_PATH_3))
  50. KEYBOARD_FOLDER_4 := $(notdir $(KEYBOARD_FOLDER_PATH_4))
  51. KEYBOARD_FOLDER_5 := $(notdir $(KEYBOARD_FOLDER_PATH_5))
  52. KEYBOARD_PATHS :=
  53. KEYBOARD_PATH_1 := keyboards/$(KEYBOARD_FOLDER_PATH_1)
  54. KEYBOARD_PATH_2 := keyboards/$(KEYBOARD_FOLDER_PATH_2)
  55. KEYBOARD_PATH_3 := keyboards/$(KEYBOARD_FOLDER_PATH_3)
  56. KEYBOARD_PATH_4 := keyboards/$(KEYBOARD_FOLDER_PATH_4)
  57. KEYBOARD_PATH_5 := keyboards/$(KEYBOARD_FOLDER_PATH_5)
  58. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/)","")
  59. KEYBOARD_PATHS += $(KEYBOARD_PATH_5)
  60. endif
  61. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/)","")
  62. KEYBOARD_PATHS += $(KEYBOARD_PATH_4)
  63. endif
  64. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/)","")
  65. KEYBOARD_PATHS += $(KEYBOARD_PATH_3)
  66. endif
  67. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/)","")
  68. KEYBOARD_PATHS += $(KEYBOARD_PATH_2)
  69. endif
  70. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/)","")
  71. KEYBOARD_PATHS += $(KEYBOARD_PATH_1)
  72. endif
  73. # Pull in rules.mk files from all our subfolders
  74. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","")
  75. include $(KEYBOARD_PATH_5)/rules.mk
  76. endif
  77. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/rules.mk)","")
  78. include $(KEYBOARD_PATH_4)/rules.mk
  79. endif
  80. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/rules.mk)","")
  81. include $(KEYBOARD_PATH_3)/rules.mk
  82. endif
  83. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/rules.mk)","")
  84. include $(KEYBOARD_PATH_2)/rules.mk
  85. endif
  86. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","")
  87. include $(KEYBOARD_PATH_1)/rules.mk
  88. endif
  89. MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP)
  90. MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP)
  91. MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
  92. MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
  93. MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
  94. # Pull in rules from info.json
  95. INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
  96. include $(INFO_RULES_MK)
  97. # Check for keymap.json first, so we can regenerate keymap.c
  98. include build_json.mk
  99. ifeq ("$(wildcard $(KEYMAP_PATH))", "")
  100. # Look through the possible keymap folders until we find a matching keymap.c
  101. ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
  102. -include $(MAIN_KEYMAP_PATH_5)/rules.mk
  103. KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
  104. KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
  105. else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
  106. -include $(MAIN_KEYMAP_PATH_4)/rules.mk
  107. KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
  108. KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
  109. else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
  110. -include $(MAIN_KEYMAP_PATH_3)/rules.mk
  111. KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
  112. KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
  113. else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
  114. -include $(MAIN_KEYMAP_PATH_2)/rules.mk
  115. KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
  116. KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
  117. else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
  118. -include $(MAIN_KEYMAP_PATH_1)/rules.mk
  119. KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
  120. KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
  121. else ifneq ($(LAYOUTS),)
  122. # If we haven't found a keymap yet fall back to community layouts
  123. include build_layout.mk
  124. else
  125. $(error Could not find keymap)
  126. # this state should never be reached
  127. endif
  128. endif
  129. # Have we found a keymap.json?
  130. ifneq ("$(wildcard $(KEYMAP_JSON))", "")
  131. KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
  132. KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h
  133. # Load the keymap-level rules.mk if exists
  134. -include $(KEYMAP_PATH)/rules.mk
  135. # Load any rules.mk content from keymap.json
  136. INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk)
  137. include $(INFO_RULES_MK)
  138. # Add rules to generate the keymap files - indentation here is important
  139. $(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
  140. $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
  141. $(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
  142. $(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)
  143. generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
  144. endif
  145. ifeq ($(strip $(CTPC)), yes)
  146. CONVERT_TO_PROTON_C=yes
  147. endif
  148. ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
  149. include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk
  150. endif
  151. include quantum/mcu_selection.mk
  152. # Find all the C source files to be compiled in subfolders.
  153. KEYBOARD_SRC :=
  154. KEYBOARD_C_1 := $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).c
  155. KEYBOARD_C_2 := $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).c
  156. KEYBOARD_C_3 := $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).c
  157. KEYBOARD_C_4 := $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).c
  158. KEYBOARD_C_5 := $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).c
  159. ifneq ("$(wildcard $(KEYBOARD_C_5))","")
  160. KEYBOARD_SRC += $(KEYBOARD_C_5)
  161. endif
  162. ifneq ("$(wildcard $(KEYBOARD_C_4))","")
  163. KEYBOARD_SRC += $(KEYBOARD_C_4)
  164. endif
  165. ifneq ("$(wildcard $(KEYBOARD_C_3))","")
  166. KEYBOARD_SRC += $(KEYBOARD_C_3)
  167. endif
  168. ifneq ("$(wildcard $(KEYBOARD_C_2))","")
  169. KEYBOARD_SRC += $(KEYBOARD_C_2)
  170. endif
  171. ifneq ("$(wildcard $(KEYBOARD_C_1))","")
  172. KEYBOARD_SRC += $(KEYBOARD_C_1)
  173. endif
  174. # Generate KEYBOARD_name_subname for all levels of the keyboard folder
  175. KEYBOARD_FILESAFE_1 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_1)))
  176. KEYBOARD_FILESAFE_2 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_2)))
  177. KEYBOARD_FILESAFE_3 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_3)))
  178. KEYBOARD_FILESAFE_4 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_4)))
  179. KEYBOARD_FILESAFE_5 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_5)))
  180. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/)","")
  181. OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_5)
  182. endif
  183. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/)","")
  184. OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_4)
  185. endif
  186. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/)","")
  187. OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_3)
  188. endif
  189. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/)","")
  190. OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_2)
  191. endif
  192. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/)","")
  193. OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_1)
  194. endif
  195. # Setup the define for QMK_KEYBOARD_H. This is used inside of keymaps so
  196. # that the same keymap may be used on multiple keyboards.
  197. #
  198. # We grab the most top-level include file that we can. That file should
  199. # use #ifdef statements to include all the neccesary subfolder includes,
  200. # as described here:
  201. #
  202. # https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic
  203. #
  204. QMK_KEYBOARD_H = $(KEYBOARD_OUTPUT)/src/default_keyboard.h
  205. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
  206. QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
  207. endif
  208. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","")
  209. QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h
  210. endif
  211. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","")
  212. QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h
  213. endif
  214. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","")
  215. QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h
  216. endif
  217. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
  218. QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
  219. endif
  220. # Determine and set parameters based on the keyboard's processor family.
  221. # We can assume a ChibiOS target When MCU_FAMILY is defined since it's
  222. # not used for LUFA
  223. ifdef MCU_FAMILY
  224. PLATFORM=CHIBIOS
  225. PLATFORM_KEY=chibios
  226. FIRMWARE_FORMAT?=bin
  227. OPT_DEFS += -DMCU_$(MCU_FAMILY)
  228. else ifdef ARM_ATSAM
  229. PLATFORM=ARM_ATSAM
  230. PLATFORM_KEY=arm_atsam
  231. FIRMWARE_FORMAT=bin
  232. else
  233. PLATFORM=AVR
  234. PLATFORM_KEY=avr
  235. FIRMWARE_FORMAT?=hex
  236. endif
  237. # Find all of the config.h files and add them to our CONFIG_H define.
  238. CONFIG_H :=
  239. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
  240. CONFIG_H += $(KEYBOARD_PATH_5)/config.h
  241. endif
  242. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/config.h)","")
  243. CONFIG_H += $(KEYBOARD_PATH_4)/config.h
  244. endif
  245. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/config.h)","")
  246. CONFIG_H += $(KEYBOARD_PATH_3)/config.h
  247. endif
  248. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/config.h)","")
  249. CONFIG_H += $(KEYBOARD_PATH_2)/config.h
  250. endif
  251. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/config.h)","")
  252. CONFIG_H += $(KEYBOARD_PATH_1)/config.h
  253. endif
  254. POST_CONFIG_H :=
  255. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_config.h)","")
  256. POST_CONFIG_H += $(KEYBOARD_PATH_1)/post_config.h
  257. endif
  258. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_config.h)","")
  259. POST_CONFIG_H += $(KEYBOARD_PATH_2)/post_config.h
  260. endif
  261. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_config.h)","")
  262. POST_CONFIG_H += $(KEYBOARD_PATH_3)/post_config.h
  263. endif
  264. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_config.h)","")
  265. POST_CONFIG_H += $(KEYBOARD_PATH_4)/post_config.h
  266. endif
  267. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
  268. POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
  269. endif
  270. # Pull in stuff from info.json
  271. INFO_JSON_FILES :=
  272. ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","")
  273. INFO_JSON_FILES += $(KEYBOARD_PATH_1)/info.json
  274. endif
  275. ifneq ("$(wildcard $(KEYBOARD_PATH_2)/info.json)","")
  276. INFO_JSON_FILES += $(KEYBOARD_PATH_2)/info.json
  277. endif
  278. ifneq ("$(wildcard $(KEYBOARD_PATH_3)/info.json)","")
  279. INFO_JSON_FILES += $(KEYBOARD_PATH_3)/info.json
  280. endif
  281. ifneq ("$(wildcard $(KEYBOARD_PATH_4)/info.json)","")
  282. INFO_JSON_FILES += $(KEYBOARD_PATH_4)/info.json
  283. endif
  284. ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
  285. INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json
  286. endif
  287. CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
  288. $(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
  289. $(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
  290. $(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
  291. $(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h
  292. $(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
  293. $(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
  294. generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
  295. .INTERMEDIATE : generated-files
  296. # Userspace setup and definitions
  297. ifeq ("$(USER_NAME)","")
  298. USER_NAME := $(KEYMAP)
  299. endif
  300. USER_PATH := users/$(USER_NAME)
  301. -include $(USER_PATH)/rules.mk
  302. ifneq ("$(wildcard $(USER_PATH)/config.h)","")
  303. CONFIG_H += $(USER_PATH)/config.h
  304. endif
  305. ifneq ("$(wildcard $(USER_PATH)/post_config.h)","")
  306. POST_CONFIG_H += $(USER_PATH)/post_config.h
  307. endif
  308. # Disable features that a keyboard doesn't support
  309. -include disable_features.mk
  310. ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
  311. CONFIG_H += $(KEYMAP_PATH)/config.h
  312. endif
  313. ifneq ("$(KEYMAP_H)","")
  314. CONFIG_H += $(KEYMAP_H)
  315. endif
  316. # project specific files
  317. SRC += \
  318. $(KEYBOARD_SRC) \
  319. $(KEYMAP_C) \
  320. $(QUANTUM_SRC) \
  321. $(QUANTUM_DIR)/main.c \
  322. # Optimize size but this may cause error "relocation truncated to fit"
  323. #EXTRALDFLAGS = -Wl,--relax
  324. # Search Path
  325. VPATH += $(KEYMAP_PATH)
  326. VPATH += $(USER_PATH)
  327. VPATH += $(KEYBOARD_PATHS)
  328. VPATH += $(COMMON_VPATH)
  329. include common_features.mk
  330. include $(TMK_PATH)/protocol.mk
  331. include $(TMK_PATH)/common.mk
  332. include bootloader.mk
  333. SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
  334. SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
  335. SRC += $(TMK_COMMON_SRC)
  336. OPT_DEFS += $(TMK_COMMON_DEFS)
  337. EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
  338. SKIP_COMPILE := no
  339. ifneq ($(REQUIRE_PLATFORM_KEY),)
  340. ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
  341. SKIP_COMPILE := yes
  342. endif
  343. endif
  344. include $(TMK_PATH)/$(PLATFORM_KEY).mk
  345. ifneq ($(strip $(PROTOCOL)),)
  346. include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
  347. else
  348. include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
  349. endif
  350. -include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk
  351. # TODO: remove this bodge?
  352. PROJECT_DEFS := $(OPT_DEFS)
  353. PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
  354. PROJECT_CONFIG := $(CONFIG_H)
  355. ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
  356. VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
  357. VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
  358. include $(VISUALIZER_PATH)/visualizer.mk
  359. endif
  360. CONFIG_H += $(POST_CONFIG_H)
  361. ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
  362. OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
  363. $(KEYMAP_OUTPUT)_SRC := $(SRC)
  364. $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
  365. -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \
  366. -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
  367. -DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H
  368. $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
  369. $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
  370. $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC)
  371. $(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS)
  372. $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
  373. $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
  374. # Default target.
  375. ifeq ($(SKIP_COMPILE),no)
  376. all: build check-size
  377. else
  378. all:
  379. echo "skipped" >&2
  380. endif
  381. build: elf cpfirmware
  382. check-size: build
  383. check-md5: build
  384. objs-size: build
  385. include show_options.mk
  386. include $(TMK_PATH)/rules.mk
  387. # Ensure we have generated files available for each of the objects
  388. define GEN_FILES
  389. $1: generated-files
  390. endef
  391. $(foreach O,$(OBJ),$(eval $(call GEN_FILES,$(patsubst %.a,%.o,$(O)))))