From e50867d52d9c255570630a23514842749b45e4c1 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 18 Oct 2021 07:23:20 +0200 Subject: [Core] Add support for RISC-V builds and GD32VF103 MCU (#12508) * Add support for RISC-V builds and GD32VF103 MCU * Add toolchain selection in chibios.mk based on the mcu selected in mcu_selection.mk * Reorder and added comments to chibios.mk to have a streamlined makefile * Add GD32VF103 mcu to possible targets for QMK. * Add STM32 compatibility for GD32VF103 MCU, this is hacky but more efficent then rewriting every driver. * Add GigaDevice DFU bootloader as flash target, please note that dfu-util of at least version 0.10 is needed. * Add analog driver compatibility * Add apa102 bitbang driver compatibility * Add ws2812 bitbang driver compatibility * Add eeprom in flash emulation compatibility * Allow faster re-builds with ccache * Add SiPeed Longan Nano to platform files * Add SiPeed Longan Nano Onekeys * Make quine compatible with other bootloaders * Support builds with picolibc * Add risc-v toolchain to arch and debian/ubuntu scripts --- bootloader.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index 5ba118fb44..ccb92392d9 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -34,6 +34,8 @@ # stm32duino STM32Duino (STM32F103x8) # stm32-dfu STM32 USB DFU in ROM # apm32-dfu APM32 USB DFU in ROM +# RISC-V: +# gd32v-dfu GD32V USB DFU in ROM # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -125,6 +127,13 @@ 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)), gd32v-dfu) + OPT_DEFS += -DBOOTLOADER_GD32V_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189 +endif ifeq ($(strip $(BOOTLOADER)), kiibohd) OPT_DEFS += -DBOOTLOADER_KIIBOHD ifeq ($(strip $(MCU_ORIG)), MK20DX128) -- cgit v1.2.3