rules.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #CFLAGS=-D ASTAR
  2. ifdef ASTAR
  3. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  4. MCU = atmega32u4
  5. OPT_DEFS += -DCATERINA_BOOTLOADER
  6. SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
  7. avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
  8. else
  9. MCU = at90usb1286
  10. OPT_DEFS += -DBOOTLOADER_SIZE=2048
  11. SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
  12. endif
  13. F_CPU = 16000000
  14. ARCH = AVR8
  15. F_USB = $(F_CPU)
  16. # Interrupt driven control endpoint task(+60)
  17. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  18. #
  19. BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
  20. MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
  21. EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
  22. CONSOLE_ENABLE ?= yes # Console for debug(+400)
  23. COMMAND_ENABLE ?= yes # Commands for debug and configuration
  24. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
  25. SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
  26. # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  27. NKRO_ENABLE ?= no # USB Nkey Rollover
  28. BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
  29. MIDI_ENABLE ?= no # MIDI controls
  30. UNICODE_ENABLE ?= no # Unicode
  31. BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
  32. AUDIO_ENABLE ?= no # Audio output on port C6
  33. USB ?= /dev/cu.usbmodem1421
  34. upload: build
  35. $(SCULPT_UPLOAD_COMMAND)