Skip to content

Commit e74ec16

Browse files
committed
Support example boards.local.txt and board specific .platform.boards.local.txt
1 parent ea8dfa1 commit e74ec16

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build_platform.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,16 @@ def test_examples_in_folder(platform, folderpath):
402402
if os.path.exists(gen_file_name):
403403
ColorPrint.print_info("generating")
404404

405+
# check if boards.local.txt should be copied
406+
if COPY_BOARDS_LOCAL_TXT:
407+
boards_local_txt = folderpath+"/."+platform+".boards.local.txt"
408+
if os.path.exists(boards_local_txt):
409+
ColorPrint.print_info("Copying boards.local.txt from "+boards_local_txt)
410+
install_boards_local_txt(":".join(fqbn.split(':')[0:2]), boards_local_txt)
411+
elif os.path.exists(folderpath+"/boards.local.txt"):
412+
ColorPrint.print_info("Copying boards.local.txt from "+folderpath+"/boards.local.txt")
413+
install_boards_local_txt(":".join(fqbn.split(':')[0:2]), folderpath+"/boards.local.txt")
414+
405415
if BUILD_WARN:
406416
if os.path.exists(gen_file_name):
407417
cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, '-e', folderpath]

0 commit comments

Comments
 (0)