summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2023-09-06 20:45:35 +0700
committerGitHub <noreply@github.com>2023-09-06 20:45:35 +0700
commit551d63b98ff95d5920c1477f1cc84475715bc5e6 (patch)
tree719a504b9ca99cbc34421f44bafb20e99a7a4daf /builddefs
parentcf87d88fb228d9118480a98c909508adacb64f26 (diff)
feat/voyager (#374)
* feat: tentative fix for keyboard crash during esd testing * feat: adds support for the GD32 voyager * feat: adds voyager's dfu suffix * fix: instability issues over i2c * fix: more robust right side scan * fix: tentative delay after init * Revert "fix: tentative delay after init" This reverts commit b0a6461cf1cef60574eac1647fd14e1fe63a020c. * fix: scan left side in between right scan process * fix: resets matrix + layer state when reconnecting the right side * chore: comments and code cleanup * fix: restore previous control flow * fix: decouple led driver reinit from io expander reinit * feat: reinit led drivers independtly * fix: prevents slamming the led driver over i2c * Revert "fix: prevents slamming the led driver over i2c" This reverts commit 48b8c809ea7a99ad2c3e941b83313787985c95e0. * Revert "feat: reinit led drivers independtly" This reverts commit 6405e6b3673478af1d98244c4df6ab73b95b18e1. * fix: reboot on io expander * fix: wait time after reading the io expander * chore: code cleanup and some refactors. * feat: adds led brightness and status led control over hid * fix: remove stray printf * fix: compilation error on ergodox * fix: gd32 eeprom fix * fix: caps lock crash * fix: soft reset to bootloader key. * chore: move the app address define where it should be * fix: cleanup + debounce default * feat: tentatively set gd32 clock to 98Mhz * feat: realign to latest chibios contrib * chore: points to ZSA's chibios contrib fork --------- Co-authored-by: Florian Didron <0x6664@hey.com>
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/bootloader.mk6
-rw-r--r--builddefs/common_features.mk3
-rw-r--r--builddefs/mcu_selection.mk36
3 files changed, 43 insertions, 2 deletions
diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk
index 9f55536423..c6574dadbe 100644
--- a/builddefs/bootloader.mk
+++ b/builddefs/bootloader.mk
@@ -217,6 +217,12 @@ ifeq ($(strip $(BOOTLOADER)), wb32-dfu)
OPT_DEFS += -DBOOTLOADER_WB32_DFU
BOOTLOADER_TYPE = wb32_dfu
endif
+ifeq ($(strip $(BOOTLOADER)), ignition)
+ OPT_DEFS += -DBOOTLOADER_IGNITION
+ BOOTLOADER_TYPE = ignition
+ MCU_LDSCRIPT = IGNITION
+endif
+
ifeq ($(strip $(BOOTLOADER_TYPE)),)
$(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file.)
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 5ec047a6e8..19779405df 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -212,7 +212,7 @@ else
ifeq ($(PLATFORM),AVR)
# Automatically provided by avr-libc, nothing required
else ifeq ($(PLATFORM),CHIBIOS)
- ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),)
+ ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8 %_GD32F303x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),)
# Emulated EEPROM
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
@@ -296,6 +296,7 @@ ifneq ($(strip $(FLASH_DRIVER)), none)
endif
endif
+
RGBLIGHT_ENABLE ?= no
VALID_RGBLIGHT_TYPES := WS2812 APA102 custom
diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk
index 0ea9630d59..1c45d375de 100644
--- a/builddefs/mcu_selection.mk
+++ b/builddefs/mcu_selection.mk
@@ -815,6 +815,40 @@ ifneq ($(findstring GD32VF103, $(MCU)),)
USE_FPU ?= no
endif
+ifneq ($(findstring GD32F303, $(MCU)),)
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
+ # OR
+ # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_PORT_NAME = GD
+ MCU_FAMILY = GD32F
+ MCU_SERIES = GD32F303
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= GD32F303x6
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= gd32f30x
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= GD32F303C_EVAL
+
+ STM32_BOOTLOADER_ADDRESS ?= 0x08002000
+
+ USE_FPU ?= no
+endif
+
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
PROTOCOL = LUFA
@@ -909,4 +943,4 @@ ifneq (,$(filter $(MCU),attiny85))
# 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 ?= 16500000
-endif
+endif \ No newline at end of file