vector.asm 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ;
  2. ; Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
  3. ;
  4. ; SPDX-License-Identifier: Apache-2.0
  5. ;
  6. ; Change Logs:
  7. ; Date Author Notes
  8. ; 2021-11-16 Dystopia the first version
  9. ;
  10. ;-----------------------------------------------------------
  11. ; interrupt vector table for C6000 DSP
  12. ;-----------------------------------------------------------
  13. ;-----------------------------------------------------------
  14. ; extern function
  15. ;-----------------------------------------------------------
  16. .ref _c_int00 ; entry point
  17. .ref _nmi_handler
  18. .ref _bad_handler
  19. .ref _int4_handler
  20. .ref _int5_handler
  21. .ref _int6_handler
  22. .ref _int7_handler
  23. .ref _int8_handler
  24. .ref _int9_handler
  25. .ref _int10_handler
  26. .ref _int11_handler
  27. .ref _int12_handler
  28. .ref _int13_handler
  29. .ref _int14_handler
  30. .ref _int15_handler
  31. ;-----------------------------------------------------------
  32. ; macro definition
  33. ;-----------------------------------------------------------
  34. ;
  35. ; create interrupt vector for reset (interrupt 0)
  36. ;
  37. VEC_RESET .macro addr
  38. MVKL addr,B0
  39. MVKH addr,B0
  40. B B0
  41. MVC PCE1,B0
  42. NOP 4
  43. .align 32
  44. .endm
  45. ;
  46. ; create interrupt vector for other used interrupts
  47. ;
  48. IRQVEC .macro __name, __isr
  49. .align 32
  50. .hidden __name
  51. .global __name
  52. __name:
  53. B .S2 __isr
  54. NOP
  55. NOP
  56. NOP
  57. NOP
  58. NOP
  59. NOP
  60. NOP
  61. .endm
  62. ;
  63. ;-----------------------------------------------------------
  64. ;
  65. ;
  66. ; vector table
  67. ;
  68. .sect ".vecs"
  69. .align 32
  70. .global vector
  71. vector:
  72. VEC_RESET _c_int00
  73. IRQVEC NMI, _nmi_handler
  74. IRQVEC AINT, _bad_handler
  75. IRQVEC MSGINT, _bad_handler
  76. IRQVEC INT4, _int4_handler
  77. IRQVEC INT5, _int5_handler
  78. IRQVEC INT6, _int6_handler
  79. IRQVEC INT7, _int7_handler
  80. IRQVEC INT8, _int8_handler
  81. IRQVEC INT9, _int9_handler
  82. IRQVEC INT10, _int10_handler
  83. IRQVEC INT11, _int11_handler
  84. IRQVEC INT12, _int12_handler
  85. IRQVEC INT13, _int13_handler
  86. IRQVEC INT14, _int14_handler
  87. IRQVEC INT15, _int15_handler
  88. .end