Peter's keyboard firmware (QMK) https://qmk.fm/
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.

bootloader.mk 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright 2017 Jack Humbert
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # If it's possible that multiple bootloaders can be used for one project,
  16. # you can leave this unset, and the correct size will be selected
  17. # automatically.
  18. #
  19. # Sets the bootloader defined in the keyboard's/keymap's rules.mk
  20. # Current options:
  21. # atmel-dfu
  22. # lufa-dfu
  23. # qmk-dfu
  24. # halfkay
  25. # caterina
  26. # bootloadHID
  27. #
  28. # BOOTLOADER_SIZE can still be defined manually, but it's recommended
  29. # you add any possible configuration to this list
  30. ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
  31. OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
  32. OPT_DEFS += -DBOOTLOADER_DFU
  33. ifeq ($(strip $(MCU)), atmega32u4)
  34. BOOTLOADER_SIZE = 4096
  35. endif
  36. ifeq ($(strip $(MCU)), at90usb1286)
  37. BOOTLOADER_SIZE = 8192
  38. endif
  39. endif
  40. ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
  41. OPT_DEFS += -DBOOTLOADER_LUFA_DFU
  42. OPT_DEFS += -DBOOTLOADER_DFU
  43. ifeq ($(strip $(MCU)), atmega32u4)
  44. BOOTLOADER_SIZE = 4096
  45. endif
  46. ifeq ($(strip $(MCU)), at90usb1286)
  47. BOOTLOADER_SIZE = 8192
  48. endif
  49. endif
  50. ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
  51. OPT_DEFS += -DBOOTLOADER_QMK_DFU
  52. OPT_DEFS += -DBOOTLOADER_DFU
  53. ifeq ($(strip $(MCU)), atmega32u4)
  54. BOOTLOADER_SIZE = 4096
  55. endif
  56. ifeq ($(strip $(MCU)), at90usb1286)
  57. BOOTLOADER_SIZE = 8192
  58. endif
  59. endif
  60. ifeq ($(strip $(BOOTLOADER)), halfkay)
  61. OPT_DEFS += -DBOOTLOADER_HALFKAY
  62. ifeq ($(strip $(MCU)), atmega32u4)
  63. BOOTLOADER_SIZE = 512
  64. endif
  65. ifeq ($(strip $(MCU)), at90usb1286)
  66. BOOTLOADER_SIZE = 1024
  67. endif
  68. endif
  69. ifeq ($(strip $(BOOTLOADER)), caterina)
  70. OPT_DEFS += -DBOOTLOADER_CATERINA
  71. BOOTLOADER_SIZE = 4096
  72. endif
  73. ifeq ($(strip $(BOOTLOADER)), bootloadHID)
  74. OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
  75. BOOTLOADER_SIZE = 4096
  76. endif
  77. ifdef BOOTLOADER_SIZE
  78. OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
  79. endif