1
0

Makefile.mcudude 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. #/*
  2. # * These are the CPU targets from Hans "MCUdude"
  3. # * MightyCore, MegaCore, MiniCore, and MajorCore
  4. # * https://github.com/MCUdude
  5. # *
  6. # * This file has basic CPU defintions, while many possible combinations
  7. # * of AVR_FREQ, BAUD_RATE, and UART are built by a shell script.
  8. # */
  9. HELPTEXT += "\n target atmega1280 - ATmega1280 (100pin, 128k)\n"
  10. HELPTEXT += "target atmega88* - Atmega88, ATmega88P, ATmega88PB\n"
  11. HELPTEXT += "target atmega16, atmega32, atmega64 - 40pin ATmegas\n"
  12. HELPTEXT += "target atmega164*, atmega324* - newer 40pin ATmegas\n"
  13. HELPTEXT += "target atmega644p, atmega1284* - newer 40pin ATmegas\n"
  14. HELPTEXT += "target atmega128, atmega1281, atmega2561 - 64pin ATmegas\n"
  15. HELPTEXT += "target atmega169, atmega329, atmega649\n"
  16. HELPTEXT += "target atmega640, atmega1280, atmega2560 - 100pin ATmegas\n"
  17. HELPTEXT += "target atmega162\n"
  18. HELPTEXT += "target atmega3290, atmega6490\n"
  19. HELPTEXT += "target atmega8515,atmega8535 - legacy 40pin chips\n"
  20. #ATmega16/A
  21. atmega16: TARGET = atmega16
  22. atmega16: MCU_TARGET = atmega16
  23. atmega16: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  24. atmega16: AVR_FREQ ?= 16000000L
  25. atmega16: $(PROGRAM)_atmega16_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  26. ifndef PRODUCTION
  27. atmega16: $(PROGRAM)_atmega16_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  28. endif
  29. atmega16a: atmega16
  30. #ATmega64/A
  31. atmega64: TARGET = atmega64
  32. atmega64: MCU_TARGET = atmega64
  33. atmega64: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  34. atmega64: AVR_FREQ ?= 16000000L
  35. atmega64: $(PROGRAM)_atmega64_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  36. ifndef PRODUCTION
  37. atmega64: $(PROGRAM)_atmega64_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  38. endif
  39. atmega64a: atmega64
  40. #ATmega88P/PA
  41. atmega88p: TARGET = atmega88p
  42. atmega88p: MCU_TARGET = atmega88p
  43. atmega88p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  44. atmega88p: AVR_FREQ ?= 16000000L
  45. atmega88p: $(PROGRAM)_atmega88p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  46. ifndef PRODUCTION
  47. atmega88p: $(PROGRAM)_atmega88p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  48. endif
  49. atmega88pa: atmega88p
  50. #ATmega8PB
  51. atmega88pb: TARGET = atmega88pb
  52. atmega88pb: MCU_TARGET = atmega88pb
  53. atmega88pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  54. atmega88pb: AVR_FREQ ?= 16000000L
  55. atmega88pb: $(PROGRAM)_atmega88pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  56. ifndef PRODUCTION
  57. atmega88pb: $(PROGRAM)_atmega88pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  58. endif
  59. #ATmega128/A
  60. atmega128: TARGET = atmega128
  61. atmega128: MCU_TARGET = atmega128
  62. atmega128: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  63. atmega128: AVR_FREQ ?= 16000000L
  64. atmega128: $(PROGRAM)_atmega128_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  65. ifndef PRODUCTION
  66. atmega128: $(PROGRAM)_atmega128_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  67. endif
  68. atmega128a: atmega128
  69. #ATmega162
  70. atmega162: TARGET = atmega162
  71. atmega162: MCU_TARGET = atmega162
  72. atmega162: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  73. atmega162: AVR_FREQ ?= 16000000L
  74. atmega162: $(PROGRAM)_atmega162_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  75. ifndef PRODUCTION
  76. atmega162: $(PROGRAM)_atmega162_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  77. endif
  78. #ATmega164/A
  79. atmega164a: TARGET = atmega164a
  80. atmega164a: MCU_TARGET = atmega164a
  81. atmega164a: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  82. atmega164a: AVR_FREQ ?= 16000000L
  83. atmega164a: $(PROGRAM)_atmega164a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  84. ifndef PRODUCTION
  85. atmega164a: $(PROGRAM)_atmega164a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  86. endif
  87. atmega164: atmega164a
  88. #ATmega164P/PA
  89. atmega164p: TARGET = atmega164p
  90. atmega164p: MCU_TARGET = atmega164p
  91. atmega164p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  92. atmega164p: AVR_FREQ ?= 16000000L
  93. atmega164p: $(PROGRAM)_atmega164p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  94. ifndef PRODUCTION
  95. atmega164p: $(PROGRAM)_atmega164p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  96. endif
  97. atmega164pa: atmega164p
  98. #ATmega168/A
  99. #atmega168: TARGET = atmega168
  100. #atmega168: MCU_TARGET = atmega168
  101. #atmega168: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  102. #atmega168: AVR_FREQ ?= 16000000L
  103. #atmega168: $(PROGRAM)_atmega168_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  104. #ifndef PRODUCTION
  105. #atmega168: $(PROGRAM)_atmega168_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  106. #endif
  107. atmega168a: atmega168
  108. #ATmega168P/PA
  109. atmega168p: TARGET = atmega168p
  110. atmega168p: MCU_TARGET = atmega168p
  111. atmega168p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  112. atmega168p: AVR_FREQ ?= 16000000L
  113. atmega168p: $(PROGRAM)_atmega168p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  114. ifndef PRODUCTION
  115. atmega168p: $(PROGRAM)_atmega168p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  116. endif
  117. atmega168pa: atmega168p
  118. #ATmega168PB
  119. atmega168pb: TARGET = atmega168pb
  120. atmega168pb: MCU_TARGET = atmega168pb
  121. atmega168pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  122. atmega168pb: AVR_FREQ ?= 16000000L
  123. atmega168pb: $(PROGRAM)_atmega168pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  124. ifndef PRODUCTION
  125. atmega168pb: $(PROGRAM)_atmega168pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  126. endif
  127. #ATmega169/A
  128. atmega169: TARGET = atmega169
  129. atmega169: MCU_TARGET = atmega169
  130. atmega169: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  131. atmega169: AVR_FREQ ?= 16000000L
  132. atmega169: $(PROGRAM)_atmega169_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  133. ifndef PRODUCTION
  134. atmega169: $(PROGRAM)_atmega169_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  135. endif
  136. atmega169a: atmega169
  137. #ATmega169P/PA
  138. atmega169p: TARGET = atmega169p
  139. atmega169p: MCU_TARGET = atmega169p
  140. atmega169p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  141. atmega169p: AVR_FREQ ?= 16000000L
  142. atmega169p: $(PROGRAM)_atmega169p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  143. ifndef PRODUCTION
  144. atmega169p: $(PROGRAM)_atmega169p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  145. endif
  146. atmega169pa: atmega169
  147. #ATmega324A
  148. atmega324a: TARGET = atmega324a
  149. atmega324a: MCU_TARGET = atmega324a
  150. atmega324a: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  151. atmega324a: AVR_FREQ ?= 16000000L
  152. atmega324a: $(PROGRAM)_atmega324a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  153. ifndef PRODUCTION
  154. atmega324a: $(PROGRAM)_atmega324a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  155. endif
  156. atmega324: atmega324a
  157. #ATmega324P
  158. atmega324p: TARGET = atmega324p
  159. atmega324p: MCU_TARGET = atmega324p
  160. atmega324p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  161. atmega324p: AVR_FREQ ?= 16000000L
  162. atmega324p: $(PROGRAM)_atmega324p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  163. ifndef PRODUCTION
  164. atmega324p: $(PROGRAM)_atmega324p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  165. endif
  166. #ATmega324PA
  167. atmega324pa: TARGET = atmega324pa
  168. atmega324pa: MCU_TARGET = atmega324pa
  169. atmega324pa: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  170. atmega324pa: AVR_FREQ ?= 16000000L
  171. atmega324pa: $(PROGRAM)_atmega324pa_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  172. ifndef PRODUCTION
  173. atmega324pa: $(PROGRAM)_atmega324pa_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  174. endif
  175. #ATmega324PB
  176. atmega324pb: TARGET = atmega324pb
  177. atmega324pb: MCU_TARGET = atmega324pb
  178. atmega324pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  179. atmega324pb: AVR_FREQ ?= 16000000L
  180. atmega324pb: $(PROGRAM)_atmega324pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  181. ifndef PRODUCTION
  182. atmega324pb: $(PROGRAM)_atmega324pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  183. endif
  184. #ATmega328PB
  185. atmega328pb: TARGET = atmega328pb
  186. atmega328pb: MCU_TARGET = atmega328pb
  187. atmega328pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  188. atmega328pb: AVR_FREQ ?= 16000000L
  189. atmega328pb: $(PROGRAM)_atmega328pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  190. ifndef PRODUCTION
  191. atmega328pb: $(PROGRAM)_atmega328pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  192. endif
  193. #ATmega329/A
  194. atmega329: TARGET = atmega329
  195. atmega329: MCU_TARGET = atmega329
  196. atmega329: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  197. atmega329: AVR_FREQ ?= 16000000L
  198. atmega329: $(PROGRAM)_atmega329_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  199. ifndef PRODUCTION
  200. atmega329: $(PROGRAM)_atmega329_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  201. endif
  202. atmega329a: atmega329
  203. #ATmega329P/PA
  204. atmega329p: TARGET = atmega329p
  205. atmega329p: MCU_TARGET = atmega329p
  206. atmega329p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  207. atmega329p: AVR_FREQ ?= 16000000L
  208. atmega329p: $(PROGRAM)_atmega329p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  209. ifndef PRODUCTION
  210. atmega329p: $(PROGRAM)_atmega329p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  211. endif
  212. atmega329pa: atmega329p
  213. #ATmega640
  214. atmega640: TARGET = atmega640
  215. atmega640: MCU_TARGET = atmega640
  216. atmega640: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  217. atmega640: AVR_FREQ ?= 16000000L
  218. atmega640: $(PROGRAM)_atmega640_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  219. ifndef PRODUCTION
  220. atmega640: $(PROGRAM)_atmega640_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  221. endif
  222. #ATmega649
  223. atmega649: TARGET = atmega649
  224. atmega649: MCU_TARGET = atmega649
  225. atmega649: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  226. atmega649: AVR_FREQ ?= 16000000L
  227. atmega649: $(PROGRAM)_atmega649_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  228. ifndef PRODUCTION
  229. atmega649: $(PROGRAM)_atmega649_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  230. endif
  231. #ATmega649P
  232. atmega649p: TARGET = atmega649p
  233. atmega649p: MCU_TARGET = atmega649p
  234. atmega649p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  235. atmega649p: AVR_FREQ ?= 16000000L
  236. atmega649p: $(PROGRAM)_atmega649p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  237. ifndef PRODUCTION
  238. atmega649p: $(PROGRAM)_atmega649p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  239. endif
  240. #ATmega1281
  241. atmega1281: TARGET = atmega1281
  242. atmega1281: MCU_TARGET = atmega1281
  243. atmega1281: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  244. atmega1281: AVR_FREQ ?= 16000000L
  245. atmega1281: $(PROGRAM)_atmega1281_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  246. ifndef PRODUCTION
  247. atmega1281: $(PROGRAM)_atmega1281_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  248. endif
  249. #ATmega2561
  250. atmega2561: TARGET = atmega2561
  251. atmega2561: MCU_TARGET = atmega2561
  252. atmega2561: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  253. atmega2561: AVR_FREQ ?= 16000000L
  254. atmega2561: $(PROGRAM)_atmega2561_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  255. ifndef PRODUCTION
  256. atmega2561: $(PROGRAM)_atmega2561_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  257. endif
  258. #ATmega3290
  259. atmega3290: TARGET = atmega3290
  260. atmega3290: MCU_TARGET = atmega3290
  261. atmega3290: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  262. atmega3290: AVR_FREQ ?= 16000000L
  263. atmega3290: $(PROGRAM)_atmega3290_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  264. ifndef PRODUCTION
  265. atmega3290: $(PROGRAM)_atmega3290_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  266. endif
  267. #ATmega3290P/PA
  268. atmega3290p: TARGET = atmega3290p
  269. atmega3290p: MCU_TARGET = atmega3290p
  270. atmega3290p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  271. atmega3290p: AVR_FREQ ?= 16000000L
  272. atmega3290p: $(PROGRAM)_atmega3290p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  273. ifndef PRODUCTION
  274. atmega3290p: $(PROGRAM)_atmega3290p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  275. endif
  276. atmega3290pa: atmega3290p
  277. #ATmega6490
  278. atmega6490: TARGET = atmega6490
  279. atmega6490: MCU_TARGET = atmega6490
  280. atmega6490: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  281. atmega6490: AVR_FREQ ?= 16000000L
  282. atmega6490: $(PROGRAM)_atmega6490_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  283. ifndef PRODUCTION
  284. atmega6490: $(PROGRAM)_atmega6490_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  285. endif
  286. #ATmega6490P
  287. atmega6490p: TARGET = atmega6490p
  288. atmega6490p: MCU_TARGET = atmega6490p
  289. atmega6490p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
  290. atmega6490p: AVR_FREQ ?= 16000000L
  291. atmega6490p: $(PROGRAM)_atmega6490p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  292. ifndef PRODUCTION
  293. atmega6490p: $(PROGRAM)_atmega6490p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  294. endif
  295. #ATmega8515
  296. atmega8515: TARGET = atmega8515
  297. atmega8515: MCU_TARGET = atmega8515
  298. atmega8515: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  299. atmega8515: AVR_FREQ ?= 16000000L
  300. atmega8515: $(PROGRAM)_atmega8515_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  301. ifndef PRODUCTION
  302. atmega8515: $(PROGRAM)_atmega8515_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  303. endif
  304. #ATmega8535
  305. atmega8535: TARGET := atmega8535
  306. atmega8535: MCU_TARGET = atmega8535
  307. atmega8535: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
  308. atmega8535: AVR_FREQ ?= 16000000L
  309. atmega8535: $(PROGRAM)_atmega8535_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
  310. ifndef PRODUCTION
  311. atmega8535: $(PROGRAM)_atmega8535_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
  312. endif