mcf51cn.nut 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. mcf51cn_sci1_txd_pins = { "PTD0" }
  2. mcf51cn_sci1_rxd_pins = { "PTD1" }
  3. mcf51cn_sci1_txd_pins_descr = "Choose SCI1 TXD Pin:\n\tPTD0 (RGPIO0)"
  4. mcf51cn_sci1_rxd_pins_descr = "Choose SCI1 RXD Pin:\n\tPTD1 (RGPIO1)"
  5. mcf51cn_sci2_txd_pins = { "PTD2" }
  6. mcf51cn_sci2_rxd_pins = { "PTD3" }
  7. mcf51cn_sci2_txd_pins_descr = "Choose SCI2 TXD Pin:\n\tPTD2 (RGPIO2)"
  8. mcf51cn_sci2_rxd_pins_descr = "Choose SCI2 RXD Pin:\n\tPTD3 (RGPIO3)"
  9. mcf51cn_sci3_txd_pins = { "PTE6", "PTA3" }
  10. mcf51cn_sci3_rxd_pins = { "PTE7", "PTA4" }
  11. mcf51cn_sci3_txd_pins_descr = "Choose SCI3 TXD Pin:\n\tPTE6 (KBI2P6)\n\tPTA3"
  12. mcf51cn_sci3_rxd_pins_descr = "Choose SCI3 RXD Pin:\n\tPTE7 (KBI2P7)\n\tPTA4"
  13. nutarch_m68k_coldfire_mcf51cn =
  14. {
  15. --
  16. -- MCU Family
  17. --
  18. {
  19. name = "nutarch_m68k_coldfire_mcf51cn_family",
  20. brief = "Family",
  21. provides = {
  22. "HW_MTIM_COLDFIRE",
  23. "HW_IIC_COLDFIRE",
  24. "HW_SCI_COLDFIRE",
  25. -- "HW_SPI_COLDFIRE",
  26. -- "HW_ADC_COLDFIRE",
  27. -- "HW_RTC_COLDFIRE",
  28. -- "HW_TMP_COLDFIRE",
  29. -- "HW_KBI_COLDFIRE",
  30. -- "HW_FEC_COLDFIRE",
  31. -- "HW_MFB_COLDFIRE",
  32. },
  33. options =
  34. {
  35. {
  36. macro = "MCU_MCF51CN",
  37. brief = "MCF51CN",
  38. description = "MCF51CN Coldfire Family",
  39. type = "integer",
  40. default = 1,
  41. file = "include/cfg/arch.h"
  42. },
  43. {
  44. macro = "IIC1",
  45. type = "integer",
  46. default = 1,
  47. provides = { "HW_IIC1" },
  48. file = "include/cfg/peripherals.h"
  49. },
  50. {
  51. macro = "IIC2",
  52. type = "integer",
  53. default = 1,
  54. provides = { "HW_IIC2" },
  55. file = "include/cfg/peripherals.h"
  56. },
  57. {
  58. macro = "MTIM1",
  59. type = "integer",
  60. default = 1,
  61. provides = { "HW_MTIM1" },
  62. file = "include/cfg/peripherals.h"
  63. },
  64. {
  65. macro = "MTIM2",
  66. type = "integer",
  67. default = 1,
  68. provides = { "HW_MTIM2" },
  69. file = "include/cfg/peripherals.h"
  70. },
  71. {
  72. macro = "SCI1",
  73. type = "integer",
  74. default = 1,
  75. provides = { "HW_SCI1" },
  76. file = "include/cfg/peripherals.h"
  77. },
  78. {
  79. macro = "SCI2",
  80. type = "integer",
  81. default = 1,
  82. provides = { "HW_SCI2" },
  83. file = "include/cfg/peripherals.h"
  84. },
  85. {
  86. macro = "SCI3",
  87. type = "integer",
  88. default = 1,
  89. provides = { "HW_SCI3" },
  90. file = "include/cfg/peripherals.h"
  91. },
  92. }
  93. },
  94. --
  95. -- Runtime Initialization
  96. --
  97. {
  98. name = "nutarch_m68k_coldfire_mcf51cn_init",
  99. brief = "Initialization",
  100. description = "System startup code for MCF51cn family MCUs:\n"..
  101. " - Vector table\n"..
  102. " - Memories\n"..
  103. " - MCU\n"..
  104. " - Peripherals",
  105. sources = {
  106. -- "m68k/coldfire/init/crt_common.S",
  107. -- "m68k/coldfire/init/crt_$(LDNAME).S",
  108. -- "m68k/coldfire/init/crt_mcf51cn.S",
  109. "m68k/coldfire/init/crt_common_c.c",
  110. "m68k/coldfire/init/crt_mcf51cn_c.c",
  111. },
  112. targets = {
  113. -- "m68k/coldfire/init/crt_common.o",
  114. -- "m68k/coldfire/init/crt_mcf51cn.o",
  115. -- "m68k/coldfire/init/crt_$(LDNAME).o",
  116. },
  117. requires = { "TOOL_CC_M68K", "TOOL_GCC"},
  118. },
  119. --
  120. -- Runtime Initialization 2
  121. -- FIXME: Initialization code is in two groups due to problems with Configurator.
  122. -- If "targets" are used together with more than one .c sources, then
  123. -- the configurator crashes when building.
  124. --
  125. {
  126. name = "nutarch_m68k_coldfire_mcf51cn_init2",
  127. brief = "Initialization",
  128. description = "System startup code for MCF51CN family MCUs:\n"..
  129. " - Vector table\n"..
  130. " - Memories\n"..
  131. " - MCU\n"..
  132. " - Peripherals",
  133. sources = {
  134. "m68k/coldfire/init/crt_common.S",
  135. "m68k/coldfire/init/crt_$(LDNAME).S",
  136. "m68k/coldfire/init/crt_mcf51cn.S",
  137. },
  138. targets = {
  139. "m68k/coldfire/init/crt_common.o",
  140. "m68k/coldfire/init/crt_$(LDNAME).o",
  141. "m68k/coldfire/init/crt_mcf51cn.o",
  142. },
  143. requires = { "TOOL_CC_M68K", "TOOL_GCC"},
  144. },
  145. --
  146. -- Multipurpose Clock Generator
  147. --
  148. {
  149. name = "nutarch_m68k_coldfire_mcf51cn_mcg",
  150. brief = "Clock Setup",
  151. description = "Multipurpose Clock Generator",
  152. script = "arch/coldfire/mcf51cn_mcg.nut"
  153. },
  154. --
  155. -- GPIO Interface
  156. --
  157. {
  158. name = "nutarch_m68k_coldfire_mcf51cn_gpio",
  159. brief = "GPIO",
  160. description = "Generic port I/O API.",
  161. sources = { "m68k/coldfire/dev/mcf51cn/mcf51cn_gpio.c"}
  162. },
  163. --
  164. -- Interrupt Handler
  165. --
  166. {
  167. name = "nutarch_m68k_coldfire_mcf51cn_ihndlr",
  168. brief = "Interrupt Handler",
  169. description = "Peripheral interrupt handlers for MCF51CN family.",
  170. provides = {
  171. "DEV_IRQ_MTIM1",
  172. "DEV_IRQ_MTIM2",
  173. "DEV_IRQ_IIC1",
  174. "DEV_IRQ_IIC2",
  175. },
  176. sources = { "m68k/coldfire/dev/mcf51cn/ih_mcf51cn_common.c",
  177. "m68k/coldfire/dev/mcf51cn/ih_mcf51cn_mtim.c",
  178. "m68k/coldfire/dev/mcf51cn/ih_mcf51cn_iic.c",
  179. },
  180. },
  181. --
  182. -- System Timer Hardware
  183. --
  184. {
  185. name = "nutarch_m68k_coldfire_mcf51cn_ostimer",
  186. brief = "System Timer",
  187. requires = { "HW_MTIM_COLDFIRE", "DEV_IRQ_MTIM1" },
  188. provides = { "NUT_OSTIMER_DEV" },
  189. sources = { "m68k/coldfire/dev/mcf51cn/mcf51cn_ostimer.c" },
  190. },
  191. --
  192. -- Reset Controller
  193. --
  194. {
  195. name = "nutarch_m68k_coldfire_mcf51cn_reset",
  196. brief = "Reset Controller",
  197. sources = { "m68k/coldfire/dev/mcf51cn/mcf51cn_reset.c" },
  198. },
  199. }