Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot
2026-11-16 16:01:44 +00:00
5 changed files with 15 additions and 9 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@)
# For a ChibiOS build, ensure that the board files have the hook overrides injected
define BOARDSRC_INJECT_HOOKS
$(INTERMEDIATE_OUTPUT)/$(patsubst %.c,%.o,$(patsubst ./%,%,$1)): FILE_SPECIFIC_CFLAGS += -include $(TOP_DIR)/tmk_core/protocol/chibios/init_hooks.h
$(INTERMEDIATE_OUTPUT)/$(patsubst %.c,%.o,$(patsubst ./%,%,$1)): FILE_SPECIFIC_CFLAGS += -include $(TOP_DIR)/platforms/chibios/init_hooks.h
endef
$(foreach LOBJ, $(BOARDSRC), $(eval $(call BOARDSRC_INJECT_HOOKS,$(LOBJ))))
@@ -34,16 +34,12 @@ const PALConfig pal_default_config =
};
#endif
__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {}
/*
* Early initialization code.
* This initialization must be performed just after stack setup and before
* any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
stm32_clock_init();
}
@@ -51,8 +47,8 @@ void __early_init(void) {
* Board-specific initialization code.
*/
void boardInit(void) {
//JTAG-DP Disabled and SW-DP Enabled
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
//Set backup register DR10 to enter bootloader on reset
BKP->DR10 = RTC_BOOTLOADER_FLAG;
//JTAG-DP Disabled and SW-DP Enabled
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
//Set backup register DR10 to enter bootloader on reset
BKP->DR10 = RTC_BOOTLOADER_FLAG;
}
@@ -2,6 +2,10 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
#endif
// Value to place in RTC backup register 10 for persistent bootloader mode
#define RTC_BOOTLOADER_FLAG 0x424C
@@ -26,3 +26,6 @@ __attribute__((weak)) void mcu_reset(void) {
BKP->DR10 = RTC_BOOTLOADER_JUST_UPLOADED;
NVIC_SystemReset();
}
/* not needed by default, no two-stage reset */
__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {}
@@ -1,3 +1,6 @@
// Copyright 2020 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
// Override the initialisation functions inside the ChibiOS board.c files