mirror of https://github.com/ARMmbed/mbed-os.git
Update gnuarmeclipse to preprocess linker scripts
parent
a8650d8e82
commit
e6c44d633c
|
@ -244,7 +244,9 @@ class GNUARMEclipse(Exporter):
|
||||||
opts['ld']['object_files'] = objects
|
opts['ld']['object_files'] = objects
|
||||||
opts['ld']['user_libraries'] = libraries
|
opts['ld']['user_libraries'] = libraries
|
||||||
opts['ld']['system_libraries'] = self.system_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.
|
# Unique IDs used in multiple places.
|
||||||
# Those used only once are implemented with {{u.id}}.
|
# Those used only once are implemented with {{u.id}}.
|
||||||
|
@ -261,6 +263,7 @@ class GNUARMEclipse(Exporter):
|
||||||
|
|
||||||
jinja_ctx = {
|
jinja_ctx = {
|
||||||
'name': self.project_name,
|
'name': self.project_name,
|
||||||
|
'ld_script': self.ld_script,
|
||||||
|
|
||||||
# Compiler & linker command line options
|
# Compiler & linker command line options
|
||||||
'options': self.options,
|
'options': self.options,
|
||||||
|
|
|
@ -3,5 +3,11 @@
|
||||||
mbedclean:
|
mbedclean:
|
||||||
$(RM) $(OBJS)
|
$(RM) $(OBJS)
|
||||||
$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS)
|
$(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}}.*
|
$(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.* linker-script-*.ld
|
||||||
-@echo ' '
|
-@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