Skip to content

Commit

Permalink
Cleanup rules.mk for 32A and 328P keyboards (qmk#6767)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and drashna committed Sep 21, 2019
1 parent 6f7124b commit 72723ae
Show file tree
Hide file tree
Showing 40 changed files with 333 additions and 645 deletions.
80 changes: 55 additions & 25 deletions docs/flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by

To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu
```make
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
```

Compatible flashers:

Expand Down Expand Up @@ -64,11 +70,17 @@ Arduino boards and their clones use the [Caterina bootloader](https://github.com

To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = caterina
```make
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina
```

Compatible flashers:

Expand Down Expand Up @@ -100,11 +112,17 @@ Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on al

To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`:

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = halfkay
```make
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = halfkay
```

Compatible flashers:

Expand All @@ -125,11 +143,17 @@ USBasploader is a bootloader developed by matrixstorm. It is used in some non-US

To ensure compatibility with the USBasploader bootloader, make sure this block is present in your `rules.mk`:

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = USBasp
```make
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = USBasp
```

Compatible flashers:

Expand All @@ -150,11 +174,17 @@ BootloadHID is a USB bootloader for AVR microcontrollers. The uploader tool requ

To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`:

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = bootloadHID
```make
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID
```

Compatible flashers:

Expand Down
23 changes: 8 additions & 15 deletions keyboards/ares/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@

# MCU name
MCU = atmega32a
PROTOCOL = VUSB

# unsupported features for now
NO_SUSPEND_POWER_DOWN = yes

# processor frequency
F_CPU = 12000000

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID

# build options
Expand All @@ -38,11 +35,7 @@ COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
RGBLIGHT_CUSTOM_DRIVER = yes
NO_UART = yes

OPT_DEFS = -DDEBUG_LEVEL=0

SRC += i2c_master.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
23 changes: 8 additions & 15 deletions keyboards/bfake/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@

# MCU name
MCU = atmega32a
PROTOCOL = VUSB

# unsupported features for now
NO_UART = yes
NO_SUSPEND_POWER_DOWN = yes

# processor frequency
F_CPU = 12000000

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID

# build options
Expand All @@ -45,6 +41,3 @@ OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
23 changes: 8 additions & 15 deletions keyboards/canoe/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@

# MCU name
MCU = atmega32a
PROTOCOL = VUSB

# unsupported features for now
NO_UART = yes
NO_SUSPEND_POWER_DOWN = yes

# processor frequency
F_CPU = 12000000

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID

# build options
Expand All @@ -45,6 +41,3 @@ OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
52 changes: 3 additions & 49 deletions keyboards/coseyfannitutti/discipline/rules.mk
Original file line number Diff line number Diff line change
@@ -1,61 +1,19 @@
# MCU name
MCU = atmega32a
PROTOCOL = VUSB

# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
# Processor frequency
F_CPU = 16000000

#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8

# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)

# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT

# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
#
# This uses usbaspbootloader
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = USBasp

# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048

# Flash program via avrdude, but default command is not suitable.
# You can use plaid:default:program
PROGRAM_CMD = avrdude -c usbasp -p m32 -U flash:w:$(BUILD_DIR)/$(TARGET).hex
Expand Down Expand Up @@ -84,8 +42,4 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)

# unsupported features for now
NO_UART = yes
NO_SUSPEND_POWER_DOWN = yes

LAYOUTS = 65_ansi
23 changes: 8 additions & 15 deletions keyboards/donutcables/budget96/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@

# MCU name
MCU = atmega32a
PROTOCOL = VUSB

# unsupported features for now
NO_UART = yes
NO_SUSPEND_POWER_DOWN = yes

# processor frequency
F_CPU = 12000000

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID

# build options
Expand All @@ -44,6 +40,3 @@ OPT_DEFS = -DDEBUG_LEVEL=0

# custom matrix setup
SRC = i2c_master.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
12 changes: 8 additions & 4 deletions keyboards/eve/meteor/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
# MCU name
MCU = atmega32a

# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID

# build options
Expand Down
Loading

0 comments on commit 72723ae

Please sign in to comment.