@@ -118,8 +118,6 @@ def create_output_log_tree():
118
118
# Folders
119
119
for board in board_fqbn :
120
120
createFolder (os .path .join (output_dir , board ))
121
- if args .bin :
122
- createFolder (os .path .join (output_dir , board , bin_dir ))
123
121
createFolder (os .path .join (build_output_dir , board ))
124
122
125
123
@@ -484,8 +482,6 @@ def check_status(status, build_conf, boardKo):
484
482
485
483
if status [1 ] == 0 :
486
484
result = "\033 [32msucceeded\033 [0m"
487
- if args .bin :
488
- bin_copy (build_conf [0 ], sketch_name )
489
485
nb_build_passed += 1
490
486
elif status [1 ] == 1 :
491
487
# Check if failed due to a region overflowed
@@ -514,8 +510,6 @@ def check_status(status, build_conf, boardKo):
514
510
else :
515
511
# else consider it succeeded
516
512
result = "\033 [32msucceeded*\033 [0m"
517
- if args .bin :
518
- empty_bin (build_conf [0 ], sketch_name )
519
513
nb_build_passed += 1
520
514
else :
521
515
result = "\033 [31merror\033 [0m"
@@ -645,34 +639,6 @@ def log_final_result():
645
639
print (output_dir )
646
640
647
641
648
- # Create an empty binary
649
- def empty_bin (board_name , sketch_name ):
650
- empty_path = os .path .abspath (os .path .join (output_dir , board_name , bin_dir ))
651
- createFolder (empty_path )
652
- empty_file = os .path .join (
653
- empty_path , sketch_name + "_COULD_NOT_FIT_IN_THIS_BOARD.bin"
654
- )
655
- try :
656
- f = open (empty_file , "w" )
657
- except IOError :
658
- print ("Cannot create empty binary: " , empty_file )
659
- else :
660
- f .close ()
661
-
662
-
663
- # Create a "bin" directory for each board and copy all binary files
664
- # from the builder output directory into it
665
- def bin_copy (board_name , sketch_name ):
666
- try :
667
- shutil .copy (
668
- os .path .join (build_output_dir , board_name , sketch_name + ".bin" ),
669
- os .path .abspath (os .path .join (output_dir , board_name , bin_dir )),
670
- )
671
- except OSError as e :
672
- print ("Cannot copy the binary from the arduino-cli output: " + e .strerror )
673
- raise
674
-
675
-
676
642
# Set up specific options to customise arduino builder command
677
643
def get_fqbn (b_name ):
678
644
if b_name in board_custom_fqbn and board_custom_fqbn [b_name ]:
@@ -696,8 +662,8 @@ def genBasicCommand(b_name):
696
662
cmd .append (build_output_cache_dir )
697
663
if args .verbose :
698
664
cmd .append ("--verbose" )
699
- cmd .append ("-o " )
700
- cmd .append (os .path .join (build_output_dir , b_name , "sketch" ))
665
+ cmd .append ("--output-dir " )
666
+ cmd .append (os .path .join (output_dir , b_name , bin_dir ))
701
667
cmd .append ("--fqbn" )
702
668
cmd .append (get_fqbn (b_name ))
703
669
cmd .append ("dummy_sketch" )
@@ -865,7 +831,6 @@ def build(build_conf):
865
831
)
866
832
867
833
g1 = parser .add_mutually_exclusive_group ()
868
- g1 .add_argument ("--bin" , help = "save binaries" , action = "store_true" )
869
834
g1 .add_argument ("--ci" , help = "custom configuration for CI build" , action = "store_true" )
870
835
871
836
# Sketch options
0 commit comments