My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

platformio.ini 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. # For detailed documentation with EXAMPLES:
  6. #
  7. # http://docs.platformio.org/en/latest/projectconf.html
  8. #
  9. # Automatic targets - enable auto-uploading
  10. # targets = upload
  11. #
  12. # By default platformio build will abort after 5 errors.
  13. # Remove '-fmax-errors=5' from build_flags below to see all.
  14. #
  15. [platformio]
  16. src_dir = Marlin
  17. boards_dir = buildroot/share/PlatformIO/boards
  18. default_envs = mega2560
  19. [common]
  20. default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
  21. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
  22. build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
  23. lib_deps =
  24. LiquidCrystal
  25. TMCStepper@>=0.6.2
  26. Adafruit MAX31865 library@>=1.1,<1.2
  27. Adafruit NeoPixel
  28. U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
  29. LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
  30. Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip
  31. SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
  32. SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip
  33. # Common traits for environments using HAL/STM32
  34. [common_stm32]
  35. platform = ststm32@<6.2.0
  36. platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
  37. lib_deps = ${common.lib_deps}
  38. lib_ignore = SoftwareSerial
  39. build_flags = ${common.build_flags}
  40. -IMarlin/src/HAL/STM32 -std=gnu++14
  41. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  42. build_unflags = -std=gnu++11
  43. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  44. # Common traits for environments using HAL/STM32F1
  45. [common_stm32f1]
  46. platform = ${common_stm32.platform}
  47. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  48. ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
  49. build_unflags = -std=gnu++11
  50. src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  51. lib_ignore =
  52. Adafruit NeoPixel
  53. SPI
  54. lib_deps = ${common.lib_deps}
  55. SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
  56. [common_avr8]
  57. board_build.f_cpu = 16000000L
  58. lib_deps = ${common.lib_deps}
  59. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  60. src_filter = ${common.default_src_filter} +<src/HAL/AVR>
  61. # Globally defined properties
  62. # inherited by all environments
  63. [env]
  64. framework = arduino
  65. build_flags = ${common.build_flags}
  66. lib_deps = ${common.lib_deps}
  67. monitor_speed = 250000
  68. #################################
  69. # #
  70. # Unique Core Architectures #
  71. # #
  72. # Add a new "env" below if no #
  73. # entry has values suitable to #
  74. # build for a given board. #
  75. # #
  76. #################################
  77. #
  78. # ATmega2560
  79. #
  80. [env:mega2560]
  81. platform = atmelavr
  82. extends = common_avr8
  83. board = megaatmega2560
  84. #
  85. # ATmega1280
  86. #
  87. [env:mega1280]
  88. platform = atmelavr
  89. extends = common_avr8
  90. board = megaatmega1280
  91. #
  92. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  93. #
  94. [env:MightyBoard1280]
  95. platform = atmelavr
  96. extends = common_avr8
  97. board = ATmega1280
  98. upload_speed = 57600
  99. #
  100. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  101. #
  102. [env:MightyBoard2560]
  103. platform = atmelavr
  104. extends = common_avr8
  105. board = ATmega2560
  106. upload_protocol = wiring
  107. upload_speed = 57600
  108. board_upload.maximum_size = 253952
  109. #
  110. # RAMBo
  111. #
  112. [env:rambo]
  113. platform = atmelavr
  114. extends = common_avr8
  115. board = reprap_rambo
  116. #
  117. # FYSETC F6 V1.3
  118. #
  119. [env:FYSETC_F6_13]
  120. platform = atmelavr
  121. extends = common_avr8
  122. board = fysetc_f6_13
  123. #
  124. # FYSETC F6 V1.4
  125. #
  126. [env:FYSETC_F6_14]
  127. platform = atmelavr
  128. extends = common_avr8
  129. board = fysetc_f6_14
  130. #
  131. # Sanguinololu (ATmega644p)
  132. #
  133. [env:sanguino644p]
  134. platform = atmelavr
  135. extends = common_avr8
  136. board = sanguino_atmega644p
  137. #
  138. # Sanguinololu (ATmega1284p)
  139. #
  140. [env:sanguino1284p]
  141. platform = atmelavr
  142. extends = common_avr8
  143. board = sanguino_atmega1284p
  144. #
  145. # Melzi and clones (ATmega1284p)
  146. #
  147. [env:melzi]
  148. platform = atmelavr
  149. extends = common_avr8
  150. board = sanguino_atmega1284p
  151. lib_ignore = TMCStepper
  152. upload_speed = 57600
  153. #
  154. # Melzi and clones (Optiboot bootloader)
  155. #
  156. [env:melzi_optiboot]
  157. platform = atmelavr
  158. extends = env:melzi
  159. upload_speed = 115200
  160. #
  161. # AT90USB1286 boards using CDC bootloader
  162. # - BRAINWAVE
  163. # - BRAINWAVE_PRO
  164. # - SAV_MKI
  165. # - TEENSYLU
  166. #
  167. [env:at90usb1286_cdc]
  168. platform = teensy
  169. extends = common_avr8
  170. board = at90usb1286
  171. lib_ignore = TMCStepper
  172. #
  173. # AT90USB1286 boards using DFU bootloader
  174. # - PrintrBoard
  175. # - PrintrBoard Rev.F
  176. # - ? 5DPRINT ?
  177. #
  178. [env:at90usb1286_dfu]
  179. platform = teensy
  180. extends = env:at90usb1286_cdc
  181. #
  182. # Due (Atmel SAM3X8E ARM Cortex-M3)
  183. #
  184. # - RAMPS4DUE
  185. # - RADDS
  186. #
  187. [env:DUE]
  188. platform = atmelsam
  189. board = due
  190. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  191. [env:DUE_USB]
  192. platform = atmelsam
  193. board = dueUSB
  194. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  195. [env:DUE_debug]
  196. # Used when WATCHDOG_RESET_MANUAL is enabled
  197. platform = atmelsam
  198. board = due
  199. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  200. build_flags = ${common.build_flags}
  201. -funwind-tables
  202. -mpoke-function-name
  203. #
  204. # Archim SAM
  205. #
  206. [common_DUE_archim]
  207. platform = atmelsam
  208. board = due
  209. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  210. build_flags = ${common.build_flags}
  211. -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
  212. extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
  213. [env:DUE_archim]
  214. platform = ${common_DUE_archim.platform}
  215. extends = common_DUE_archim
  216. # Used when WATCHDOG_RESET_MANUAL is enabled
  217. [env:DUE_archim_debug]
  218. platform = ${common_DUE_archim.platform}
  219. extends = common_DUE_archim
  220. build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
  221. #
  222. # NXP LPC176x ARM Cortex-M3
  223. #
  224. [common_LPC]
  225. platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
  226. board = nxp_lpc1768
  227. build_flags = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
  228. lib_ldf_mode = off
  229. lib_compat_mode = strict
  230. extra_scripts = Marlin/src/HAL/LPC1768/upload_extra_script.py
  231. src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
  232. lib_deps = Servo
  233. LiquidCrystal
  234. U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
  235. TMCStepper@>=0.6.2
  236. Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
  237. SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
  238. # debug options for backtrace
  239. # -funwind-tables
  240. # -mpoke-function-name
  241. #
  242. # NXP LPC176x ARM Cortex-M3
  243. #
  244. [env:LPC1768]
  245. platform = ${common_LPC.platform}
  246. extends = common_LPC
  247. board = nxp_lpc1768
  248. [env:LPC1769]
  249. platform = ${common_LPC.platform}
  250. extends = common_LPC
  251. board = nxp_lpc1769
  252. #
  253. # STM32F103RC
  254. #
  255. [env:STM32F103RC]
  256. platform = ${common_stm32f1.platform}
  257. extends = common_stm32f1
  258. board = genericSTM32F103RC
  259. platform_packages = tool-stm32duino
  260. monitor_speed = 115200
  261. #
  262. # MEEB_3DP (STM32F103RCT6 with 512K)
  263. #
  264. [env:STM32F103RC_meeb]
  265. platform = ${common_stm32f1.platform}
  266. extends = common_stm32f1
  267. board = MEEB_3DP
  268. platform_packages = tool-stm32duino
  269. build_flags = ${common_stm32f1.build_flags}
  270. -DDEBUG_LEVEL=0
  271. -DSS_TIMER=4
  272. -DSTM32_FLASH_SIZE=512
  273. -DHSE_VALUE=12000000U
  274. -DUSE_USB_COMPOSITE
  275. -DVECT_TAB_OFFSET=0x2000
  276. -DGENERIC_BOOTLOADER
  277. extra_scripts = pre:buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP_create_variant.py
  278. buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  279. lib_deps = ${common_stm32f1.lib_deps}
  280. USBComposite for STM32F1@==0.91
  281. Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
  282. lib_ignore = SPI, LiquidCrystal
  283. debug_tool = stlink
  284. upload_protocol = dfu
  285. #
  286. # STM32F103RC_fysetc
  287. #
  288. [env:STM32F103RC_fysetc]
  289. platform = ${common_stm32f1.platform}
  290. extends = env:STM32F103RC
  291. extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  292. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
  293. lib_ldf_mode = chain
  294. debug_tool = stlink
  295. upload_protocol = serial
  296. #
  297. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  298. #
  299. # STM32F103RC_btt ............. RCT6 with 256K
  300. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  301. # STM32F103RC_btt_512K ........ RCT6 with 512K
  302. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  303. #
  304. [env:STM32F103RC_btt]
  305. platform = ${common_stm32f1.platform}
  306. extends = env:STM32F103RC
  307. extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
  308. build_flags = ${common_stm32f1.build_flags}
  309. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  310. monitor_speed = 115200
  311. [env:STM32F103RC_btt_USB]
  312. platform = ${common_stm32f1.platform}
  313. extends = env:STM32F103RC_btt
  314. build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
  315. lib_deps = ${env:STM32F103RC_btt.lib_deps}
  316. USBComposite for STM32F1@==0.91
  317. [env:STM32F103RC_btt_512K]
  318. platform = ${common_stm32f1.platform}
  319. extends = env:STM32F103RC_btt
  320. board_upload.maximum_size=524288
  321. build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
  322. [env:STM32F103RC_btt_512K_USB]
  323. platform = ${common_stm32f1.platform}
  324. extends = env:STM32F103RC_btt_512K
  325. build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
  326. lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
  327. USBComposite for STM32F1@==0.91
  328. #
  329. # STM32F103RE
  330. #
  331. [env:STM32F103RE]
  332. platform = ${common_stm32f1.platform}
  333. extends = common_stm32f1
  334. board = genericSTM32F103RE
  335. platform_packages = tool-stm32duino
  336. monitor_speed = 115200
  337. #
  338. # STM32F103RE_btt ............. RET6
  339. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  340. #
  341. [env:STM32F103RE_btt]
  342. platform = ${common_stm32f1.platform}
  343. extends = env:STM32F103RE
  344. extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
  345. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  346. debug_tool = stlink
  347. upload_protocol = stlink
  348. [env:STM32F103RE_btt_USB]
  349. platform = ${common_stm32f1.platform}
  350. extends = env:STM32F103RE_btt
  351. build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
  352. lib_deps = ${common_stm32f1.lib_deps}
  353. USBComposite for STM32F1@==0.91
  354. #
  355. # STM32F4 with STM32GENERIC
  356. #
  357. [env:STM32F4]
  358. platform = ${common_stm32.platform}
  359. board = disco_f407vg
  360. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  361. lib_ignore = Adafruit NeoPixel, TMCStepper
  362. src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F7>
  363. #
  364. # STM32F7 with STM32GENERIC
  365. #
  366. [env:STM32F7]
  367. platform = ${common_stm32.platform}
  368. board = remram_v1
  369. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  370. lib_ignore = Adafruit NeoPixel, TMCStepper
  371. src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F4>
  372. #
  373. # ARMED (STM32)
  374. #
  375. [env:ARMED]
  376. platform = ${common_stm32.platform}
  377. extends = common_stm32
  378. board = armed_v1
  379. build_flags = ${common_stm32.build_flags}
  380. '-DUSB_PRODUCT="ARMED_V1"'
  381. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  382. #
  383. # Geeetech GTM32 (STM32F103VET6)
  384. #
  385. [env:STM32F103VE_GTM32]
  386. platform = ${common_stm32f1.platform}
  387. extends = common_stm32f1
  388. board = genericSTM32F103VE
  389. build_flags = ${common_stm32f1.build_flags}
  390. -ffunction-sections -fdata-sections -nostdlib -MMD
  391. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  392. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  393. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  394. upload_protocol = serial
  395. #
  396. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  397. #
  398. [env:STM32F103VE_longer]
  399. platform = ${common_stm32f1.platform}
  400. extends = common_stm32f1
  401. board = genericSTM32F103VE
  402. extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  403. build_flags = ${common_stm32f1.build_flags}
  404. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  405. build_unflags = ${common_stm32f1.build_unflags}
  406. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  407. lib_ignore = ${common_stm32f1.lib_ignore}
  408. LiquidTWI2
  409. #
  410. # MKS Robin Mini (STM32F103VET6)
  411. #
  412. [env:mks_robin_mini]
  413. platform = ${common_stm32f1.platform}
  414. extends = common_stm32f1
  415. board = genericSTM32F103VE
  416. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_mini.py
  417. build_flags = ${common_stm32f1.build_flags}
  418. -DMCU_STM32F103VE
  419. #
  420. # MKS Robin Nano (STM32F103VET6)
  421. #
  422. [env:mks_robin_nano]
  423. platform = ${common_stm32f1.platform}
  424. extends = common_stm32f1
  425. board = genericSTM32F103VE
  426. platform_packages = tool-stm32duino
  427. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
  428. build_flags = ${common_stm32f1.build_flags}
  429. -DMCU_STM32F103VE -DSS_TIMER=4
  430. #
  431. # MKS Robin (STM32F103ZET6)
  432. #
  433. [env:mks_robin]
  434. platform = ${common_stm32f1.platform}
  435. extends = common_stm32f1
  436. board = genericSTM32F103ZE
  437. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
  438. build_flags = ${common_stm32f1.build_flags}
  439. -DSS_TIMER=4 -DSTM32_XL_DENSITY
  440. #
  441. # MKS Robin Pro (STM32F103ZET6)
  442. #
  443. [env:mks_robin_pro]
  444. platform = ${common_stm32f1.platform}
  445. extends = env:mks_robin
  446. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_pro.py
  447. #
  448. # MKS Robin E3D (STM32F103RCT6) and
  449. # MKS Robin E3 with TMC2209
  450. #
  451. [env:mks_robin_e3]
  452. platform = ${common_stm32f1.platform}
  453. extends = common_stm32f1
  454. board = genericSTM32F103RC
  455. platform_packages = tool-stm32duino
  456. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  457. build_flags = ${common_stm32f1.build_flags}
  458. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  459. #
  460. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  461. #
  462. [env:mks_robin_lite]
  463. platform = ${common_stm32f1.platform}
  464. extends = common_stm32f1
  465. board = genericSTM32F103RC
  466. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  467. #
  468. # MKS ROBIN LITE3 (STM32F103RCT6)
  469. #
  470. [env:mks_robin_lite3]
  471. platform = ${common_stm32f1.platform}
  472. extends = common_stm32f1
  473. board = genericSTM32F103RC
  474. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  475. #
  476. # JGAurora A5S A1 (STM32F103ZET6)
  477. #
  478. [env:jgaurora_a5s_a1]
  479. platform = ${common_stm32f1.platform}
  480. extends = common_stm32f1
  481. board = genericSTM32F103ZE
  482. extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  483. build_flags = ${common_stm32f1.build_flags}
  484. -DSTM32F1xx -DSTM32_XL_DENSITY
  485. #
  486. # Malyan M200 (STM32F103CB)
  487. #
  488. [env:STM32F103CB_malyan]
  489. platform = ${common_stm32f1.platform}
  490. extends = common_stm32f1
  491. board = malyanM200
  492. build_flags = ${common_stm32f1.build_flags}
  493. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  494. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  495. lib_ignore = ${common_stm32f1.lib_ignore}
  496. LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SoftwareSerialM
  497. #
  498. # Malyan M200 v2 (STM32F070RB)
  499. #
  500. [env:STM32F070RB_malyan]
  501. platform = ${common_stm32.platform}
  502. extends = common_stm32
  503. board = malyanM200v2
  504. build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
  505. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
  506. -DCUSTOM_STARTUP_FILE
  507. lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial
  508. #
  509. # Malyan M300 (STM32F070CB)
  510. #
  511. [env:malyan_M300]
  512. platform = ststm32@>=6.1.0,<6.2.0
  513. board = malyanm300_f070cb
  514. build_flags = ${common.build_flags}
  515. -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
  516. -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  517. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  518. lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL
  519. #
  520. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  521. #
  522. [env:chitu_f103]
  523. platform = ${common_stm32f1.platform}
  524. extends = common_stm32f1
  525. board = genericSTM32F103ZE
  526. extra_scripts = buildroot/share/PlatformIO/scripts/chitu_crypt.py
  527. build_flags = ${common_stm32f1.build_flags}
  528. -DSTM32F1xx -DSTM32_XL_DENSITY
  529. build_unflags = ${common_stm32f1.build_unflags}
  530. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  531. #
  532. # STM32F401VE
  533. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  534. #
  535. [env:STM32F401VE_STEVAL]
  536. platform = ${common_stm32.platform}
  537. extends = common_stm32
  538. board = STEVAL_STM32F401VE
  539. build_flags = ${common_stm32.build_flags}
  540. -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
  541. -DUSB_PRODUCT=\"STEVAL_F401VE\"
  542. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  543. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  544. buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
  545. lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
  546. #
  547. # FLYF407ZG
  548. #
  549. [env:FLYF407ZG]
  550. platform = ${common_stm32.platform}
  551. extends = common_stm32
  552. board = FLYF407ZG
  553. build_flags = ${common_stm32.build_flags}
  554. -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
  555. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
  556. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  557. #
  558. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  559. #
  560. [env:FYSETC_S6]
  561. platform = ${common_stm32.platform}
  562. extends = common_stm32
  563. platform_packages = ${common_stm32.platform_packages}
  564. tool-stm32duino
  565. board = fysetc_s6
  566. build_flags = ${common_stm32.build_flags}
  567. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
  568. -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
  569. extra_scripts = pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
  570. debug_tool = stlink
  571. upload_protocol = dfu
  572. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  573. #
  574. # STM32F407VET6 with RAMPS-like shield
  575. # 'Black' STM32F407VET6 board - http://wiki.stm32duino.com/index.php?title=STM32F407
  576. # Shield - https://github.com/jmz52/Hardware
  577. #
  578. [env:STM32F407VE_black]
  579. platform = ${common_stm32.platform}
  580. extends = common_stm32
  581. board = blackSTM32F407VET6
  582. build_flags = ${common_stm32.build_flags}
  583. -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
  584. -DUSB_PRODUCT=\"BLACK_F407VE\"
  585. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  586. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  587. lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
  588. #
  589. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  590. #
  591. [env:BIGTREE_SKR_PRO]
  592. platform = ${common_stm32.platform}
  593. extends = common_stm32
  594. board = BigTree_SKR_Pro
  595. build_flags = ${common_stm32.build_flags}
  596. -DUSB_PRODUCT=\"STM32F407ZG\"
  597. -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  598. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  599. #upload_protocol = stlink
  600. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  601. debug_tool = stlink
  602. debug_init_break =
  603. #
  604. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  605. #
  606. [env:BIGTREE_GTR_V1_0]
  607. platform = ststm32@>=5.7.0,<6.2.0
  608. extends = common_stm32
  609. board = BigTree_GTR_v1
  610. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  611. build_flags = ${common_stm32.build_flags}
  612. -DUSB_PRODUCT=\"STM32F407IG\"
  613. -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  614. #
  615. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  616. #
  617. [env:BIGTREE_BTT002]
  618. platform = ${common_stm32.platform}
  619. extends = common_stm32
  620. board = BigTree_Btt002
  621. build_flags = ${common_stm32.build_flags}
  622. -DUSB_PRODUCT=\"STM32F407VG\"
  623. -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  624. -DHAVE_HWSERIAL2
  625. -DHAVE_HWSERIAL3
  626. -DPIN_SERIAL2_RX=PD_6
  627. -DPIN_SERIAL2_TX=PD_5
  628. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  629. lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
  630. #
  631. # Teensy 3.1 / 3.2 (ARM Cortex-M4)
  632. #
  633. [env:teensy31]
  634. platform = teensy
  635. board = teensy31
  636. lib_deps = ${common.lib_deps}
  637. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  638. lib_ignore = Adafruit NeoPixel
  639. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
  640. #
  641. # Teensy 3.5 / 3.6 (ARM Cortex-M4)
  642. #
  643. [env:teensy35]
  644. platform = teensy
  645. board = teensy35
  646. lib_deps = ${common.lib_deps}
  647. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  648. lib_ignore = Adafruit NeoPixel
  649. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
  650. #
  651. # Espressif ESP32
  652. #
  653. [env:esp32]
  654. platform = espressif32@1.11.2
  655. board = esp32dev
  656. build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
  657. lib_deps = ${common.lib_deps}
  658. AsyncTCP=https://github.com/me-no-dev/AsyncTCP/archive/master.zip
  659. ESPAsyncWebServer=https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
  660. ESP3DLib=https://github.com/luc-github/ESP3DLib.git
  661. arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git
  662. ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git
  663. lib_ignore = LiquidCrystal, LiquidTWI2, SailfishLCD, ESPAsyncTCP
  664. src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
  665. upload_speed = 115200
  666. #upload_port = marlinesp.local
  667. #board_build.flash_mode = qio
  668. #
  669. # Native
  670. # No supported Arduino libraries, base Marlin only
  671. #
  672. [env:linux_native]
  673. platform = native
  674. framework =
  675. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  676. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  677. build_unflags = -Wall
  678. lib_ldf_mode = off
  679. lib_deps =
  680. src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  681. #
  682. # Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4)
  683. #
  684. [env:SAMD51_grandcentral_m4]
  685. platform = atmelsam
  686. board = adafruit_grandcentral_m4
  687. build_flags = ${common.build_flags} -std=gnu++17 -Wno-register
  688. build_unflags = -std=gnu++11
  689. src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
  690. lib_deps = ${common.lib_deps}
  691. SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
  692. Adafruit_SPIFlash=https://github.com/adafruit/Adafruit_SPIFlash/archive/master.zip
  693. debug_tool = jlink
  694. #
  695. # RUMBA32
  696. #
  697. [env:rumba32_f446ve]
  698. platform = ${common_stm32.platform}
  699. extends = common_stm32
  700. board = rumba32_f446ve
  701. build_flags = ${common_stm32.build_flags} -Os
  702. -DSTM32F4xx -DARDUINO_RUMBA32_F446VE -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"RUMBA32_F446VE\""
  703. -DSTM32F446xx "-DUSB_PRODUCT=\"RUMBA32_F446VE\""
  704. -DHAL_PCD_MODULE_ENABLED
  705. -DDISABLE_GENERIC_SERIALUSB
  706. -DHAL_UART_MODULE_ENABLED
  707. monitor_speed = 500000
  708. upload_protocol = dfu
  709. #
  710. # MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1)
  711. #
  712. [env:rumba32_mks]
  713. platform = ${common_stm32.platform}
  714. extends = env:rumba32_f446ve
  715. build_flags = ${rumba32_f446ve.build_flags} -UUSBD_VID -DUSBD_VID=0x8000
  716. #
  717. # Just print the dependency tree
  718. #
  719. [env:include_tree]
  720. platform = atmelavr
  721. board = megaatmega2560
  722. build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
  723. lib_deps = ${common.lib_deps}
  724. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  725. src_filter = +<src/Marlin.cpp>