Add STM32G431 and STM32G474 board definitions. (#11793)
* Add STM32G431 and STM32G474 board definitions. * Add docs.
This commit is contained in:
@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"processor": {
|
"processor": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
|
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
|
||||||
},
|
},
|
||||||
"board": {
|
"board": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -26,6 +26,10 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
|
|||||||
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
||||||
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
||||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||||
|
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||||
|
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||||
|
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||||
|
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||||
|
|
||||||
### NXP (Kinetis)
|
### NXP (Kinetis)
|
||||||
|
|
||||||
|
@ -31,6 +31,10 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま
|
|||||||
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
||||||
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
||||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||||
|
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||||
|
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||||
|
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||||
|
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||||
|
|
||||||
### NXP (Kinetis)
|
### NXP (Kinetis)
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ QMK_FIRMWARE = Path.cwd()
|
|||||||
MAX_KEYBOARD_SUBFOLDERS = 5
|
MAX_KEYBOARD_SUBFOLDERS = 5
|
||||||
|
|
||||||
# Supported processor types
|
# Supported processor types
|
||||||
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32G431', 'STM32G474'
|
||||||
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
|
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
|
||||||
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
|
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
|
||||||
|
|
||||||
|
9
platforms/chibios/GENERIC_STM32_G431XB/board/board.mk
Normal file
9
platforms/chibios/GENERIC_STM32_G431XB/board/board.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_G431RB/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_G431RB
|
||||||
|
|
||||||
|
# Shared variables
|
||||||
|
ALLCSRC += $(BOARDSRC)
|
||||||
|
ALLINC += $(BOARDINC)
|
23
platforms/chibios/GENERIC_STM32_G431XB/configs/config.h
Normal file
23
platforms/chibios/GENERIC_STM32_G431XB/configs/config.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* Copyright 2018-2020 Nick Brassel (@tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
|
307
platforms/chibios/GENERIC_STM32_G431XB/configs/mcuconf.h
Normal file
307
platforms/chibios/GENERIC_STM32_G431XB/configs/mcuconf.h
Normal file
File diff suppressed because it is too large
Load Diff
9
platforms/chibios/GENERIC_STM32_G474XE/board/board.mk
Normal file
9
platforms/chibios/GENERIC_STM32_G474XE/board/board.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_G474RE/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_G474RE
|
||||||
|
|
||||||
|
# Shared variables
|
||||||
|
ALLCSRC += $(BOARDSRC)
|
||||||
|
ALLINC += $(BOARDINC)
|
30
platforms/chibios/GENERIC_STM32_G474XE/configs/config.h
Normal file
30
platforms/chibios/GENERIC_STM32_G474XE/configs/config.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef STM32_BOOTLOADER_DUAL_BANK
|
||||||
|
# define STM32_BOOTLOADER_DUAL_BANK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// To Enter bootloader from `RESET` keycode, you'll need to dedicate a GPIO to
|
||||||
|
// charge an RC network on the BOOT0 pin.
|
||||||
|
// See the QMK Discord's #hardware channel pins for an example circuit.
|
||||||
|
// Insert these two lines into your keyboard's `config.h` file.
|
||||||
|
// In the case below, PB7 is selected to charge.
|
||||||
|
#if 0
|
||||||
|
#define STM32_BOOTLOADER_DUAL_BANK TRUE
|
||||||
|
#define STM32_BOOTLOADER_DUAL_BANK_GPIO B7
|
||||||
|
#endif
|
372
platforms/chibios/GENERIC_STM32_G474XE/configs/mcuconf.h
Normal file
372
platforms/chibios/GENERIC_STM32_G474XE/configs/mcuconf.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -279,6 +279,72 @@ ifneq ($(findstring STM32F411, $(MCU)),)
|
|||||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring STM32G431, $(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>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32G4xx
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <keyboard_dir>/ld/
|
||||||
|
MCU_LDSCRIPT ?= STM32G431xB
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP ?= stm32g4xx
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
|
BOARD ?= GENERIC_STM32_G431XB
|
||||||
|
|
||||||
|
USE_FPU ?= yes
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||||
|
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring STM32G474, $(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>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32G4xx
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <keyboard_dir>/ld/
|
||||||
|
MCU_LDSCRIPT ?= STM32G474xE
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP ?= stm32g4xx
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
|
BOARD ?= GENERIC_STM32_G474XE
|
||||||
|
|
||||||
|
USE_FPU ?= yes
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||||
|
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
|
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
|
||||||
PROTOCOL = LUFA
|
PROTOCOL = LUFA
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user