Skip to content

Commit cb86688

Browse files
authored
project link script and improve extra images handling
1 parent 90e5e09 commit cb86688

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

builder/frameworks/espidf.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,6 @@ def generate_mbedtls_bundle(sdk_config):
14751475

14761476
# Use exec_command to change working directory
14771477
exec_command(cmd + crt_args, cwd=BUILD_DIR)
1478-
bundle_path = str(Path("$BUILD_DIR") / "x509_crt_bundle")
14791478
env.Execute(
14801479
env.VerboseAction(
14811480
" ".join(
@@ -1809,10 +1808,10 @@ def get_python_exe():
18091808
)
18101809
env.Exit(1)
18111810

1812-
project_ld_scipt = generate_project_ld_script(
1811+
project_ld_script = generate_project_ld_script(
18131812
sdk_config, [project_target_name, "__pio_env"]
18141813
)
1815-
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", project_ld_scipt)
1814+
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", project_ld_script)
18161815

18171816
elf_config = get_project_elf(target_configs)
18181817
default_config_name = find_default_component(target_configs)
@@ -1829,7 +1828,7 @@ def get_python_exe():
18291828
env.Exit(1)
18301829

18311830
for component_config in framework_components_map.values():
1832-
env.Depends(project_ld_scipt, component_config["lib"])
1831+
env.Depends(project_ld_script, component_config["lib"])
18331832

18341833
project_config = target_configs.get(project_target_name, {})
18351834
default_config = target_configs.get(default_config_name, {})
@@ -2214,12 +2213,12 @@ def idf_custom_component(source, target, env):
22142213
)
22152214
]
22162215
)
2217-
EXTRA_IMG_DIR = str(Path(env.subst("$PROJECT_DIR")) / "variants" / "tasmota")
2218-
env.Append(
2219-
FLASH_EXTRA_IMAGES=[
2220-
(offset, str(Path(EXTRA_IMG_DIR) / img)) for offset, img in board.get("upload.arduino.flash_extra_images", [])
2221-
]
2222-
)
2216+
extra_imgs = board.get("upload.arduino.flash_extra_images", [])
2217+
if extra_imgs:
2218+
extra_img_dir = Path(env.subst("$PROJECT_DIR")) / "variants" / "tasmota"
2219+
env.Append(
2220+
FLASH_EXTRA_IMAGES=[(offset, str(extra_img_dir / img)) for offset, img in extra_imgs]
2221+
)
22232222

22242223
def _parse_size(value):
22252224
if isinstance(value, int):

0 commit comments

Comments
 (0)