mirror of https://github.com/ARMmbed/mbed-os.git
ARM: ARMC6: Copy headers along with the updated linker scatter file
* Need to copy headers into the build directory as well when also writing an updated linker scatter file to the build directorypull/6056/head
parent
d8edb99168
commit
76ccfc8f8f
|
@ -14,10 +14,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
import glob
|
||||||
import re
|
import re
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from os.path import join, dirname, splitext, basename, exists
|
from os.path import join, dirname, splitext, basename, exists
|
||||||
from os import makedirs, write
|
from os import makedirs, write
|
||||||
|
from shutil import copyfile
|
||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
|
|
||||||
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
|
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
|
||||||
|
@ -208,6 +210,12 @@ class ARM(mbedToolchain):
|
||||||
out.write(self.SHEBANG)
|
out.write(self.SHEBANG)
|
||||||
out.write("\n")
|
out.write("\n")
|
||||||
out.write("".join(lines[1:]))
|
out.write("".join(lines[1:]))
|
||||||
|
|
||||||
|
# Copy headers into the build dir as well
|
||||||
|
headers = glob.glob(join(dirname(scatter_file), '*.h'))
|
||||||
|
for header in headers:
|
||||||
|
copyfile(header, join(self.build_dir, basename(header)))
|
||||||
|
|
||||||
return new_scatter
|
return new_scatter
|
||||||
|
|
||||||
@hook_tool
|
@hook_tool
|
||||||
|
|
Loading…
Reference in New Issue