mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4069 from theotherjimmy/preproc-linker-gnuarmeclipse
Update gnuarmeclipse to preprocess linker scriptspull/4148/head
commit
0b1117793f
|
@ -244,7 +244,9 @@ class GNUARMEclipse(Exporter):
|
|||
opts['ld']['object_files'] = objects
|
||||
opts['ld']['user_libraries'] = libraries
|
||||
opts['ld']['system_libraries'] = self.system_libraries
|
||||
opts['ld']['script'] = self.ld_script
|
||||
opts['ld']['script'] = join(id.capitalize(),
|
||||
"linker-script-%s.ld" % id)
|
||||
opts['cpp_cmd'] = " ".join(toolchain.preproc)
|
||||
|
||||
# Unique IDs used in multiple places.
|
||||
# Those used only once are implemented with {{u.id}}.
|
||||
|
@ -261,6 +263,7 @@ class GNUARMEclipse(Exporter):
|
|||
|
||||
jinja_ctx = {
|
||||
'name': self.project_name,
|
||||
'ld_script': self.ld_script,
|
||||
|
||||
# Compiler & linker command line options
|
||||
'options': self.options,
|
||||
|
|
|
@ -3,5 +3,11 @@
|
|||
mbedclean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS)
|
||||
$(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.*
|
||||
-@echo ' '
|
||||
$(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.* linker-script-*.ld
|
||||
-@echo ' '
|
||||
|
||||
{% for config, data in options.iteritems() %}
|
||||
linker-script-{{config}}.ld: ../{{ld_script}}
|
||||
{{data.cpp_cmd}} {{data.ld.other}} $< -o $@
|
||||
{{name}}.elf: linker-script-{{config}}.ld
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue