Browse Source

Optimized (non-optiboot) Melzi env (#20021)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Darren Horrocks 4 years ago
parent
commit
53cc8a0d6e
No account linked to committer's email address
2 changed files with 107 additions and 91 deletions
  1. 20
    20
      Marlin/src/pins/pins.h
  2. 87
    71
      platformio.ini

+ 20
- 20
Marlin/src/pins/pins.h View File

@@ -298,27 +298,27 @@
298 298
 //
299 299
 
300 300
 #elif MB(SANGUINOLOLU_11)
301
-  #include "sanguino/pins_SANGUINOLOLU_11.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
301
+  #include "sanguino/pins_SANGUINOLOLU_11.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
302 302
 #elif MB(SANGUINOLOLU_12)
303
-  #include "sanguino/pins_SANGUINOLOLU_12.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
303
+  #include "sanguino/pins_SANGUINOLOLU_12.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
304 304
 #elif MB(MELZI)
305
-  #include "sanguino/pins_MELZI.h"              // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
305
+  #include "sanguino/pins_MELZI.h"              // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
306 306
 #elif MB(MELZI_V2)
307
-  #include "sanguino/pins_MELZI_V2.h"           // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
307
+  #include "sanguino/pins_MELZI_V2.h"           // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
308 308
 #elif MB(MELZI_MAKR3D)
309
-  #include "sanguino/pins_MELZI_MAKR3D.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
309
+  #include "sanguino/pins_MELZI_MAKR3D.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
310 310
 #elif MB(MELZI_CREALITY)
311
-  #include "sanguino/pins_MELZI_CREALITY.h"     // ATmega1284P                            env:melzi env:melzi_optimized env:melzi_optiboot
311
+  #include "sanguino/pins_MELZI_CREALITY.h"     // ATmega1284P                            env:melzi env:melzi_optimized env:melzi_optiboot env:melzi_optiboot_optimized
312 312
 #elif MB(MELZI_MALYAN)
313
-  #include "sanguino/pins_MELZI_MALYAN.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
313
+  #include "sanguino/pins_MELZI_MALYAN.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
314 314
 #elif MB(MELZI_TRONXY)
315
-  #include "sanguino/pins_MELZI_TRONXY.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
315
+  #include "sanguino/pins_MELZI_TRONXY.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
316 316
 #elif MB(STB_11)
317
-  #include "sanguino/pins_STB_11.h"             // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
317
+  #include "sanguino/pins_STB_11.h"             // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
318 318
 #elif MB(AZTEEG_X1)
319
-  #include "sanguino/pins_AZTEEG_X1.h"          // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
319
+  #include "sanguino/pins_AZTEEG_X1.h"          // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
320 320
 #elif MB(ZMIB_V2)
321
-  #include "sanguino/pins_ZMIB_V2.h"            // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
321
+  #include "sanguino/pins_ZMIB_V2.h"            // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
322 322
 
323 323
 //
324 324
 // Other ATmega644P, ATmega644, ATmega1284P
@@ -327,27 +327,27 @@
327 327
 #elif MB(GEN3_MONOLITHIC)
328 328
   #include "sanguino/pins_GEN3_MONOLITHIC.h"    // ATmega644P                             env:sanguino644p
329 329
 #elif MB(GEN3_PLUS)
330
-  #include "sanguino/pins_GEN3_PLUS.h"          // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
330
+  #include "sanguino/pins_GEN3_PLUS.h"          // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
331 331
 #elif MB(GEN6)
332
-  #include "sanguino/pins_GEN6.h"               // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
332
+  #include "sanguino/pins_GEN6.h"               // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
333 333
 #elif MB(GEN6_DELUXE)
334
-  #include "sanguino/pins_GEN6_DELUXE.h"        // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
334
+  #include "sanguino/pins_GEN6_DELUXE.h"        // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
335 335
 #elif MB(GEN7_CUSTOM)
336
-  #include "sanguino/pins_GEN7_CUSTOM.h"        // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p
336
+  #include "sanguino/pins_GEN7_CUSTOM.h"        // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
337 337
 #elif MB(GEN7_12)
338
-  #include "sanguino/pins_GEN7_12.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p
338
+  #include "sanguino/pins_GEN7_12.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
339 339
 #elif MB(GEN7_13)
340
-  #include "sanguino/pins_GEN7_13.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p
340
+  #include "sanguino/pins_GEN7_13.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
341 341
 #elif MB(GEN7_14)
342
-  #include "sanguino/pins_GEN7_14.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p
342
+  #include "sanguino/pins_GEN7_14.h"            // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
343 343
 #elif MB(OMCA_A)
344 344
   #include "sanguino/pins_OMCA_A.h"             // ATmega644                              env:sanguino644p
345 345
 #elif MB(OMCA)
346 346
   #include "sanguino/pins_OMCA.h"               // ATmega644P, ATmega644                  env:sanguino644p
347 347
 #elif MB(ANET_10)
348
-  #include "sanguino/pins_ANET_10.h"            // ATmega1284P                            env:sanguino1284p
348
+  #include "sanguino/pins_ANET_10.h"            // ATmega1284P                            env:sanguino1284p env:sanguino1284p_optimized
349 349
 #elif MB(SETHI)
350
-  #include "sanguino/pins_SETHI.h"              // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p
350
+  #include "sanguino/pins_SETHI.h"              // ATmega644P, ATmega644, ATmega1284P     env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized
351 351
 
352 352
 //
353 353
 // Teensyduino - AT90USB1286, AT90USB1286P

+ 87
- 71
platformio.ini View File

@@ -434,9 +434,9 @@ src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
434 434
 # ATmega2560
435 435
 #
436 436
 [env:mega2560]
437
-platform            = atmelavr
438
-extends             = common_avr8
439
-board               = megaatmega2560
437
+platform = atmelavr
438
+extends  = common_avr8
439
+board    = megaatmega2560
440 440
 
441 441
 #
442 442
 # ATmega2560 with extended pins 70-85 defined
@@ -457,9 +457,9 @@ extra_scripts       = ${common.extra_scripts}
457 457
 # ATmega1280
458 458
 #
459 459
 [env:mega1280]
460
-platform      = atmelavr
461
-extends       = common_avr8
462
-board         = megaatmega1280
460
+platform = atmelavr
461
+extends  = common_avr8
462
+board    = megaatmega1280
463 463
 
464 464
 #
465 465
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
@@ -474,81 +474,97 @@ upload_speed  = 57600
474 474
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
475 475
 #
476 476
 [env:MightyBoard2560]
477
-platform      = atmelavr
478
-extends       = common_avr8
479
-board         = ATmega2560
480
-upload_protocol = wiring
481
-upload_speed  = 57600
477
+platform                  = atmelavr
478
+extends                   = common_avr8
479
+board                     = ATmega2560
480
+upload_protocol           = wiring
481
+upload_speed              = 57600
482 482
 board_upload.maximum_size = 253952
483 483
 
484 484
 #
485 485
 # RAMBo
486 486
 #
487 487
 [env:rambo]
488
-platform      = atmelavr
489
-extends       = common_avr8
490
-board         = reprap_rambo
488
+platform = atmelavr
489
+extends  = common_avr8
490
+board    = reprap_rambo
491 491
 
492 492
 #
493 493
 # FYSETC F6 V1.3
494 494
 #
495 495
 [env:FYSETC_F6_13]
496
-platform      = atmelavr
497
-extends       = common_avr8
498
-board         = fysetc_f6_13
496
+platform = atmelavr
497
+extends  = common_avr8
498
+board    = fysetc_f6_13
499 499
 
500 500
 #
501 501
 # FYSETC F6 V1.4
502 502
 #
503 503
 [env:FYSETC_F6_14]
504
-platform      = atmelavr
505
-extends       = common_avr8
506
-board         = fysetc_f6_14
504
+platform = atmelavr
505
+extends  = common_avr8
506
+board    = fysetc_f6_14
507 507
 
508 508
 #
509 509
 # Sanguinololu (ATmega644p)
510 510
 #
511 511
 [env:sanguino644p]
512
-platform      = atmelavr
513
-extends       = common_avr8
514
-board         = sanguino_atmega644p
512
+platform = atmelavr
513
+extends  = common_avr8
514
+board    = sanguino_atmega644p
515 515
 
516 516
 #
517 517
 # Sanguinololu (ATmega1284p)
518 518
 #
519 519
 [env:sanguino1284p]
520
-platform      = atmelavr
521
-extends       = common_avr8
522
-board         = sanguino_atmega1284p
520
+platform                  = atmelavr
521
+extends                   = common_avr8
522
+board                     = sanguino_atmega1284p
523 523
 board_upload.maximum_size = 126976
524 524
 
525 525
 #
526 526
 # Melzi and clones (ATmega1284p)
527 527
 #
528 528
 [env:melzi]
529
-platform      = atmelavr
530
-extends       = common_avr8
531
-board         = sanguino_atmega1284p
532
-upload_speed  = 57600
533
-board_upload.maximum_size = 126976
529
+platform     = atmelavr
530
+extends      = env:sanguino1284p
531
+upload_speed = 57600
532
+
533
+#
534
+# Sanguinololu (ATmega1284p stock bootloader with tuned flags)
535
+#
536
+
537
+[tuned_1284p]
538
+build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
539
+
540
+[env:sanguino1284p_optimized]
541
+platform    = atmelavr
542
+extends     = env:melzi
543
+build_flags = ${tuned_1284p.build_flags}
544
+
545
+#
546
+# Melzi and clones (alias for sanguino1284p_optimized)
547
+#
548
+[env:melzi_optimized]
549
+platform = atmelavr
550
+extends  = env:sanguino1284p_optimized
534 551
 
535 552
 #
536 553
 # Melzi and clones (Optiboot bootloader)
537 554
 #
538 555
 [env:melzi_optiboot]
539
-platform      = atmelavr
540
-extends       = common_avr8
541
-board         = sanguino_atmega1284p
542
-upload_speed  = 115200
556
+platform     = atmelavr
557
+extends      = common_avr8
558
+board        = sanguino_atmega1284p
559
+upload_speed = 115200
543 560
 
544 561
 #
545 562
 # Melzi and clones (Zonestar Melzi2 with tuned flags)
546 563
 #
547
-[env:melzi_optimized]
548
-platform      = atmelavr
549
-extends       = env:melzi_optiboot
550
-build_flags   = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
551
-build_unflags = -g -ggdb
564
+[env:melzi_optiboot_optimized]
565
+platform    = atmelavr
566
+extends     = env:melzi_optiboot
567
+build_flags = ${tuned_1284p.build_flags}
552 568
 
553 569
 #
554 570
 # AT90USB1286 boards using CDC bootloader
@@ -558,10 +574,10 @@ build_unflags = -g -ggdb
558 574
 # - TEENSYLU
559 575
 #
560 576
 [env:at90usb1286_cdc]
561
-platform      = teensy
562
-extends       = common_avr8
563
-board         = at90usb1286
564
-lib_ignore    = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet
577
+platform   = teensy
578
+extends    = common_avr8
579
+board      = at90usb1286
580
+lib_ignore = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet
565 581
 
566 582
 #
567 583
 # AT90USB1286 boards using DFU bootloader
@@ -570,8 +586,8 @@ lib_ignore    = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet
570 586
 # - ? 5DPRINT ?
571 587
 #
572 588
 [env:at90usb1286_dfu]
573
-platform      = teensy
574
-extends       = env:at90usb1286_cdc
589
+platform = teensy
590
+extends  = env:at90usb1286_cdc
575 591
 
576 592
 #################################
577 593
 #                               #
@@ -586,20 +602,20 @@ extends       = env:at90usb1286_cdc
586 602
 #  - RADDS
587 603
 #
588 604
 [env:DUE]
589
-platform      = atmelsam
590
-board         = due
591
-src_filter    = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>
605
+platform   = atmelsam
606
+board      = due
607
+src_filter = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>
592 608
 
593 609
 [env:DUE_USB]
594
-platform      = atmelsam
595
-extends       = env:DUE
596
-board         = dueUSB
610
+platform = atmelsam
611
+extends  = env:DUE
612
+board    = dueUSB
597 613
 
598 614
 [env:DUE_debug]
599 615
 # Used when WATCHDOG_RESET_MANUAL is enabled
600
-platform      = atmelsam
601
-extends       = env:DUE
602
-build_flags   = ${common.build_flags}
616
+platform    = atmelsam
617
+extends     = env:DUE
618
+build_flags = ${common.build_flags}
603 619
   -funwind-tables
604 620
   -mpoke-function-name
605 621
 
@@ -607,24 +623,24 @@ build_flags   = ${common.build_flags}
607 623
 # Archim SAM
608 624
 #
609 625
 [common_DUE_archim]
610
-platform      = atmelsam
611
-extends       = env:DUE
612
-board         = archim
613
-build_flags   = ${common.build_flags}
626
+platform                 = atmelsam
627
+extends                  = env:DUE
628
+board                    = archim
629
+build_flags              = ${common.build_flags}
614 630
   -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
615 631
 board_build.variants_dir = buildroot/share/PlatformIO/variants/
616
-extra_scripts = ${common.extra_scripts}
632
+extra_scripts            = ${common.extra_scripts}
617 633
   Marlin/src/HAL/DUE/upload_extra_script.py
618 634
 
619 635
 [env:DUE_archim]
620
-platform      = ${common_DUE_archim.platform}
621
-extends       = common_DUE_archim
636
+platform = ${common_DUE_archim.platform}
637
+extends  = common_DUE_archim
622 638
 
623 639
 # Used when WATCHDOG_RESET_MANUAL is enabled
624 640
 [env:DUE_archim_debug]
625
-platform      = ${common_DUE_archim.platform}
626
-extends       = common_DUE_archim
627
-build_flags   = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
641
+platform    = ${common_DUE_archim.platform}
642
+extends     = common_DUE_archim
643
+build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
628 644
 
629 645
 #################################
630 646
 #                               #
@@ -678,14 +694,14 @@ build_flags       = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC17
678 694
 # NXP LPC176x ARM Cortex-M3
679 695
 #
680 696
 [env:LPC1768]
681
-platform  = ${common_LPC.platform}
682
-extends   = common_LPC
683
-board     = nxp_lpc1768
697
+platform = ${common_LPC.platform}
698
+extends  = common_LPC
699
+board    = nxp_lpc1768
684 700
 
685 701
 [env:LPC1769]
686
-platform  = ${common_LPC.platform}
687
-extends   = common_LPC
688
-board     = nxp_lpc1769
702
+platform = ${common_LPC.platform}
703
+extends  = common_LPC
704
+board    = nxp_lpc1769
689 705
 
690 706
 #################################
691 707
 #                               #

Loading…
Cancel
Save