diff --git a/tools/export/makefile/__init__.py b/tools/export/makefile/__init__.py index 43853730c3..e728034a15 100644 --- a/tools/export/makefile/__init__.py +++ b/tools/export/makefile/__init__.py @@ -272,10 +272,14 @@ class Arm(Makefile): if self.resources.linker_script: sct_file = self.resources.get_file_refs(FileType.LD_SCRIPT)[-1] new_script = self.toolchain.correct_scatter_shebang( - sct_file, dirname(sct_file.name)) + sct_file, dirname(sct_file.name) + ) if new_script is not sct_file: - self.resources.add_files_to_type( - FileType.LD_SCRIPT, [new_script]) + self.resources.add_file_ref( + FileType.LD_SCRIPT, + new_script.name, + new_script.path + ) return super(Arm, self).generate() class Armc5(Arm): diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 2f7b905d47..88db704132 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -284,7 +284,7 @@ class ARM(mbedToolchain): scatter file Return: - The location of the correct scatter file + The FileRef of the correct scatter file Side Effects: This method MAY write a new scatter file to disk