From b8443863c0ae54349ee61411c0c09863a5ad0b8e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 22 Nov 2020 21:12:30 +0000 Subject: [PATCH] Remove references to ch-bootloader-jump.patch (#10998) --- keyboards/at_at/660m/bootloader_defs.h | 2 - .../satisfaction75/bootloader_defs.h | 2 - keyboards/chavdai40/bootloader_defs.h | 2 - keyboards/clueboard/66_hotswap/gen1/config.h | 2 - .../bluepill/bluepill70/bootloader_defs.h | 2 - keyboards/matrix/m20add/bootloader_defs.h | 2 - keyboards/matrix/noah/bootloader_defs.h | 2 - keyboards/nebula12/bootloader_defs.h | 2 - .../configs/bootloader_defs.h | 2 - .../configs/bootloader_defs.h | 2 - .../configs/bootloader_defs.h | 2 - tmk_core/tool/chibios/.gitignore | 2 - .../tool/chibios/ch-bootloader-jump.patch | 116 ------------------ 13 files changed, 140 deletions(-) delete mode 100644 tmk_core/tool/chibios/.gitignore delete mode 100644 tmk_core/tool/chibios/ch-bootloader-jump.patch diff --git a/keyboards/at_at/660m/bootloader_defs.h b/keyboards/at_at/660m/bootloader_defs.h index 02c48c4e6..dccd0fa5d 100644 --- a/keyboards/at_at/660m/bootloader_defs.h +++ b/keyboards/at_at/660m/bootloader_defs.h @@ -1,7 +1,5 @@ /* Address for jumping to bootloader on STM32 chips. */ /* It is chip dependent, the correct number can be looked up here (page 175): * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/satisfaction75/bootloader_defs.h b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h index 02c48c4e6..dccd0fa5d 100644 --- a/keyboards/cannonkeys/satisfaction75/bootloader_defs.h +++ b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h @@ -1,7 +1,5 @@ /* Address for jumping to bootloader on STM32 chips. */ /* It is chip dependent, the correct number can be looked up here (page 175): * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/chavdai40/bootloader_defs.h b/keyboards/chavdai40/bootloader_defs.h index 4994be9c2..6b218f7bd 100644 --- a/keyboards/chavdai40/bootloader_defs.h +++ b/keyboards/chavdai40/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index ea01a078b..7c90d05b3 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -27,8 +27,6 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/handwired/bluepill/bluepill70/bootloader_defs.h b/keyboards/handwired/bluepill/bluepill70/bootloader_defs.h index 0f45203cb..46c37a25e 100644 --- a/keyboards/handwired/bluepill/bluepill70/bootloader_defs.h +++ b/keyboards/handwired/bluepill/bluepill70/bootloader_defs.h @@ -1,8 +1,6 @@ /* Address for jumping to bootloader on STM32 chips. */ /* It is chip dependent, the correct number can be looked up here (page 175): * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ // STM32F103* does NOT have an USB bootloader in ROM (only serial), diff --git a/keyboards/matrix/m20add/bootloader_defs.h b/keyboards/matrix/m20add/bootloader_defs.h index 20b8f73e6..4da3d39a3 100644 --- a/keyboards/matrix/m20add/bootloader_defs.h +++ b/keyboards/matrix/m20add/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 diff --git a/keyboards/matrix/noah/bootloader_defs.h b/keyboards/matrix/noah/bootloader_defs.h index 20b8f73e6..4da3d39a3 100644 --- a/keyboards/matrix/noah/bootloader_defs.h +++ b/keyboards/matrix/noah/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 diff --git a/keyboards/nebula12/bootloader_defs.h b/keyboards/nebula12/bootloader_defs.h index 02c48c4e6..dccd0fa5d 100644 --- a/keyboards/nebula12/bootloader_defs.h +++ b/keyboards/nebula12/bootloader_defs.h @@ -1,7 +1,5 @@ /* Address for jumping to bootloader on STM32 chips. */ /* It is chip dependent, the correct number can be looked up here (page 175): * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h index 4994be9c2..6b218f7bd 100644 --- a/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h +++ b/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h index 02c48c4e6..dccd0fa5d 100644 --- a/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h +++ b/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h @@ -1,7 +1,5 @@ /* Address for jumping to bootloader on STM32 chips. */ /* It is chip dependent, the correct number can be looked up here (page 175): * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h index 3b0e9d20a..87ac7b10d 100644 --- a/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/tmk_core/tool/chibios/.gitignore b/tmk_core/tool/chibios/.gitignore deleted file mode 100644 index 88bbafe34..000000000 --- a/tmk_core/tool/chibios/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -chibios -chibios-contrib diff --git a/tmk_core/tool/chibios/ch-bootloader-jump.patch b/tmk_core/tool/chibios/ch-bootloader-jump.patch deleted file mode 100644 index c6eb2405c..000000000 --- a/tmk_core/tool/chibios/ch-bootloader-jump.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff --git a/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s b/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s -index 51a79bb..42d07bd 100644 ---- a/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s -+++ b/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s -@@ -105,6 +105,13 @@ - #define CRT0_CALL_DESTRUCTORS TRUE - #endif - -+/** -+ * @brief Magic number for jumping to bootloader. -+ */ -+#if !defined(MAGIC_BOOTLOADER_NUMBER) || defined(__DOXYGEN__) -+#define MAGIC_BOOTLOADER_NUMBER 0xDEADBEEF -+#endif -+ - /*===========================================================================*/ - /* Code section. */ - /*===========================================================================*/ -@@ -124,6 +131,17 @@ - .thumb_func - .global Reset_Handler - Reset_Handler: -+ -+#ifdef STM32_BOOTLOADER_ADDRESS -+ /* jump to bootloader code */ -+ ldr r0, =__ram0_end__-4 -+ ldr r1, =MAGIC_BOOTLOADER_NUMBER -+ ldr r2, [r0, #0] -+ str r0, [r0, #0] /* erase stored magic */ -+ cmp r2, r1 -+ beq Bootloader_Jump -+#endif /* STM32_BOOTLOADER_ADDRESS */ -+ - /* Interrupts are globally masked initially.*/ - cpsid i - -@@ -242,6 +260,21 @@ endfiniloop: - ldr r1, =__default_exit - bx r1 - -+#ifdef STM32_BOOTLOADER_ADDRESS -+/* -+ * Jump-to-bootloader function. -+ */ -+ -+ .align 2 -+ .thumb_func -+Bootloader_Jump: -+ ldr r0, =STM32_BOOTLOADER_ADDRESS -+ ldr r1, [r0, #0] -+ mov sp, r1 -+ ldr r0, [r0, #4] -+ bx r0 -+#endif /* STM32_BOOTLOADER_ADDRESS */ -+ - #endif - - /** @} */ -diff --git a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s -index 4812a29..dca9f88 100644 ---- a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s -+++ b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s -@@ -140,6 +140,13 @@ - #define CRT0_CPACR_INIT 0x00F00000 - #endif - -+/** -+ * @brief Magic number for jumping to bootloader. -+ */ -+#if !defined(MAGIC_BOOTLOADER_NUMBER) || defined(__DOXYGEN__) -+#define MAGIC_BOOTLOADER_NUMBER 0xDEADBEEF -+#endif -+ - /*===========================================================================*/ - /* Code section. */ - /*===========================================================================*/ -@@ -164,6 +171,17 @@ - .thumb_func - .global Reset_Handler - Reset_Handler: -+ -+#ifdef STM32_BOOTLOADER_ADDRESS -+ /* jump to bootloader code */ -+ ldr r0, =__ram0_end__-4 -+ ldr r1, =MAGIC_BOOTLOADER_NUMBER -+ ldr r2, [r0, #0] -+ str r0, [r0, #0] /* erase stored magic */ -+ cmp r2, r1 -+ beq Bootloader_Jump -+#endif /* STM32_BOOTLOADER_ADDRESS */ -+ - /* Interrupts are globally masked initially.*/ - cpsid i - -@@ -305,6 +323,21 @@ endfiniloop: - /* Branching to the defined exit handler.*/ - b __default_exit - -+#ifdef STM32_BOOTLOADER_ADDRESS -+/* -+ * Jump-to-bootloader function. -+ */ -+ -+ .align 2 -+ .thumb_func -+Bootloader_Jump: -+ ldr r0, =STM32_BOOTLOADER_ADDRESS -+ ldr r1, [r0, #0] -+ mov sp, r1 -+ ldr r0, [r0, #4] -+ bx r0 -+#endif /* STM32_BOOTLOADER_ADDRESS */ -+ - #endif /* !defined(__DOXYGEN__) */ - - /** @} */