From 405dea01bef215a0b79524e4ff74364f1bcfeadf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 9 Aug 2019 07:09:54 +1000 Subject: Add some defaults for ATmega32A to mcu_selection.mk (#6253) * Add some defaults for ATmega32A to mcu_selection.mk * Remove boilerplate from templates * Relax INTERRUPT_CONTROL_ENDPOINT and PROGRAM_CMD * Apply suggestions from code review Co-Authored-By: Drashna Jaelre --- quantum/mcu_selection.mk | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'quantum/mcu_selection.mk') diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index fa6dc8b53c..cca7720e9c 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -1,4 +1,3 @@ - ifneq ($(findstring STM32F303, $(MCU)),) ## chip/board settings # - the next two should match the directories in @@ -54,7 +53,7 @@ ifneq (,$(filter $(MCU),atmega32u4 at90usb1286)) # LUFA specific # # Target architecture (see library "Board Types" documentation). - ARCH ?= AVR8 + ARCH = AVR8 # Input clock frequency. # This will define a symbol, F_USB, in all source code files equal to the @@ -68,4 +67,27 @@ ifneq (,$(filter $(MCU),atmega32u4 at90usb1286)) # 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 + ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) + OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + endif +endif + +ifneq (,$(filter $(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. + F_CPU ?= 12000000 + + # unsupported features for now + NO_UART ?= yes + NO_SUSPEND_POWER_DOWN ?= yes + + # Programming options + PROGRAM_CMD ?= ./util/atmega32a_program.py $(TARGET).hex endif -- cgit v1.2.3 From 92f9b6c3bdff939bc562d640e02c3aebaa204e17 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 18 Aug 2019 07:29:41 +1000 Subject: Add ATmega32U2 to mcu_selection.mk (#6561) --- quantum/mcu_selection.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/mcu_selection.mk') diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index cca7720e9c..2d62dcbf1e 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -36,7 +36,7 @@ ifneq ($(findstring STM32F303, $(MCU)),) DFU_SUFFIX_ARGS = -p DF11 -v 0483 endif -ifneq (,$(filter $(MCU),atmega32u4 at90usb1286)) +ifneq (,$(filter $(MCU),atmega32u2 atmega32u4 at90usb1286)) # 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 -- cgit v1.2.3 From 98599173d7306d53cc8603d40bc50e229025fbdf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 6 Sep 2019 07:50:43 +1000 Subject: Add 16U2, 16U4 and USB646 to mcu_selection.mk (#6566) --- quantum/mcu_selection.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/mcu_selection.mk') diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 2d62dcbf1e..1af0123e2b 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -36,7 +36,7 @@ ifneq ($(findstring STM32F303, $(MCU)),) DFU_SUFFIX_ARGS = -p DF11 -v 0483 endif -ifneq (,$(filter $(MCU),atmega32u2 atmega32u4 at90usb1286)) +ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) # 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 -- cgit v1.2.3 From 490a13a02e0e247d07644a64f6df7e4ec9a628a3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 8 Sep 2019 01:24:19 +1000 Subject: Add 328P to mcu_selection.mk (#6682) --- quantum/mcu_selection.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'quantum/mcu_selection.mk') diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 1af0123e2b..5102010c7b 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -91,3 +91,18 @@ ifneq (,$(filter $(MCU),atmega32a)) # Programming options PROGRAM_CMD ?= ./util/atmega32a_program.py $(TARGET).hex endif + +ifneq (,$(filter $(MCU),atmega328p)) + 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. + F_CPU ?= 16000000 + + # unsupported features for now + NO_UART ?= yes + NO_SUSPEND_POWER_DOWN ?= yes +endif -- cgit v1.2.3 From f98750de6edf97559ed53be4b5b5c1b4851acf3e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Nov 2019 13:25:40 +1100 Subject: [Core] Cleanup rules.mk for F303 keyboards (#7306) * Cleanup rules.mk for F303 keyboards * Fix small typo --- quantum/mcu_selection.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'quantum/mcu_selection.mk') diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 5102010c7b..6815a0d8a5 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -7,15 +7,15 @@ ifneq ($(findstring STM32F303, $(MCU)),) # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ - # or /ld/ + # or /ld/ MCU_LDSCRIPT ?= STM32F303xC # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ MCU_STARTUP ?= stm32f3xx - # Board: it should exist either in /os/hal/boards/ - # or /boards + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ BOARD ?= GENERIC_STM32_F303XC # Cortex version @@ -27,7 +27,7 @@ ifneq ($(findstring STM32F303, $(MCU)),) USE_FPU = yes # Vector table for application - # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ + # 0x00000000-0x00001000 area is occupied by bootloader.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -- cgit v1.2.3