Skip to content

Commit 87d6bec

Browse files
nirvannehristev
authored andcommitted
scripts: addpmecchead.py: realign PMECC output path with Makefile
Since commit 814f3bd and release v4.0.0, AT91Bootstrap ELF and BIN output files have moved to ./build/binaries/. However this same output path is also coded in autoload.py (which is one of the project files for MPLAB X IDE) and was left misaligned. Hence MPLAB X continued to direct pmecc.tmp to the former ./binaries/ subdirectory, and it broke the build whenever NAND Flash was targeted. 1. Realign the output path in autoload.py with the root Makefile. 2. Also mkdir() will not create nested directories recursively. Replace it with its recursive counterpart. Fixes: 814f3bd ("Makefile: add BUILDDIR for redirecting generated files to user-designated output path") Reported-by: Jeba Shiny <[email protected]> Signed-off-by: Aubin Constans <[email protected]>
1 parent a064468 commit 87d6bec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

autoload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ def on_project_build(e):
7575
global project_dir
7676

7777
dot_config_path = os.path.join(project_dir, ".config")
78-
binaries_path = os.path.join(project_dir, "binaries")
78+
binaries_path = os.path.join(project_dir, "build", "binaries")
7979
addpmecchead.pmecchead(dot_config_path, binaries_path)
8080

scripts/addpmecchead.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def pmecchead(dot_config_path, binaries_path):
2020
header = os.path.join(binaries_path, "pmecc.tmp")
2121
if find_in_file(dot_config_path, "CONFIG_NANDFLASH=y"):
2222
if not (os.path.exists(binaries_path)):
23-
os.mkdir(binaries_path)
23+
os.makedirs(binaries_path)
2424
if find_in_file(dot_config_path, "CONFIG_PMECC_PAGESIZE_512=y"):
2525
pagesize = 512
2626
elif find_in_file(dot_config_path, "CONFIG_PMECC_PAGESIZE_1024=y"):

0 commit comments

Comments
 (0)