Add support for [ES32]FS026 MCU.

This commit is contained in:
2026-07-02 20:15:28 -04:00
parent 2ee51f3901
commit 0c9de2d62b
5 changed files with 50 additions and 1 deletions
+7
View File
@@ -83,6 +83,13 @@ ifneq ($(strip $(ALLOW_WARNINGS)), yes)
endif
CFLAGS += $(CSTANDARD)
# GCC 15+ promotes header-guard mismatches to errors; suppress to allow
# upstream library headers with mismatched #ifndef/#define guards to build.
GCC_MAJOR := $(shell $(CC) -dumpversion 2>/dev/null | cut -d. -f1)
ifeq ($(shell [ "$(GCC_MAJOR)" -ge 15 ] 2>/dev/null && echo yes),yes)
CFLAGS += -Wno-header-guard
endif
# This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION
# Fixing of multiple variable definitions must be made.
CFLAGS += -fcommon
+1
View File
@@ -70,6 +70,7 @@
"cortex-m35p",
"cortex-m55",
"cortex-m85",
"FS026",
"MKL26Z64",
"MK20DX128",
"MK20DX256",
+1 -1
View File
@@ -22,7 +22,7 @@ QMK_FIRMWARE_UPSTREAM = 'qmk/qmk_firmware'
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK64FX512', 'MK66FX1M0', 'RP2040', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F405', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G0B1', 'STM32G431', 'STM32G474', 'STM32H723', 'STM32H733', 'STM32L412', 'STM32L422', 'STM32L432', 'STM32L433', 'STM32L442', 'STM32L443', 'GD32VF103', 'WB32F3G71', 'WB32FQ95', 'AT32F415'
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK64FX512', 'MK66FX1M0', 'RP2040', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F405', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G0B1', 'STM32G431', 'STM32G474', 'STM32H723', 'STM32H733', 'STM32L412', 'STM32L422', 'STM32L432', 'STM32L433', 'STM32L442', 'STM32L443', 'GD32VF103', 'WB32F3G71', 'WB32FQ95', 'AT32F415', 'FS026'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
+8
View File
@@ -69,6 +69,14 @@ ifeq ($(strip $(BOOTLOADER)), apm32-dfu)
DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 314B -p 0106
endif
ifeq ($(strip $(BOOTLOADER)), fs026_bootloader)
OPT_DEFS += -DBOOTLOADER_FS026
BOOTLOADER_TYPE = fs026_bootloader
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 30CC:AEF1 -a 0 -s 0x00000000:leave
DFU_SUFFIX_ARGS ?= -v 30CC -p AEF1
endif
ifeq ($(strip $(BOOTLOADER)), gd32v-dfu)
OPT_DEFS += -DBOOTLOADER_GD32V_DFU
BOOTLOADER_TYPE = gd32v_dfu
+33
View File
@@ -911,3 +911,36 @@ ifneq ($(findstring GD32VF103, $(MCU)),)
USE_FPU ?= no
endif
ifneq ($(findstring FS026, $(MCU)),)
# Cortex version
MCU = cortex-m0
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 6
## 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_FAMILY = ES32
MCU_SERIES = FS026
# Linker script to use
# - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
# or <keyboard_dir>/ld/
MCU_LDSCRIPT ?= FS026
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP ?= FS026
USE_FPU ?= no
# UF2 settings
UF2_FAMILY ?= STM32F0
# Bootloader address for STM32 DFU
ES32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
endif