crt_mcf51cn.S 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright 2012 by Embedded Technologies s.r.o
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of the copyright holders nor the names of
  14. * contributors may be used to endorse or promote products derived
  15. * from this software without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  25. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  27. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. * SUCH DAMAGE.
  29. *
  30. * For additional information see http://www.ethernut.de/
  31. */
  32. //------------------------------------------------------------------------------
  33. // Peripheral vectors
  34. //------------------------------------------------------------------------------
  35. .section .vectors,"ax",%progbits
  36. vector40: .long IH_DEFAULT // 0x100 IRQ_pin
  37. vector41: .long IH_DEFAULT // 0x104 Low_voltage_detect
  38. vector42: .long IH_DEFAULT // 0x108 MCG_lock
  39. vector43: .long IH_DEFAULT // 0x10C TPM1_ch0
  40. vector44: .long IH_DEFAULT // 0x110 TPM1_ch1
  41. vector45: .long IH_DEFAULT // 0x114 TPM1_ch2
  42. vector46: .long IH_DEFAULT // 0x118 TPM1_ovfl
  43. vector47: .long IH_DEFAULT // 0x11C MTIM1_ovfl
  44. vector48: .long IH_DEFAULT // 0x120 TPM2_ch0
  45. vector49: .long IH_DEFAULT // 0x124 TPM2_ch1
  46. vector4A: .long IH_DEFAULT // 0x128 TPM2_ch2
  47. vector4B: .long IH_DEFAULT // 0x12C TPM2_ovfl
  48. vector4C: .long IH_DEFAULT // 0x130 SPI1
  49. vector4D: .long IH_DEFAULT // 0x134 SPI2
  50. vector4E: .long IH_DEFAULT // 0x138 MTIM2_ovfl
  51. vector4F: .long IH_DEFAULT // 0x13C SCI1_err
  52. vector50: .long IH_DEFAULT // 0x140 SCI1_rx
  53. vector51: .long IH_DEFAULT // 0x144 SCI1_tx
  54. vector52: .long IH_DEFAULT // 0x148 SCI2_err
  55. vector53: .long IH_DEFAULT // 0x14C SCI2_rx
  56. vector54: .long IH_DEFAULT // 0x150 SCI2_tx
  57. vector55: .long IH_DEFAULT // 0x154 SCI3_OR1
  58. vector56: .long IH_DEFAULT // 0x158 FEC TXF
  59. vector57: .long IH_DEFAULT // 0x15C FEC RXF
  60. vector58: .long IH_DEFAULT // 0x160 FEC Other
  61. vector59: .long IH_DEFAULT // 0x164 FEC HBERR
  62. vector5A: .long IH_DEFAULT // 0x168 FEC BABR
  63. vector5B: .long IH_DEFAULT // 0x16C FEC BABT
  64. vector5C: .long IH_DEFAULT // 0x170 FEC GRA
  65. vector5D: .long IH_DEFAULT // 0x174 FEC TXB
  66. vector5E: .long IH_DEFAULT // 0x178 FEC RXB
  67. vector5F: .long IH_DEFAULT // 0x17C FEC MII
  68. vector60: .long IH_DEFAULT // 0x180 FEC EBERR
  69. vector61: .long IH_DEFAULT // 0x184 FEC LC
  70. vector62: .long IH_DEFAULT // 0x188 FEC RL
  71. vector63: .long IH_DEFAULT // 0x18C FEC UN
  72. vector64: .long IH_DEFAULT // 0x190 SCI3_err
  73. vector65: .long IH_DEFAULT // 0x194 SCI3_rx
  74. vector66: .long IH_DEFAULT // 0x198 SCI3_tx
  75. vector67: .long IH_DEFAULT // 0x19C Level 7
  76. vector68: .long IH_DEFAULT // 0x1A0 Level 6
  77. vector69: .long IH_DEFAULT // 0x1A4 Level 5
  78. vector6A: .long IH_DEFAULT // 0x1A8 Level 4
  79. vector6B: .long IH_DEFAULT // 0x1AC Level 3
  80. vector6C: .long IH_DEFAULT // 0x1B0 Level 2
  81. vector6D: .long IH_DEFAULT // 0x1B4 Level 1
  82. vector6E: .long IH_DEFAULT // 0x1B8 IIC1
  83. vector6F: .long IH_DEFAULT // 0x1BC IIC2
  84. vector70: .long IH_DEFAULT // 0x1C0 ADC1
  85. vector71: .long IH_DEFAULT // 0x1C4 KBI1
  86. vector72: .long IH_DEFAULT // 0x1C8 RTC
  87. //------------------------------------------------------------------------------
  88. // Section 0 - Basic CPU initialization (family dependant code)
  89. // - The code starts here after reset
  90. // - After this section, C stack memory must be initialized
  91. //------------------------------------------------------------------------------
  92. .section .init0,"ax",%progbits
  93. //------------------------------------------------------------------------------
  94. // Section 12 - CPU and Peripherals Initialization (family dependant code)
  95. //------------------------------------------------------------------------------
  96. .section .init12,"ax",%progbits
  97. jsr InitClock