systick_wrapper_gnu.s 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ;/****************************************************************************
  2. ;* Copyright 2022 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
  3. ;* *
  4. ;* Licensed under the Apache License, Version 2.0 (the "License"); *
  5. ;* you may not use this file except in compliance with the License. *
  6. ;* You may obtain a copy of the License at *
  7. ;* *
  8. ;* http://www.apache.org/licenses/LICENSE-2.0 *
  9. ;* *
  10. ;* Unless required by applicable law or agreed to in writing, software *
  11. ;* distributed under the License is distributed on an "AS IS" BASIS, *
  12. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
  13. ;* See the License for the specific language governing permissions and *
  14. ;* limitations under the License. *
  15. ;* *
  16. ;****************************************************************************/
  17. .syntax unified
  18. .arch armv6-m
  19. .eabi_attribute Tag_ABI_align_preserved, 1
  20. .text
  21. .thumb
  22. .thumb_func
  23. .align 2
  24. .globl $Sub$$SysTick_Handler
  25. .type $Sub$$SysTick_Handler, %function
  26. $Sub$$SysTick_Handler:
  27. push {r4, r5}
  28. push {r4, lr}
  29. ldr R0, =user_code_insert_to_systick_handler
  30. blx R0
  31. pop {r4, r5}
  32. mov lr, r5
  33. pop {r4, r5}
  34. ldr R0, =$Super$$SysTick_Handler
  35. bx R0
  36. .globl __ensure_systick_wrapper
  37. .type __ensure_systick_wrapper, %function
  38. __ensure_systick_wrapper:
  39. bx lr