From 2a080a0840c6ae7c39e9ce457e691b28a838e47f Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Fri, 5 Apr 2019 11:46:39 -0500 Subject: [PATCH] Correct call to add_file_ref --- tools/export/makefile/__init__.py | 10 +++++++--- tools/toolchains/arm.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) 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