From 4c9003b1779b7b404e3bb0ce103db683bd92bccb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 18 Aug 2021 00:04:15 +0100 Subject: Move chibios board files to allow tmk_core platform migration (#13777) * Move board files * fix up after rebase --- .../chibios/BLACKPILL_STM32_F401/board/board.mk | 9 - .../chibios/BLACKPILL_STM32_F401/configs/board.h | 20 - .../BLACKPILL_STM32_F401/configs/bootloader_defs.h | 5 - .../chibios/BLACKPILL_STM32_F401/configs/config.h | 30 - .../chibios/BLACKPILL_STM32_F401/configs/mcuconf.h | 253 ------ .../chibios/BLACKPILL_STM32_F411/board/board.mk | 9 - .../chibios/BLACKPILL_STM32_F411/configs/board.h | 20 - .../BLACKPILL_STM32_F411/configs/bootloader_defs.h | 5 - .../chibios/BLACKPILL_STM32_F411/configs/config.h | 30 - .../chibios/BLACKPILL_STM32_F411/configs/mcuconf.h | 253 ------ .../BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld | 89 -- .../BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld | 89 -- .../chibios/GENERIC_STM32_F042X6/board/board.c | 265 ------ .../chibios/GENERIC_STM32_F042X6/board/board.h | 896 --------------------- .../chibios/GENERIC_STM32_F042X6/board/board.mk | 9 - .../GENERIC_STM32_F042X6/configs/bootloader_defs.h | 5 - .../chibios/GENERIC_STM32_F042X6/configs/config.h | 20 - .../chibios/GENERIC_STM32_F042X6/configs/mcuconf.h | 168 ---- .../chibios/GENERIC_STM32_F072XB/board/board.mk | 9 - .../chibios/GENERIC_STM32_F072XB/configs/board.h | 20 - .../GENERIC_STM32_F072XB/configs/bootloader_defs.h | 5 - .../chibios/GENERIC_STM32_F072XB/configs/config.h | 20 - .../chibios/GENERIC_STM32_F072XB/configs/mcuconf.h | 179 ---- .../chibios/GENERIC_STM32_F303XC/board/board.mk | 9 - .../chibios/GENERIC_STM32_F303XC/configs/board.h | 37 - .../GENERIC_STM32_F303XC/configs/bootloader_defs.h | 5 - .../chibios/GENERIC_STM32_F303XC/configs/config.h | 20 - .../chibios/GENERIC_STM32_F303XC/configs/mcuconf.h | 273 ------- .../chibios/GENERIC_STM32_F407XE/board/board.mk | 9 - .../chibios/GENERIC_STM32_F407XE/configs/board.h | 24 - .../chibios/GENERIC_STM32_F407XE/configs/config.h | 23 - .../chibios/GENERIC_STM32_F407XE/configs/mcuconf.h | 355 -------- .../chibios/GENERIC_STM32_F446XE/board/board.mk | 9 - .../chibios/GENERIC_STM32_F446XE/configs/board.h | 24 - .../chibios/GENERIC_STM32_F446XE/configs/config.h | 23 - .../chibios/GENERIC_STM32_F446XE/configs/mcuconf.h | 361 --------- .../chibios/GENERIC_STM32_G431XB/board/board.mk | 9 - .../chibios/GENERIC_STM32_G431XB/configs/config.h | 23 - .../chibios/GENERIC_STM32_G431XB/configs/mcuconf.h | 307 ------- .../chibios/GENERIC_STM32_G474XE/board/board.mk | 9 - .../chibios/GENERIC_STM32_G474XE/configs/config.h | 30 - .../chibios/GENERIC_STM32_G474XE/configs/mcuconf.h | 372 --------- .../chibios/GENERIC_STM32_L412XB/board/board.mk | 9 - .../chibios/GENERIC_STM32_L412XB/configs/board.h | 24 - .../chibios/GENERIC_STM32_L412XB/configs/config.h | 26 - .../chibios/GENERIC_STM32_L412XB/configs/mcuconf.h | 282 ------- .../chibios/GENERIC_STM32_L433XC/board/board.mk | 9 - .../chibios/GENERIC_STM32_L433XC/configs/board.h | 24 - .../chibios/GENERIC_STM32_L433XC/configs/config.h | 26 - .../chibios/GENERIC_STM32_L433XC/configs/mcuconf.h | 292 ------- platforms/chibios/IC_TEENSY_3_1/board/board.c | 151 ---- platforms/chibios/IC_TEENSY_3_1/board/board.h | 295 ------- platforms/chibios/IC_TEENSY_3_1/board/board.mk | 9 - platforms/chibios/IC_TEENSY_4_1/board/board.mk | 1 - platforms/chibios/IC_TEENSY_4_1/rules.mk | 1 - platforms/chibios/QMK_PROTON_C/board/board.mk | 9 - platforms/chibios/QMK_PROTON_C/configs/board.h | 37 - .../chibios/QMK_PROTON_C/configs/bootloader_defs.h | 7 - platforms/chibios/QMK_PROTON_C/configs/chconf.h | 756 ----------------- platforms/chibios/QMK_PROTON_C/configs/config.h | 20 - platforms/chibios/QMK_PROTON_C/configs/halconf.h | 531 ------------ platforms/chibios/QMK_PROTON_C/configs/mcuconf.h | 273 ------- .../chibios/QMK_PROTON_C/convert_to_proton_c.mk | 10 - .../chibios/STM32_F103_STM32DUINO/board/board.c | 59 -- .../chibios/STM32_F103_STM32DUINO/board/board.h | 166 ---- .../chibios/STM32_F103_STM32DUINO/board/board.mk | 9 - .../STM32_F103_STM32DUINO/configs/mcuconf.h | 209 ----- .../ld/STM32F103x8_stm32duino_bootloader.ld | 22 - .../ld/STM32F103xB_stm32duino_bootloader.ld | 22 - .../ld/stm32duino_bootloader_common.ld | 85 -- .../boards/BLACKPILL_STM32_F401/board/board.mk | 9 + .../boards/BLACKPILL_STM32_F401/configs/board.h | 20 + .../BLACKPILL_STM32_F401/configs/bootloader_defs.h | 5 + .../boards/BLACKPILL_STM32_F401/configs/config.h | 30 + .../boards/BLACKPILL_STM32_F401/configs/mcuconf.h | 253 ++++++ .../boards/BLACKPILL_STM32_F411/board/board.mk | 9 + .../boards/BLACKPILL_STM32_F411/configs/board.h | 20 + .../BLACKPILL_STM32_F411/configs/bootloader_defs.h | 5 + .../boards/BLACKPILL_STM32_F411/configs/config.h | 30 + .../boards/BLACKPILL_STM32_F411/configs/mcuconf.h | 253 ++++++ .../BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld | 89 ++ .../BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld | 89 ++ .../boards/GENERIC_STM32_F042X6/board/board.c | 265 ++++++ .../boards/GENERIC_STM32_F042X6/board/board.h | 896 +++++++++++++++++++++ .../boards/GENERIC_STM32_F042X6/board/board.mk | 9 + .../GENERIC_STM32_F042X6/configs/bootloader_defs.h | 5 + .../boards/GENERIC_STM32_F042X6/configs/config.h | 20 + .../boards/GENERIC_STM32_F042X6/configs/mcuconf.h | 168 ++++ .../boards/GENERIC_STM32_F072XB/board/board.mk | 9 + .../boards/GENERIC_STM32_F072XB/configs/board.h | 20 + .../GENERIC_STM32_F072XB/configs/bootloader_defs.h | 5 + .../boards/GENERIC_STM32_F072XB/configs/config.h | 20 + .../boards/GENERIC_STM32_F072XB/configs/mcuconf.h | 179 ++++ .../boards/GENERIC_STM32_F303XC/board/board.mk | 9 + .../boards/GENERIC_STM32_F303XC/configs/board.h | 37 + .../GENERIC_STM32_F303XC/configs/bootloader_defs.h | 5 + .../boards/GENERIC_STM32_F303XC/configs/config.h | 20 + .../boards/GENERIC_STM32_F303XC/configs/mcuconf.h | 273 +++++++ .../boards/GENERIC_STM32_F407XE/board/board.mk | 9 + .../boards/GENERIC_STM32_F407XE/configs/board.h | 24 + .../boards/GENERIC_STM32_F407XE/configs/config.h | 23 + .../boards/GENERIC_STM32_F407XE/configs/mcuconf.h | 355 ++++++++ .../boards/GENERIC_STM32_F446XE/board/board.mk | 9 + .../boards/GENERIC_STM32_F446XE/configs/board.h | 24 + .../boards/GENERIC_STM32_F446XE/configs/config.h | 23 + .../boards/GENERIC_STM32_F446XE/configs/mcuconf.h | 361 +++++++++ .../boards/GENERIC_STM32_G431XB/board/board.mk | 9 + .../boards/GENERIC_STM32_G431XB/configs/config.h | 23 + .../boards/GENERIC_STM32_G431XB/configs/mcuconf.h | 307 +++++++ .../boards/GENERIC_STM32_G474XE/board/board.mk | 9 + .../boards/GENERIC_STM32_G474XE/configs/config.h | 30 + .../boards/GENERIC_STM32_G474XE/configs/mcuconf.h | 372 +++++++++ .../boards/GENERIC_STM32_L412XB/board/board.mk | 9 + .../boards/GENERIC_STM32_L412XB/configs/board.h | 24 + .../boards/GENERIC_STM32_L412XB/configs/config.h | 26 + .../boards/GENERIC_STM32_L412XB/configs/mcuconf.h | 282 +++++++ .../boards/GENERIC_STM32_L433XC/board/board.mk | 9 + .../boards/GENERIC_STM32_L433XC/configs/board.h | 24 + .../boards/GENERIC_STM32_L433XC/configs/config.h | 26 + .../boards/GENERIC_STM32_L433XC/configs/mcuconf.h | 292 +++++++ .../chibios/boards/IC_TEENSY_3_1/board/board.c | 151 ++++ .../chibios/boards/IC_TEENSY_3_1/board/board.h | 295 +++++++ .../chibios/boards/IC_TEENSY_3_1/board/board.mk | 9 + .../chibios/boards/IC_TEENSY_4_1/board/board.mk | 1 + platforms/chibios/boards/IC_TEENSY_4_1/rules.mk | 1 + .../chibios/boards/QMK_PROTON_C/board/board.mk | 9 + .../chibios/boards/QMK_PROTON_C/configs/board.h | 37 + .../boards/QMK_PROTON_C/configs/bootloader_defs.h | 7 + .../chibios/boards/QMK_PROTON_C/configs/chconf.h | 756 +++++++++++++++++ .../chibios/boards/QMK_PROTON_C/configs/config.h | 20 + .../chibios/boards/QMK_PROTON_C/configs/halconf.h | 531 ++++++++++++ .../chibios/boards/QMK_PROTON_C/configs/mcuconf.h | 273 +++++++ .../boards/QMK_PROTON_C/convert_to_proton_c.mk | 10 + .../boards/STM32_F103_STM32DUINO/board/board.c | 59 ++ .../boards/STM32_F103_STM32DUINO/board/board.h | 166 ++++ .../boards/STM32_F103_STM32DUINO/board/board.mk | 9 + .../boards/STM32_F103_STM32DUINO/configs/mcuconf.h | 209 +++++ .../ld/STM32F103x8_stm32duino_bootloader.ld | 22 + .../ld/STM32F103xB_stm32duino_bootloader.ld | 22 + .../ld/stm32duino_bootloader_common.ld | 85 ++ platforms/chibios/boards/common/configs/chconf.h | 756 +++++++++++++++++ platforms/chibios/boards/common/configs/halconf.h | 531 ++++++++++++ platforms/chibios/boards/common/ld/MKL26Z64.ld | 105 +++ platforms/chibios/boards/common/ld/STM32L412xB.ld | 85 ++ .../boards/keyboard-config-templates/board.h | 20 + .../boards/keyboard-config-templates/chconf.h | 20 + .../boards/keyboard-config-templates/halconf.h | 20 + .../boards/keyboard-config-templates/mcuconf.h | 21 + platforms/chibios/common/configs/chconf.h | 756 ----------------- platforms/chibios/common/configs/halconf.h | 531 ------------ platforms/chibios/common/ld/MKL26Z64.ld | 105 --- platforms/chibios/common/ld/STM32L412xB.ld | 85 -- .../chibios/keyboard-config-templates/board.h | 20 - .../chibios/keyboard-config-templates/chconf.h | 20 - .../chibios/keyboard-config-templates/halconf.h | 20 - .../chibios/keyboard-config-templates/mcuconf.h | 21 - 156 files changed, 9252 insertions(+), 9252 deletions(-) delete mode 100644 platforms/chibios/BLACKPILL_STM32_F401/board/board.mk delete mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/board.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/config.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/board/board.mk delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/board.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/config.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld delete mode 100644 platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/board/board.c delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/board/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_F042X6/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_F072XB/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_F072XB/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h delete mode 100644 platforms/chibios/GENERIC_STM32_F072XB/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_F407XE/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_F407XE/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_F407XE/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_F407XE/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_F446XE/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_G431XB/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_G431XB/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_G431XB/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_G474XE/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_G474XE/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_G474XE/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_L412XB/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h delete mode 100644 platforms/chibios/GENERIC_STM32_L433XC/board/board.mk delete mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/board.h delete mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/config.h delete mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h delete mode 100644 platforms/chibios/IC_TEENSY_3_1/board/board.c delete mode 100644 platforms/chibios/IC_TEENSY_3_1/board/board.h delete mode 100644 platforms/chibios/IC_TEENSY_3_1/board/board.mk delete mode 100644 platforms/chibios/IC_TEENSY_4_1/board/board.mk delete mode 100644 platforms/chibios/IC_TEENSY_4_1/rules.mk delete mode 100644 platforms/chibios/QMK_PROTON_C/board/board.mk delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/board.h delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/bootloader_defs.h delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/chconf.h delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/config.h delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/halconf.h delete mode 100644 platforms/chibios/QMK_PROTON_C/configs/mcuconf.h delete mode 100644 platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/board/board.c delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/board/board.h delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/board/board.mk delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/ld/STM32F103xB_stm32duino_bootloader.ld delete mode 100644 platforms/chibios/STM32_F103_STM32DUINO/ld/stm32duino_bootloader_common.ld create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F401/board/board.mk create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F401/configs/board.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F401/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/board/board.mk create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/configs/board.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld create mode 100644 platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.c create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F042X6/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F072XB/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_F072XB/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F072XB/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F072XB/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F072XB/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F303XC/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_F303XC/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F303XC/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F303XC/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F303XC/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F407XE/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_F407XE/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F446XE/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_G431XB/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_G431XB/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_G474XE/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_G474XE/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L412XB/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_L412XB/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L412XB/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L412XB/configs/mcuconf.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L433XC/board/board.mk create mode 100644 platforms/chibios/boards/GENERIC_STM32_L433XC/configs/board.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L433XC/configs/config.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_L433XC/configs/mcuconf.h create mode 100644 platforms/chibios/boards/IC_TEENSY_3_1/board/board.c create mode 100644 platforms/chibios/boards/IC_TEENSY_3_1/board/board.h create mode 100644 platforms/chibios/boards/IC_TEENSY_3_1/board/board.mk create mode 100644 platforms/chibios/boards/IC_TEENSY_4_1/board/board.mk create mode 100644 platforms/chibios/boards/IC_TEENSY_4_1/rules.mk create mode 100644 platforms/chibios/boards/QMK_PROTON_C/board/board.mk create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/board.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/bootloader_defs.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/config.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/halconf.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/configs/mcuconf.h create mode 100644 platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.c create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.h create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.mk create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/configs/mcuconf.h create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xB_stm32duino_bootloader.ld create mode 100644 platforms/chibios/boards/STM32_F103_STM32DUINO/ld/stm32duino_bootloader_common.ld create mode 100644 platforms/chibios/boards/common/configs/chconf.h create mode 100644 platforms/chibios/boards/common/configs/halconf.h create mode 100644 platforms/chibios/boards/common/ld/MKL26Z64.ld create mode 100644 platforms/chibios/boards/common/ld/STM32L412xB.ld create mode 100644 platforms/chibios/boards/keyboard-config-templates/board.h create mode 100644 platforms/chibios/boards/keyboard-config-templates/chconf.h create mode 100644 platforms/chibios/boards/keyboard-config-templates/halconf.h create mode 100644 platforms/chibios/boards/keyboard-config-templates/mcuconf.h delete mode 100644 platforms/chibios/common/configs/chconf.h delete mode 100644 platforms/chibios/common/configs/halconf.h delete mode 100644 platforms/chibios/common/ld/MKL26Z64.ld delete mode 100644 platforms/chibios/common/ld/STM32L412xB.ld delete mode 100644 platforms/chibios/keyboard-config-templates/board.h delete mode 100644 platforms/chibios/keyboard-config-templates/chconf.h delete mode 100644 platforms/chibios/keyboard-config-templates/halconf.h delete mode 100644 platforms/chibios/keyboard-config-templates/mcuconf.h (limited to 'platforms') diff --git a/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk deleted file mode 100644 index fddf7dace4..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk +++ /dev/null @@ -1,9 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY/board.c - -# Required include directories -BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY - -# Shared variables -ALLCSRC += $(BOARDSRC) -ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h deleted file mode 100644 index 30af6b0c86..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h +++ /dev/null @@ -1,20 +0,0 @@ -/* 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 . - */ -#pragma once - -#include_next "board.h" - -#undef STM32_HSE_BYPASS diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h deleted file mode 100644 index 4da3d39a32..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h +++ /dev/null @@ -1,5 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h deleted file mode 100644 index e181422eba..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* 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 . - */ -#pragma once - -#define BOARD_OTG_NOVBUSSENS 1 - -#ifndef STM32_LSECLK -# define STM32_LSECLK 32768U -#endif // STM32_LSECLK - -#ifndef STM32_HSECLK -# define STM32_HSECLK 25000000U -#endif // STM32_HSECLK - -#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP -# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE -#endif diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h deleted file mode 100644 index ba6e934fe7..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. - * - * IRQ priorities: - * 15...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F4xx_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 336 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE - -/* - * IRQ system settings. - */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk deleted file mode 100644 index bb00b1a2b0..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk +++ /dev/null @@ -1,9 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE/board.c - -# Required include directories -BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE - -# Shared variables -ALLCSRC += $(BOARDSRC) -ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h deleted file mode 100644 index 30af6b0c86..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h +++ /dev/null @@ -1,20 +0,0 @@ -/* 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 . - */ -#pragma once - -#include_next "board.h" - -#undef STM32_HSE_BYPASS diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h deleted file mode 100644 index 4da3d39a32..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h +++ /dev/null @@ -1,5 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h deleted file mode 100644 index e181422eba..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* 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 . - */ -#pragma once - -#define BOARD_OTG_NOVBUSSENS 1 - -#ifndef STM32_LSECLK -# define STM32_LSECLK 32768U -#endif // STM32_LSECLK - -#ifndef STM32_HSECLK -# define STM32_HSECLK 25000000U -#endif // STM32_HSECLK - -#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP -# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE -#endif diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h deleted file mode 100644 index 0394ff56bb..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. - * - * IRQ priorities: - * 15...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F4xx_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 384 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 8 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE - -/* - * IRQ system settings. - */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld deleted file mode 100644 index 82253d3de5..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld +++ /dev/null @@ -1,89 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * STM32F411xC memory setup. - */ -MEMORY -{ - flash0 (rx) : org = 0x08000000 + 64k, len = 256k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */ - flash1 (rx) : org = 0x00000000, len = 0 - flash2 (rx) : org = 0x00000000, len = 0 - flash3 (rx) : org = 0x00000000, len = 0 - flash4 (rx) : org = 0x00000000, len = 0 - flash5 (rx) : org = 0x00000000, len = 0 - flash6 (rx) : org = 0x00000000, len = 0 - flash7 (rx) : org = 0x00000000, len = 0 - ram0 (wx) : org = 0x20000000, len = 128k - ram1 (wx) : org = 0x00000000, len = 0 - ram2 (wx) : org = 0x00000000, len = 0 - ram3 (wx) : org = 0x00000000, len = 0 - ram4 (wx) : org = 0x00000000, len = 0 - ram5 (wx) : org = 0x00000000, len = 0 - ram6 (wx) : org = 0x00000000, len = 0 - ram7 (wx) : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld - -/* TinyUF2 bootloader reset support */ -_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */ - diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld deleted file mode 100644 index 1656c67bf7..0000000000 --- a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld +++ /dev/null @@ -1,89 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * STM32F411xE memory setup. - */ -MEMORY -{ - flash0 (rx) : org = 0x08000000 + 64k, len = 512k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */ - flash1 (rx) : org = 0x00000000, len = 0 - flash2 (rx) : org = 0x00000000, len = 0 - flash3 (rx) : org = 0x00000000, len = 0 - flash4 (rx) : org = 0x00000000, len = 0 - flash5 (rx) : org = 0x00000000, len = 0 - flash6 (rx) : org = 0x00000000, len = 0 - flash7 (rx) : org = 0x00000000, len = 0 - ram0 (wx) : org = 0x20000000, len = 128k - ram1 (wx) : org = 0x00000000, len = 0 - ram2 (wx) : org = 0x00000000, len = 0 - ram3 (wx) : org = 0x00000000, len = 0 - ram4 (wx) : org = 0x00000000, len = 0 - ram5 (wx) : org = 0x00000000, len = 0 - ram6 (wx) : org = 0x00000000, len = 0 - ram7 (wx) : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld - -/* TinyUF2 bootloader reset support */ -_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */ - diff --git a/platforms/chibios/GENERIC_STM32_F042X6/board/board.c b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c deleted file mode 100644 index 0d7c88756a..0000000000 --- a/platforms/chibios/GENERIC_STM32_F042X6/board/board.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include -#include - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported variables. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver local variables and types. */ -/*===========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { -#if STM32_HAS_GPIOA || defined(__DOXYGEN__) - gpio_setup_t PAData; -#endif -#if STM32_HAS_GPIOB || defined(__DOXYGEN__) - gpio_setup_t PBData; -#endif -#if STM32_HAS_GPIOC || defined(__DOXYGEN__) - gpio_setup_t PCData; -#endif -#if STM32_HAS_GPIOD || defined(__DOXYGEN__) - gpio_setup_t PDData; -#endif -#if STM32_HAS_GPIOE || defined(__DOXYGEN__) - gpio_setup_t PEData; -#endif -#if STM32_HAS_GPIOF || defined(__DOXYGEN__) - gpio_setup_t PFData; -#endif -#if STM32_HAS_GPIOG || defined(__DOXYGEN__) - gpio_setup_t PGData; -#endif -#if STM32_HAS_GPIOH || defined(__DOXYGEN__) - gpio_setup_t PHData; -#endif -#if STM32_HAS_GPIOI || defined(__DOXYGEN__) - gpio_setup_t PIData; -#endif -#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) - gpio_setup_t PJData; -#endif -#if STM32_HAS_GPIOK || defined(__DOXYGEN__) - gpio_setup_t PKData; -#endif -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, -#endif -#if STM32_HAS_GPIOJ - {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, - VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, -#endif -#if STM32_HAS_GPIOK - {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, - VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} -#endif -}; - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - - /* Enabling GPIO-related clocks, the mask comes from the - registry header file.*/ - rccResetAHB(STM32_GPIO_EN_MASK); - rccEnableAHB(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ -#if STM32_HAS_GPIOA - gpio_init(GPIOA, &gpio_default_config.PAData); -#endif -#if STM32_HAS_GPIOB - gpio_init(GPIOB, &gpio_default_config.PBData); -#endif -#if STM32_HAS_GPIOC - gpio_init(GPIOC, &gpio_default_config.PCData); -#endif -#if STM32_HAS_GPIOD - gpio_init(GPIOD, &gpio_default_config.PDData); -#endif -#if STM32_HAS_GPIOE - gpio_init(GPIOE, &gpio_default_config.PEData); -#endif -#if STM32_HAS_GPIOF - gpio_init(GPIOF, &gpio_default_config.PFData); -#endif -#if STM32_HAS_GPIOG - gpio_init(GPIOG, &gpio_default_config.PGData); -#endif -#if STM32_HAS_GPIOH - gpio_init(GPIOH, &gpio_default_config.PHData); -#endif -#if STM32_HAS_GPIOI - gpio_init(GPIOI, &gpio_default_config.PIData); -#endif -#if STM32_HAS_GPIOJ - gpio_init(GPIOJ, &gpio_default_config.PJData); -#endif -#if STM32_HAS_GPIOK - gpio_init(GPIOK, &gpio_default_config.PKData); -#endif -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -/** - * @brief Early initialization code. - * @details GPIO ports and system clocks are initialized before everything - * else. - */ -void __early_init(void) { - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementat