Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7568025

Browse files
committed
[CI] Update binary management after cli change.
With new arduino-cli v0.11.0, output management has changed.Seearduino/arduino-cli#687Binaries are always copied.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parentb351b55 commit7568025

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

‎CI/build/arduino-cli.py‎

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ def create_output_log_tree():
118118
# Folders
119119
forboardinboard_fqbn:
120120
createFolder(os.path.join(output_dir,board))
121-
ifargs.bin:
122-
createFolder(os.path.join(output_dir,board,bin_dir))
123121
createFolder(os.path.join(build_output_dir,board))
124122

125123

@@ -484,8 +482,6 @@ def check_status(status, build_conf, boardKo):
484482

485483
ifstatus[1]==0:
486484
result="\033[32msucceeded\033[0m"
487-
ifargs.bin:
488-
bin_copy(build_conf[0],sketch_name)
489485
nb_build_passed+=1
490486
elifstatus[1]==1:
491487
# Check if failed due to a region overflowed
@@ -514,8 +510,6 @@ def check_status(status, build_conf, boardKo):
514510
else:
515511
# else consider it succeeded
516512
result="\033[32msucceeded*\033[0m"
517-
ifargs.bin:
518-
empty_bin(build_conf[0],sketch_name)
519513
nb_build_passed+=1
520514
else:
521515
result="\033[31merror\033[0m"
@@ -645,34 +639,6 @@ def log_final_result():
645639
print(output_dir)
646640

647641

648-
# Create an empty binary
649-
defempty_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-
exceptIOError:
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-
defbin_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-
exceptOSErrorase:
672-
print("Cannot copy the binary from the arduino-cli output: "+e.strerror)
673-
raise
674-
675-
676642
# Set up specific options to customise arduino builder command
677643
defget_fqbn(b_name):
678644
ifb_nameinboard_custom_fqbnandboard_custom_fqbn[b_name]:
@@ -696,8 +662,8 @@ def genBasicCommand(b_name):
696662
cmd.append(build_output_cache_dir)
697663
ifargs.verbose:
698664
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))
701667
cmd.append("--fqbn")
702668
cmd.append(get_fqbn(b_name))
703669
cmd.append("dummy_sketch")
@@ -865,7 +831,6 @@ def build(build_conf):
865831
)
866832

867833
g1=parser.add_mutually_exclusive_group()
868-
g1.add_argument("--bin",help="save binaries",action="store_true")
869834
g1.add_argument("--ci",help="custom configuration for CI build",action="store_true")
870835

871836
# Sketch options

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp