x68k_usb: Add unimap
[tmk_keyboard.git] / converter / x68k_usb / Makefile
CommitLineData
38d61ee1 1# Target file name (without extension).
b0573ba8 2TARGET ?= x68k_usb
38d61ee1 3
4# Directory common source filess exist
b0573ba8 5TMK_DIR ?= ../../tmk_core
38d61ee1 6
7# Directory keyboard dependent files exist
b0573ba8 8TARGET_DIR ?= .
38d61ee1 9
b0573ba8 10# project specific files
11SRC ?= matrix.c \
38d61ee1 12 led.c \
f45f4193 13 protocol/serial_uart.c
38d61ee1 14
e7808f7e 15CONFIG_H = config.h
38d61ee1 16
17
b0573ba8 18# MCU name
19# atmega32u4 Teensy2.0
20# atemga32u4 TMK Converter rev.1
21# atemga32u2 TMK Converter rev.2
22MCU ?= atmega32u2
38d61ee1 23
24# Processor frequency.
b0573ba8 25# This will define a symbol, F_CPU, in all source code files equal to the
26# processor frequency in Hz. You can then use this symbol in your source code to
27# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
28# automatically to create a 32-bit value in your source code.
29#
30# This will be an integer division of F_USB below, as it is sourced by
31# F_USB after it has run through any CPU prescalers. Note that this value
32# does not *change* the processor frequency - it should merely be updated to
33# reflect the processor speed set externally so that the code can use accurate
34# software delays.
35F_CPU ?= 16000000
38d61ee1 36
37
e3994a62 38#
39# LUFA specific
40#
41# Target architecture (see library "Board Types" documentation).
b0573ba8 42ARCH ?= AVR8
e3994a62 43
44# Input clock frequency.
45# This will define a symbol, F_USB, in all source code files equal to the
46# input clock frequency (before any prescaling is performed) in Hz. This value may
47# differ from F_CPU if prescaling is used on the latter, and is required as the
48# raw input clock is fed directly to the PLL sections of the AVR for high speed
49# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
50# at the end, this will be done automatically to create a 32-bit value in your
51# source code.
52#
53# If no clock division is performed on the input clock inside the AVR (via the
54# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
b0573ba8 55F_USB ?= $(F_CPU)
e3994a62 56
57# Interrupt driven control endpoint task(+60)
b0573ba8 58OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
e3994a62 59
60
b0573ba8 61# Boot Section Size in *bytes*
42c96241 62# Teensy halfKay 512
b0573ba8 63# Teensy++ halfKay 1024
64# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
42c96241 65# LUFA bootloader 4096
b0573ba8 66# USBaspLoader 2048
42c96241 67OPT_DEFS += -DBOOTLOADER_SIZE=4096
68
69
38d61ee1 70# Build Options
b0573ba8 71# comment out to disable the options.
38d61ee1 72#
b0573ba8 73#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
42c96241 74MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
75EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
76CONSOLE_ENABLE = yes # Console for debug(+400)
77COMMAND_ENABLE = yes # Commands for debug and configuration
b0573ba8 78#UNIMAP_ENABLE = yes
79#ACTIONMAP_ENABLE = yes # Use 16bit actionmap instead of 8bit keymap
80#KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor
38d61ee1 81
38d61ee1 82
b0573ba8 83#
84# Keymap file
85#
86ifeq (yes,$(strip $(UNIMAP_ENABLE)))
87 KEYMAP_FILE = unimap
88else
89 ifeq (yes,$(strip $(ACTIONMAP_ENABLE)))
90 KEYMAP_FILE = actionmap
91 else
92 KEYMAP_FILE = keymap
93 endif
94endif
95ifdef KEYMAP
96 SRC := $(KEYMAP_FILE)_$(KEYMAP).c $(SRC)
97else
98 SRC := $(KEYMAP_FILE).c $(SRC)
99endif
38d61ee1 100
101
2769f09d 102# Search Path
103VPATH += $(TARGET_DIR)
b4e2d325 104VPATH += $(TMK_DIR)
2769f09d 105
e3994a62 106include $(TMK_DIR)/protocol/lufa.mk
b0573ba8 107include $(TMK_DIR)/protocol.mk
b4e2d325 108include $(TMK_DIR)/common.mk
109include $(TMK_DIR)/rules.mk
Imprint / Impressum