diff options
| author | Joel Challis <git@zvecr.com> | 2020-11-22 21:12:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-22 21:12:30 +0000 |
| commit | b8443863c0ae54349ee61411c0c09863a5ad0b8e (patch) | |
| tree | 004d4cf5d317c4cd8988ccb95135531105130c3a /tmk_core | |
| parent | c731628946c71faa56491c89ed59f95ab8e60d97 (diff) | |
| download | qmk_firmware-b8443863c0ae54349ee61411c0c09863a5ad0b8e.tar.gz qmk_firmware-b8443863c0ae54349ee61411c0c09863a5ad0b8e.zip | |
Remove references to ch-bootloader-jump.patch (#10998)
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/tool/chibios/.gitignore | 2 | ||||
| -rw-r--r-- | tmk_core/tool/chibios/ch-bootloader-jump.patch | 116 |
2 files changed, 0 insertions, 118 deletions
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 @@ | |||
| 1 | chibios | ||
| 2 | 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 @@ | |||
| 1 | diff --git a/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s b/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s | ||
| 2 | index 51a79bb..42d07bd 100644 | ||
| 3 | --- a/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s | ||
| 4 | +++ b/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s | ||
| 5 | @@ -105,6 +105,13 @@ | ||
| 6 | #define CRT0_CALL_DESTRUCTORS TRUE | ||
| 7 | #endif | ||
| 8 | |||
| 9 | +/** | ||
| 10 | + * @brief Magic number for jumping to bootloader. | ||
| 11 | + */ | ||
| 12 | +#if !defined(MAGIC_BOOTLOADER_NUMBER) || defined(__DOXYGEN__) | ||
| 13 | +#define MAGIC_BOOTLOADER_NUMBER 0xDEADBEEF | ||
| 14 | +#endif | ||
| 15 | + | ||
| 16 | /*===========================================================================*/ | ||
| 17 | /* Code section. */ | ||
| 18 | /*===========================================================================*/ | ||
| 19 | @@ -124,6 +131,17 @@ | ||
| 20 | .thumb_func | ||
| 21 | .global Reset_Handler | ||
| 22 | Reset_Handler: | ||
| 23 | + | ||
| 24 | +#ifdef STM32_BOOTLOADER_ADDRESS | ||
| 25 | + /* jump to bootloader code */ | ||
| 26 | + ldr r0, =__ram0_end__-4 | ||
| 27 | + ldr r1, =MAGIC_BOOTLOADER_NUMBER | ||
| 28 | + ldr r2, [r0, #0] | ||
| 29 | + str r0, [r0, #0] /* erase stored magic */ | ||
| 30 | + cmp r2, r1 | ||
| 31 | + beq Bootloader_Jump | ||
| 32 | +#endif /* STM32_BOOTLOADER_ADDRESS */ | ||
| 33 | + | ||
| 34 | /* Interrupts are globally masked initially.*/ | ||
| 35 | cpsid i | ||
| 36 | |||
| 37 | @@ -242,6 +260,21 @@ endfiniloop: | ||
| 38 | ldr r1, =__default_exit | ||
| 39 | bx r1 | ||
| 40 | |||
| 41 | +#ifdef STM32_BOOTLOADER_ADDRESS | ||
| 42 | +/* | ||
| 43 | + * Jump-to-bootloader function. | ||
| 44 | + */ | ||
| 45 | + | ||
| 46 | + .align 2 | ||
| 47 | + .thumb_func | ||
| 48 | +Bootloader_Jump: | ||
| 49 | + ldr r0, =STM32_BOOTLOADER_ADDRESS | ||
| 50 | + ldr r1, [r0, #0] | ||
| 51 | + mov sp, r1 | ||
| 52 | + ldr r0, [r0, #4] | ||
| 53 | + bx r0 | ||
| 54 | +#endif /* STM32_BOOTLOADER_ADDRESS */ | ||
| 55 | + | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /** @} */ | ||
| 59 | diff --git a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s | ||
| 60 | index 4812a29..dca9f88 100644 | ||
| 61 | --- a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s | ||
| 62 | +++ b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s | ||
| 63 | @@ -140,6 +140,13 @@ | ||
| 64 | #define CRT0_CPACR_INIT 0x00F00000 | ||
| 65 | #endif | ||
| 66 | |||
| 67 | +/** | ||
| 68 | + * @brief Magic number for jumping to bootloader. | ||
| 69 | + */ | ||
| 70 | +#if !defined(MAGIC_BOOTLOADER_NUMBER) || defined(__DOXYGEN__) | ||
| 71 | +#define MAGIC_BOOTLOADER_NUMBER 0xDEADBEEF | ||
| 72 | +#endif | ||
| 73 | + | ||
| 74 | /*===========================================================================*/ | ||
| 75 | /* Code section. */ | ||
| 76 | /*===========================================================================*/ | ||
| 77 | @@ -164,6 +171,17 @@ | ||
| 78 | .thumb_func | ||
| 79 | .global Reset_Handler | ||
| 80 | Reset_Handler: | ||
| 81 | + | ||
| 82 | +#ifdef STM32_BOOTLOADER_ADDRESS | ||
| 83 | + /* jump to bootloader code */ | ||
| 84 | + ldr r0, =__ram0_end__-4 | ||
| 85 | + ldr r1, =MAGIC_BOOTLOADER_NUMBER | ||
| 86 | + ldr r2, [r0, #0] | ||
| 87 | + str r0, [r0, #0] /* erase stored magic */ | ||
| 88 | + cmp r2, r1 | ||
| 89 | + beq Bootloader_Jump | ||
| 90 | +#endif /* STM32_BOOTLOADER_ADDRESS */ | ||
| 91 | + | ||
| 92 | /* Interrupts are globally masked initially.*/ | ||
| 93 | cpsid i | ||
| 94 | |||
| 95 | @@ -305,6 +323,21 @@ endfiniloop: | ||
| 96 | /* Branching to the defined exit handler.*/ | ||
| 97 | b __default_exit | ||
| 98 | |||
| 99 | +#ifdef STM32_BOOTLOADER_ADDRESS | ||
| 100 | +/* | ||
| 101 | + * Jump-to-bootloader function. | ||
| 102 | + */ | ||
| 103 | + | ||
| 104 | + .align 2 | ||
| 105 | + .thumb_func | ||
| 106 | +Bootloader_Jump: | ||
| 107 | + ldr r0, =STM32_BOOTLOADER_ADDRESS | ||
| 108 | + ldr r1, [r0, #0] | ||
| 109 | + mov sp, r1 | ||
| 110 | + ldr r0, [r0, #4] | ||
| 111 | + bx r0 | ||
| 112 | +#endif /* STM32_BOOTLOADER_ADDRESS */ | ||
| 113 | + | ||
| 114 | #endif /* !defined(__DOXYGEN__) */ | ||
| 115 | |||
| 116 | /** @} */ | ||
