ses_nrf52_startup.s 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*****************************************************************************
  2. * Copyright (c) 2014 Rowley Associates Limited. *
  3. * *
  4. * This file may be distributed under the terms of the License Agreement *
  5. * provided with this software. *
  6. * *
  7. * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE *
  8. * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
  9. *****************************************************************************/
  10. .macro ISR_HANDLER name=
  11. .section .vectors, "ax"
  12. .word \name
  13. .section .init, "ax"
  14. .thumb_func
  15. .weak \name
  16. \name:
  17. 1: b 1b /* endless loop */
  18. .endm
  19. .macro ISR_RESERVED
  20. .section .vectors, "ax"
  21. .word 0
  22. .endm
  23. .syntax unified
  24. .global reset_handler
  25. .section .vectors, "ax"
  26. .code 16
  27. .global _vectors
  28. .macro DEFAULT_ISR_HANDLER name=
  29. .thumb_func
  30. .weak \name
  31. \name:
  32. 1: b 1b /* endless loop */
  33. .endm
  34. _vectors:
  35. .word __stack_end__
  36. .word reset_handler
  37. ISR_HANDLER NMI_Handler
  38. ISR_HANDLER HardFault_Handler
  39. ISR_HANDLER MemoryManagement_Handler
  40. ISR_HANDLER BusFault_Handler
  41. ISR_HANDLER UsageFault_Handler
  42. ISR_RESERVED
  43. ISR_RESERVED
  44. ISR_RESERVED
  45. ISR_RESERVED
  46. ISR_HANDLER SVC_Handler
  47. ISR_HANDLER DebugMon_Handler
  48. ISR_RESERVED
  49. ISR_HANDLER PendSV_Handler
  50. ISR_HANDLER SysTick_Handler
  51. // External interrupts start here
  52. ISR_HANDLER POWER_CLOCK_IRQHandler
  53. ISR_HANDLER RADIO_IRQHandler
  54. ISR_HANDLER UARTE0_UART0_IRQHandler
  55. ISR_HANDLER SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
  56. ISR_HANDLER SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
  57. ISR_HANDLER NFCT_IRQHandler
  58. ISR_HANDLER GPIOTE_IRQHandler
  59. ISR_HANDLER SAADC_IRQHandler
  60. ISR_HANDLER TIMER0_IRQHandler
  61. ISR_HANDLER TIMER1_IRQHandler
  62. ISR_HANDLER TIMER2_IRQHandler
  63. ISR_HANDLER RTC0_IRQHandler
  64. ISR_HANDLER TEMP_IRQHandler
  65. ISR_HANDLER RNG_IRQHandler
  66. ISR_HANDLER ECB_IRQHandler
  67. ISR_HANDLER CCM_AAR_IRQHandler
  68. ISR_HANDLER WDT_IRQHandler
  69. ISR_HANDLER RTC1_IRQHandler
  70. ISR_HANDLER QDEC_IRQHandler
  71. ISR_HANDLER COMP_LPCOMP_IRQHandler
  72. ISR_HANDLER SWI0_EGU0_IRQHandler
  73. ISR_HANDLER SWI1_EGU1_IRQHandler
  74. ISR_HANDLER SWI2_EGU2_IRQHandler
  75. ISR_HANDLER SWI3_EGU3_IRQHandler
  76. ISR_HANDLER SWI4_EGU4_IRQHandler
  77. ISR_HANDLER SWI5_EGU5_IRQHandler
  78. ISR_HANDLER TIMER3_IRQHandler
  79. ISR_HANDLER TIMER4_IRQHandler
  80. ISR_HANDLER PWM0_IRQHandler
  81. ISR_HANDLER PDM_IRQHandler
  82. ISR_RESERVED /*Reserved */
  83. ISR_RESERVED /*Reserved */
  84. ISR_HANDLER MWU_IRQHandler
  85. ISR_HANDLER PWM1_IRQHandler
  86. ISR_HANDLER PWM2_IRQHandler
  87. ISR_HANDLER SPIM2_SPIS2_SPI2_IRQHandler
  88. ISR_HANDLER RTC2_IRQHandler
  89. ISR_HANDLER I2S_IRQHandler
  90. .section .vectors, "ax"
  91. _vectors_end:
  92. .section .init, "ax"
  93. .thumb_func
  94. reset_handler:
  95. #ifndef __NO_SYSTEM_INIT
  96. ldr r0, =__SRAM_segment_end__
  97. mov sp, r0
  98. bl SystemInit
  99. #endif
  100. b _start
  101. #ifndef __NO_SYSTEM_INIT
  102. .thumb_func
  103. .weak SystemInit
  104. SystemInit:
  105. bx lr
  106. #endif