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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Makefile 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Target file name (without extension).
  2. PROJECT = ch
  3. # Directory common source files exist
  4. TMK_DIR = ../../tmk_core
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR = .
  7. # project specific files
  8. SRC = matrix.c \
  9. keymap_common.c \
  10. led.c
  11. ifdef KEYMAP
  12. SRC := keymap_$(KEYMAP).c $(SRC)
  13. else
  14. SRC := keymap_plain.c $(SRC)
  15. endif
  16. CONFIG_H = config.h
  17. ## chip/board settings
  18. # - the next two should match the directories in
  19. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  20. # - For Teensies, FAMILY = KINETIS and SERIES is either
  21. # KL2x (LC) or K20x (3.0,3.1,3.2).
  22. # - For Infinity KB, SERIES = K20x
  23. MCU_FAMILY = KINETIS
  24. MCU_SERIES = K20x
  25. # Linker script to use
  26. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  27. # or <this_dir>/ld/
  28. # - NOTE: a custom ld script is needed for EEPROM on Teensy LC
  29. # - LDSCRIPT =
  30. # - MKL26Z64 for Teensy LC
  31. # - MK20DX128 for Teensy 3.0
  32. # - MK20DX256 for Teensy 3.1 and 3.2
  33. # - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
  34. MCU_LDSCRIPT = MK20DX128BLDR4
  35. # Startup code to use
  36. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  37. # - STARTUP =
  38. # - kl2x for Teensy LC
  39. # - k20x5 for Teensy 3.0 and Infinity KB
  40. # - k20x7 for Teensy 3.1 and 3.2
  41. MCU_STARTUP = k20x5
  42. # Board: it should exist either in <chibios>/os/hal/boards/
  43. # or <this_dir>/boards
  44. # - BOARD =
  45. # - PJRC_TEENSY_LC for Teensy LC
  46. # - PJRC_TEENSY_3 for Teensy 3.0
  47. # - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
  48. # - MCHCK_K20 for Infinity KB
  49. BOARD = MCHCK_K20
  50. # Cortex version
  51. # Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
  52. MCU = cortex-m4
  53. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  54. # I.e. 6 for Teensy LC; 7 for Teensy 3.x
  55. ARMV = 7
  56. # Vector table for application
  57. # 0x00000000-0x00001000 area is occupied by bootlaoder.*/
  58. # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
  59. OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
  60. # Build Options
  61. # comment out to disable the options.
  62. #
  63. BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
  64. ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
  65. MOUSEKEY_ENABLE = yes # Mouse keys
  66. EXTRAKEY_ENABLE = yes # Audio control and System control
  67. CONSOLE_ENABLE = yes # Console for debug
  68. COMMAND_ENABLE = yes # Commands for debug and configuration
  69. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
  70. NKRO_ENABLE = yes # USB Nkey Rollover
  71. include $(TMK_DIR)/tool/chibios/common.mk
  72. include $(TMK_DIR)/tool/chibios/chibios.mk
  73. program: $(BUILDDIR)/$(PROJECT).bin
  74. dfu-util -D $(BUILDDIR)/$(PROJECT).bin