diff options
author | IBNobody <ibnobody@gmail.com> | 2016-08-23 20:53:21 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-08-23 20:53:21 -0500 |
commit | 5d685efa499e833c4a8215a18562b2d0c4a21f2f (patch) | |
tree | b2a325a44338e1a083b38e089aa94e887141e3b4 /tmk_core/tool | |
parent | 705c775a4a433249081321cea0c2def2627817dc (diff) | |
parent | 9263ade0fbdde6431fb5c7f26970754c5c7c2963 (diff) | |
download | firmware-5d685efa499e833c4a8215a18562b2d0c4a21f2f.tar.gz firmware-5d685efa499e833c4a8215a18562b2d0c4a21f2f.tar.bz2 firmware-5d685efa499e833c4a8215a18562b2d0c4a21f2f.zip |
Merge remote-tracking branch 'refs/remotes/origin/master' into vision_division_dev
Diffstat (limited to 'tmk_core/tool')
-rw-r--r-- | tmk_core/tool/chibios/ch-bootloader-jump.patch | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/tmk_core/tool/chibios/ch-bootloader-jump.patch b/tmk_core/tool/chibios/ch-bootloader-jump.patch index d88657621..c6eb2405c 100644 --- a/tmk_core/tool/chibios/ch-bootloader-jump.patch +++ b/tmk_core/tool/chibios/ch-bootloader-jump.patch @@ -3,114 +3,114 @@ 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. */
- /*===========================================================================*/
+ #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
-
+ .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
-
- /** @} */
+ 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. */
- /*===========================================================================*/
+ #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
-
+ .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__) */
-
- /** @} */
+ /* 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__) */ + + /** @} */ |