Skip to content

Commit 4f4408a

Browse files
Jpe230dexter93
authored andcommitted
Squashed commit of the following:
commit 0533d61 Author: Nick Brassel <[email protected]> Date: Thu Jul 7 08:56:39 2022 +1000 Update keyboard.jsonschema Oops. commit 95d6beb Merge: ea8b4d8 744af00 Author: Nick Brassel <[email protected]> Date: Thu Jul 7 08:55:27 2022 +1000 Merge branch 'develop' into sonix commit ea8b4d8 Author: Dimitris Mantzouranis <[email protected]> Date: Sun Feb 13 15:23:10 2022 +0200 update configs for chibios 2.11 commit 45fd6d3 Author: Dimitris Mantzouranis <[email protected]> Date: Thu Mar 3 18:31:14 2022 +0200 use wait function for bootloader_jump commit 3a3b621 Author: Dimitris Mantzouranis <[email protected]> Date: Thu Mar 3 17:41:48 2022 +0200 add sonix sn32 in docs commit 4fbcb68 Author: Dimitris Mantzouranis <[email protected]> Date: Thu Mar 3 14:57:18 2022 +0200 sonix sn32f2xx platform support
1 parent 2acba48 commit 4f4408a

File tree

22 files changed

+4783
-3
lines changed

22 files changed

+4783
-3
lines changed

builddefs/mcu_selection.mk

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,102 @@ ifneq ($(findstring GD32VF103, $(MCU)),)
815815
USE_FPU ?= no
816816
endif
817817

818+
ifneq ($(findstring SN32F248F, $(MCU)),)
819+
# Cortex version
820+
MCU = cortex-m0
821+
822+
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
823+
ARMV = 6
824+
825+
## chip/board settings
826+
# - the next two should match the directories in
827+
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
828+
MCU_FAMILY = SN32
829+
MCU_SERIES = SN32F240
830+
831+
# Linker script to use
832+
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
833+
# or <keyboard_dir>/ld/
834+
MCU_LDSCRIPT ?= SN32F240
835+
836+
# Startup code to use
837+
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
838+
MCU_STARTUP ?= sn32f24x
839+
840+
# Board: it should exist either in <chibios>/os/hal/boards/,
841+
# <keyboard_dir>/boards/, or drivers/boards/
842+
BOARD ?= SN_SN32F240
843+
844+
USE_FPU ?= no
845+
846+
# Bootloader address for SN32 DFU
847+
SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
848+
endif
849+
850+
ifneq ($(findstring SN32F248BF, $(MCU)),)
851+
# Cortex version
852+
MCU = cortex-m0
853+
854+
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
855+
ARMV = 6
856+
857+
## chip/board settings
858+
# - the next two should match the directories in
859+
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
860+
MCU_FAMILY = SN32
861+
MCU_SERIES = SN32F240B
862+
863+
# Linker script to use
864+
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
865+
# or <keyboard_dir>/ld/
866+
MCU_LDSCRIPT ?= SN32F240B
867+
868+
# Startup code to use
869+
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
870+
MCU_STARTUP ?= sn32f24xb
871+
872+
# Board: it should exist either in <chibios>/os/hal/boards/,
873+
# <keyboard_dir>/boards/, or drivers/boards/
874+
BOARD ?= SN_SN32F240B
875+
876+
USE_FPU ?= no
877+
878+
# Bootloader address for SN32 DFU
879+
SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
880+
endif
881+
882+
ifneq ($(findstring SN32F268F, $(MCU)),)
883+
# Cortex version
884+
MCU = cortex-m0
885+
886+
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
887+
ARMV = 6
888+
889+
## chip/board settings
890+
# - the next two should match the directories in
891+
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
892+
MCU_FAMILY = SN32
893+
MCU_SERIES = SN32F260
894+
895+
# Linker script to use
896+
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
897+
# or <keyboard_dir>/ld/
898+
MCU_LDSCRIPT ?= SN32F260
899+
900+
# Startup code to use
901+
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
902+
MCU_STARTUP ?= sn32f26x
903+
904+
# Board: it should exist either in <chibios>/os/hal/boards/,
905+
# <keyboard_dir>/boards/, or drivers/boards/
906+
BOARD ?= SN_SN32F260
907+
908+
USE_FPU ?= no
909+
910+
# Bootloader address for SN32 DFU
911+
SN32_BOOTLOADER_ADDRESS = 0x1FFF0009
912+
endif
913+
818914
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
819915
PROTOCOL = LUFA
820916

data/schemas/keyboard.jsonschema

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"processor": {
4444
"type": "string",
45-
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK64FX512", "MK66FX1M0", "RP2040", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "WB32FQ95", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
45+
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK64FX512", "MK66FX1M0", "RP2040", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "WB32FQ95", "SN32F248F", "SN32F248BF", "SN32F268F", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
4646
},
4747
"audio": {
4848
"type": "object",
@@ -104,7 +104,8 @@
104104
"tinyuf2",
105105
"unknown",
106106
"usbasploader",
107-
"wb32-dfu"
107+
"wb32-dfu",
108+
"sn32_dfu"
108109
]
109110
},
110111
"bootloader_instructions": {

docs/compatible_microcontrollers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
7373

7474
For a detailed overview about the RP2040 support by QMK see the [dedicated RP2040 page](platformdev_rp2040.md).
7575

76+
### Sonix (SN32)
77+
78+
* [SN32F24x](https://www.sonix.com.tw/article-en-998-21396)
79+
* [SN32F24xB](https://www.sonix.com.tw/article-en-4336-30356)
80+
* [SN32F26x](https://www.sonix.com.tw/article-en-998-24753)
81+
7682
## Atmel ATSAM
7783

7884
There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). However, it is not recommended to design a board with this microcontroller as the support is quite specialized to Massdrop hardware.

lib/python/qmk/constants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
MAX_KEYBOARD_SUBFOLDERS = 5
1515

1616
# Supported processor types
17-
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', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L432', 'STM32L433', 'STM32L442', 'STM32L443', 'GD32VF103', 'WB32F3G71', 'WB32FQ95'
17+
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', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L432', 'STM32L433', 'STM32L442', 'STM32L443', 'GD32VF103', 'WB32F3G71', 'WB32FQ95', 'SN32F248F', 'SN32F248BF', 'SN32F268F'
1818
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
1919
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
2020

@@ -45,6 +45,9 @@
4545
"GD32VF103": "gd32v-dfu",
4646
"WB32F3G71": "wb32-dfu",
4747
"WB32FQ95": "wb32-dfu",
48+
"SN32F248F": "sn32-dfu",
49+
"SN32F248BF": "sn32-dfu",
50+
"SN32F268F": "sn32-dfu",
4851
"atmega16u2": "atmel-dfu",
4952
"atmega32u2": "atmel-dfu",
5053
"atmega16u4": "atmel-dfu",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# List of all the board related files.
2+
BOARDSRC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240/board.c
3+
4+
# Required include directories
5+
BOARDINC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240
6+
7+
# Optimize for speed
8+
OPT = 2
9+
10+
# Shared variables
11+
ALLCSRC += $(BOARDSRC)
12+
ALLINC += $(BOARDINC)

0 commit comments

Comments
 (0)