vectors.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .syntax unified
  2. .section .vector_table
  3. .global vector_table
  4. vector_table:
  5. /* Top of stack */
  6. .word _thread_stacktop
  7. /* Exceptions (1-15) */
  8. #define E(x) .word x; .weak x; .thumb_set x, EXC_unused;
  9. E(EXC_reset)
  10. E(EXC_nmi)
  11. E(EXC_hard_fault)
  12. E(EXC_memory_management_fault)
  13. E(EXC_bus_fault)
  14. E(EXC_usage_fault)
  15. E(EXC_7)
  16. E(EXC_8)
  17. E(EXC_9)
  18. E(EXC_10)
  19. E(EXC_sv_call)
  20. E(EXC_12)
  21. E(EXC_13)
  22. E(EXC_pend_sv)
  23. E(EXC_systick)
  24. /* Interrupts/IRQs (0-67) */
  25. #define I(n) E(IRQ_##n)
  26. I( 0) I( 1) I( 2) I( 3) I( 4) I( 5) I( 6) I( 7) I( 8) I( 9)
  27. I(10) I(11) I(12) I(13) I(14) I(15) I(16) I(17) I(18) I(19)
  28. I(20) I(21) I(22) I(23) I(24) I(25) I(26) I(27) I(28) I(29)
  29. I(30) I(31) I(32) I(33) I(34) I(35) I(36) I(37) I(38) I(39)
  30. I(40) I(41) I(42) I(43) I(44) I(45) I(46) I(47) I(48) I(49)
  31. I(50) I(51) I(52) I(53) I(54) I(55) I(56) I(57) I(58) I(59)
  32. I(60) I(61) I(62) I(63) I(64) I(65) I(66) I(67)
  33. .text
  34. .thumb_func
  35. .global EXC_unused
  36. EXC_unused:
  37. push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
  38. mov r0, sp
  39. b EXC_unexpected