Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

Exception.S 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2011.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  9. Permission to use, copy, modify, distribute, and sell this
  10. software and its documentation for any purpose is hereby granted
  11. without fee, provided that the above copyright notice appear in
  12. all copies and that both that the copyright notice and this
  13. permission notice and warranty disclaimer appear in supporting
  14. documentation, and that the name of the author not be used in
  15. advertising or publicity pertaining to distribution of the
  16. software without specific, written prior permission.
  17. The author disclaim all warranties with regard to this
  18. software, including all implied warranties of merchantability
  19. and fitness. In no event shall the author be liable for any
  20. special, indirect or consequential damages or any damages
  21. whatsoever resulting from loss of use, data or profits, whether
  22. in an action of contract, negligence or other tortious action,
  23. arising out of or in connection with the use or performance of
  24. this software.
  25. */
  26. #if defined(__AVR32__)
  27. #include <avr32/io.h>
  28. .section .exception_handlers, "ax", @progbits
  29. // ================= EXCEPTION TABLE ================
  30. .balign 0x200
  31. .global EVBA_Table
  32. EVBA_Table:
  33. .org 0x000
  34. Exception_Unrecoverable_Exception:
  35. rjmp $
  36. .org 0x004
  37. Exception_TLB_Multiple_Hit:
  38. rjmp $
  39. .org 0x008
  40. Exception_Bus_Error_Data_Fetch:
  41. rjmp $
  42. .org 0x00C
  43. Exception_Bus_Error_Instruction_Fetch:
  44. rjmp $
  45. .org 0x010
  46. Exception_NMI:
  47. rjmp $
  48. .org 0x014
  49. Exception_Instruction_Address:
  50. rjmp $
  51. .org 0x018
  52. Exception_ITLB_Protection:
  53. rjmp $
  54. .org 0x01C
  55. Exception_OCD_Breakpoint:
  56. rjmp $
  57. .org 0x020
  58. Exception_Illegal_Opcode:
  59. rjmp $
  60. .org 0x024
  61. Exception_Unimplemented_Instruction:
  62. rjmp $
  63. .org 0x028
  64. Exception_Privilege_Violation:
  65. rjmp $
  66. .org 0x02C
  67. Exception_Floating_Point:
  68. rjmp $
  69. .org 0x030
  70. Exception_Coprocessor_Absent:
  71. rjmp $
  72. .org 0x034
  73. Exception_Data_Address_Read:
  74. rjmp $
  75. .org 0x038
  76. Exception_Data_Address_Write:
  77. rjmp $
  78. .org 0x03C
  79. Exception_DTLB_Protection_Read:
  80. rjmp $
  81. .org 0x040
  82. Exception_DTLB_Protection_Write:
  83. rjmp $
  84. .org 0x044
  85. Exception_DTLB_Modified:
  86. rjmp $
  87. .org 0x050
  88. Exception_ITLB_Miss:
  89. rjmp $
  90. .org 0x060
  91. Exception_DTLB_Miss_Read:
  92. rjmp $
  93. .org 0x070
  94. Exception_DTLB_Miss_Write:
  95. rjmp $
  96. .org 0x100
  97. Exception_Supervisor_Call:
  98. rjmp $
  99. // ============== END OF EXCEPTION TABLE =============
  100. // ============= GENERAL INTERRUPT HANDLER ===========
  101. .balign 4
  102. .irp Level, 0, 1, 2, 3
  103. Exception_INT\Level:
  104. mov r12, \Level
  105. call INTC_GetInterruptHandler
  106. mov pc, r12
  107. .endr
  108. // ========= END OF GENERAL INTERRUPT HANDLER ========
  109. // ====== GENERAL INTERRUPT HANDLER OFFSET TABLE ======
  110. .balign 4
  111. .global Autovector_Table
  112. Autovector_Table:
  113. .irp Level, 0, 1, 2, 3
  114. .word ((AVR32_INTC_INT0 + \Level) << AVR32_INTC_IPR_INTLEVEL_OFFSET) | (Exception_INT\Level - EVBA_Table)
  115. .endr
  116. // === END OF GENERAL INTERRUPT HANDLER OFFSET TABLE ===
  117. #endif