Compare commits

...

2 Commits

Author SHA1 Message Date
Nick Brassel
327f7ee9a7
Fixup ChibiOS header inclusion search ordering. (#19623)
* Add STM32F446-Nucleo onekey. 

* Fixup onekey build for F446, all keymaps.

* Fixup board inclusion search ordering.
2023-01-19 01:05:29 +00:00
Nick Brassel
17c9388af5
Allow for wildcard filtering in qmk mass-compile (#19625) 2023-01-18 22:36:32 +00:00
101 changed files with 203 additions and 95 deletions

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
/* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */ /* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */
#undef STM32_PLLM_VALUE #undef STM32_PLLM_VALUE
#define STM32_PLLM_VALUE 8 #define STM32_PLLM_VALUE 8

View File

@ -24,4 +24,4 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -19,7 +19,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM2 #undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM2 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill) #if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill)
# undef STM32_I2C_USE_I2C1 # undef STM32_I2C_USE_I2C1

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -24,4 +24,4 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -19,7 +19,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM2 #undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM2 TRUE

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -24,4 +24,4 @@
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -19,7 +19,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM2 #undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM2 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#if defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill) #if defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill)
# undef STM32_PWM_USE_ADVANCED # undef STM32_PWM_USE_ADVANCED

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI0 #undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE #define RP_SPI_USE_SPI0 TRUE

View File

@ -19,4 +19,4 @@
#define HAL_USE_SPI TRUE #define HAL_USE_SPI TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI1 #undef RP_SPI_USE_SPI1
#define RP_SPI_USE_SPI1 TRUE #define RP_SPI_USE_SPI1 TRUE

View File

@ -20,4 +20,4 @@
#define HAL_USE_SPI TRUE #define HAL_USE_SPI TRUE
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI1 #undef RP_SPI_USE_SPI1
#define RP_SPI_USE_SPI1 TRUE #define RP_SPI_USE_SPI1 TRUE

View File

@ -18,4 +18,4 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1 #undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE #define RP_I2C_USE_I2C1 TRUE

View File

@ -20,4 +20,4 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE #define HAL_USE_SPI TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_SPI_USE_SPI1 #undef RP_SPI_USE_SPI1
#define RP_SPI_USE_SPI1 TRUE #define RP_SPI_USE_SPI1 TRUE

View File

@ -19,4 +19,4 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_I2C_USE_I2C0 #undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 TRUE #define RP_I2C_USE_I2C0 TRUE

View File

@ -19,4 +19,4 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_I2C_USE_I2C0 #undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 TRUE #define RP_I2C_USE_I2C0 TRUE

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000U #define STM32_HSECLK 16000000U

View File

@ -18,4 +18,4 @@
// so we need to change resolution and frequency to match. // so we need to change resolution and frequency to match.
#define CH_CFG_ST_RESOLUTION 16 #define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h" #include_next <chconf.h>

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_SERIAL_USE_USART1 #undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE #define STM32_SERIAL_USE_USART1 TRUE

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM2 #undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM2 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1 #undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_USE_ADC1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1 #undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_USE_ADC1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1 #undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_USE_ADC1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1 #undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_USE_ADC1 TRUE

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef WB32_ADC_USE_ADC1 #undef WB32_ADC_USE_ADC1
#define WB32_ADC_USE_ADC1 TRUE #define WB32_ADC_USE_ADC1 TRUE

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef WB32_ADC_USE_ADC1 #undef WB32_ADC_USE_ADC1
#define WB32_ADC_USE_ADC1 TRUE #define WB32_ADC_USE_ADC1 TRUE

View File

@ -1,3 +1,5 @@
// Copyright 2020 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

View File

@ -0,0 +1,9 @@
// Copyright 2023 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 8000000U
#define STM32_HSE_BYPASS

View File

@ -0,0 +1,16 @@
// Copyright 2021 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "config_common.h"
#define BACKLIGHT_PWM_DRIVER PWMD4
#define BACKLIGHT_PWM_CHANNEL 3
#define BACKLIGHT_PAL_MODE 2
#define RGB_CI_PIN B13
#define ADC_PIN A0
#define SOLENOID_PINS { B12, B13, B14, B15 }
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }

View File

@ -0,0 +1,10 @@
// Copyright 2023 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define HAL_USE_ADC TRUE
#define HAL_USE_SPI TRUE
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View File

@ -0,0 +1,15 @@
{
"keyboard_name": "Onekey Nucleo F446RE",
"processor": "STM32F446",
"bootloader": "stm32-dfu",
"matrix_pins": {
"cols": ["A2"],
"rows": ["A1"]
},
"backlight": {
"pin": "B8"
},
"rgblight": {
"pin": "A0"
}
}

View File

@ -0,0 +1,23 @@
// Copyright 2023 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <mcuconf.h>
#undef STM32_PLLM_VALUE
#define STM32_PLLM_VALUE 4
#undef STM32_PLLSAIM_VALUE
#define STM32_PLLSAIM_VALUE 4
#undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE
#undef STM32_PWM_USE_TIM4
#define STM32_PWM_USE_TIM4 TRUE
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE

View File

@ -0,0 +1,5 @@
# STM32 Nucleo-L432 onekey
To trigger keypress, short together pins *A1* and *A2*.
You'll also need to connect `VIN`, `GND`, USB `D+` to `PA12`/`D2`, and USB `D-` to `PA11`/`D10`.

View File

@ -0,0 +1 @@
SRC += analog.c

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1 #undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE #define STM32_ADC_USE_ADC1 TRUE

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_PWM_USE_PWM0 #undef RP_PWM_USE_PWM0
#define RP_PWM_USE_PWM0 TRUE #define RP_PWM_USE_PWM0 TRUE

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -18,4 +18,4 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next "halconf.h" #include_next <halconf.h>

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1 #undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE #define RP_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -14,4 +14,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "chconf.h" #include_next <chconf.h>

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
// Underglow uses TIM4, Backlight TIM1, so both are enabled here. // Underglow uses TIM4, Backlight TIM1, so both are enabled here.
#undef STM32_PWM_USE_TIM1 #undef STM32_PWM_USE_TIM1

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C1 TRUE

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
// for i2c expander, and ISSI // for i2c expander, and ISSI
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "mcuconf.h" #include_next <mcuconf.h>
// for i2c expander, and ISSI // for i2c expander, and ISSI
#undef STM32_I2C_USE_I2C1 #undef STM32_I2C_USE_I2C1

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used // The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are // on the Planck requires the use of TIM2 to run PWM -- rework which timers are

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used // The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are // on the Planck requires the use of TIM2 to run PWM -- rework which timers are

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used // The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are // on the Planck requires the use of TIM2 to run PWM -- rework which timers are

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used // The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are // on the Planck requires the use of TIM2 to run PWM -- rework which timers are

View File

@ -19,4 +19,4 @@
#define CH_CFG_ST_RESOLUTION 16 #define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h" #include_next <chconf.h>

View File

@ -19,4 +19,4 @@
#define CH_CFG_ST_RESOLUTION 16 #define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h" #include_next <chconf.h>

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include_next "mcuconf.h" #include_next <mcuconf.h>
/* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */ /* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */
#undef STM32_PLLM_VALUE #undef STM32_PLLM_VALUE

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#ifdef BOARD_OTG_NOVBUSSENS #ifdef BOARD_OTG_NOVBUSSENS
# undef BOARD_OTG_NOVBUSSENS # undef BOARD_OTG_NOVBUSSENS

View File

@ -18,4 +18,4 @@
// so we need to change resolution and frequency to match. // so we need to change resolution and frequency to match.
#define CH_CFG_ST_RESOLUTION 16 #define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h" #include_next <chconf.h>

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSECLK #undef STM32_HSECLK
#define STM32_HSECLK 16000000 #define STM32_HSECLK 16000000

View File

@ -7,5 +7,5 @@
#if __has_include("platforms/chibios/common/configs/chconf.h") #if __has_include("platforms/chibios/common/configs/chconf.h")
# include_next "platforms/chibios/common/configs/chconf.h" # include_next "platforms/chibios/common/configs/chconf.h"
#else #else
# include_next "chconf.h" # include_next <chconf.h>
#endif #endif

View File

@ -12,6 +12,8 @@ from qmk.path import is_keyboard, keyboard
from qmk.git import git_get_ignored_files from qmk.git import git_get_ignored_files
from qmk.c_parse import c_source_files from qmk.c_parse import c_source_files
CHIBIOS_CONF_CHECKS = ['chconf.h', 'halconf.h', 'mcuconf.h', 'board.h']
def _list_defaultish_keymaps(kb): def _list_defaultish_keymaps(kb):
"""Return default like keymaps for a given keyboard """Return default like keymaps for a given keyboard
@ -64,6 +66,15 @@ def _handle_json_errors(kb, info):
return ok return ok
def _chibios_conf_includenext_check(target):
"""Check the ChibiOS conf.h for the correct inclusion of the next conf.h
"""
for i, line in enumerate(target.open()):
if f'#include_next "{target.name}"' in line:
return f'Found `#include_next "{target.name}"` on line {i} of {target}, should be `#include_next <{target.name}>` (use angle brackets, not quotes)'
return None
def _rules_mk_assignment_only(kb): def _rules_mk_assignment_only(kb):
"""Check the keyboard-level rules.mk to ensure it only has assignments. """Check the keyboard-level rules.mk to ensure it only has assignments.
""" """
@ -121,6 +132,12 @@ def keymap_check(kb, km):
cli.log.error(f'{kb}/{km}: The file "{file}" does not have a license header!') cli.log.error(f'{kb}/{km}: The file "{file}" does not have a license header!')
ok = False ok = False
if file.name in CHIBIOS_CONF_CHECKS:
check_error = _chibios_conf_includenext_check(file)
if check_error is not None:
cli.log.error(f'{kb}/{km}: {check_error}')
ok = False
return ok return ok
@ -153,6 +170,12 @@ def keyboard_check(kb):
cli.log.error(f'{kb}: The file "{file}" does not have a license header!') cli.log.error(f'{kb}: The file "{file}" does not have a license header!')
ok = False ok = False
if file.name in CHIBIOS_CONF_CHECKS:
check_error = _chibios_conf_includenext_check(file)
if check_error is not None:
cli.log.error(f'{kb}: {check_error}')
ok = False
return ok return ok

View File

@ -2,6 +2,7 @@
This will compile everything in parallel, for testing purposes. This will compile everything in parallel, for testing purposes.
""" """
import fnmatch
import logging import logging
import multiprocessing import multiprocessing
import os import os
@ -58,7 +59,8 @@ def _load_keymap_info(keyboard, keymap):
arg_only=True, arg_only=True,
action='append', action='append',
default=[], default=[],
help="Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the format 'features.rgblight=true'. May be passed multiple times, all filters need to match." help= # noqa: `format-python` and `pytest` don't agree here.
"Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the format 'features.rgblight=true'. May be passed multiple times, all filters need to match. Value may include wildcards such as '*' and '?'." # noqa: `format-python` and `pytest` don't agree here.
) )
@cli.argument('-km', '--keymap', type=str, default='default', help="The keymap name to build. Default is 'default'.") @cli.argument('-km', '--keymap', type=str, default='default', help="The keymap name to build. Default is 'default'.")
@cli.argument('-e', '--env', arg_only=True, action='append', default=[], help="Set a variable to be passed to make. May be passed multiple times.") @cli.argument('-e', '--env', arg_only=True, action='append', default=[], help="Set a variable to be passed to make. May be passed multiple times.")
@ -102,11 +104,13 @@ def mass_compile(cli):
cli.log.info(f'Filtering on condition ("{key}" == "{value}")...') cli.log.info(f'Filtering on condition ("{key}" == "{value}")...')
def _make_filter(k, v): def _make_filter(k, v):
expr = fnmatch.translate(v)
rule = re.compile(expr, re.IGNORECASE)
def f(e): def f(e):
lhs = e[2].get(k) lhs = e[2].get(k)
lhs = str(False if lhs is None else lhs).lower() lhs = str(False if lhs is None else lhs)
rhs = str(v).lower() return rule.search(lhs) is not None
return lhs == rhs
return f return f

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
// Force B9 as input to align with qmk defaults // Force B9 as input to align with qmk defaults
#undef VAL_GPIOB_MODER #undef VAL_GPIOB_MODER

View File

@ -15,6 +15,6 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -15,6 +15,6 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef BOARD_RP_PICO_RP2040 #undef BOARD_RP_PICO_RP2040
#define BOARD_GENERIC_PROMICRO_RP2040 #define BOARD_GENERIC_PROMICRO_RP2040

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef BOARD_RP_PICO_RP2040 #undef BOARD_RP_PICO_RP2040
#define BOARD_GENERIC_RP2040 #define BOARD_GENERIC_RP2040

View File

@ -15,6 +15,6 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
// Force B9 as input to align with qmk defaults // Force B9 as input to align with qmk defaults
#undef VAL_GPIOB_MODER #undef VAL_GPIOB_MODER

View File

@ -19,7 +19,7 @@
// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: // The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix:
#define BOARD_OTG_NOVBUSSENS #define BOARD_OTG_NOVBUSSENS
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -19,6 +19,6 @@
// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: // The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix:
#define BOARD_OTG_NOVBUSSENS #define BOARD_OTG_NOVBUSSENS
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -15,6 +15,6 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -19,6 +19,6 @@
// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: // The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix:
#define BOARD_OTG_NOVBUSSENS #define BOARD_OTG_NOVBUSSENS
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32L432xx #undef STM32L432xx
#define STM32L422xx #define STM32L422xx

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32L432xx #undef STM32L432xx

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef BOARD_RP_PICO_RP2040 #undef BOARD_RP_PICO_RP2040
#define BOARD_PM2040 #define BOARD_PM2040

View File

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include_next "board.h" #include_next <board.h>
#undef STM32_HSE_BYPASS #undef STM32_HSE_BYPASS

Some files were not shown because too many files have changed in this diff Show More