File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,9 @@ $(PROJECT).link_script{{link_script_ext}}: $(LINKER_SCRIPT)
135
135
136
136
{% block target_project_elf %}
137
137
$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) {% if pp_cmd -%} $(PROJECT).link_script{{link_script_ext}} {% else%} $(LINKER_SCRIPT) {% endif %}
138
+ +@echo "$(filter %.o, $^)" > .link_options.txt
138
139
+@echo "link: $(notdir $@)"
139
- @$(LD) $(LD_FLAGS) {{link_script_option}} $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ $(filter %.o, $^) $(LIBRARIES) $(LD_SYS_LIBS)
140
+ @$(LD) $(LD_FLAGS) {{link_script_option}} $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ {{response_option}}.link_options.txt $(LIBRARIES) $(LD_SYS_LIBS)
140
141
{% endblock %}
141
142
142
143
$(PROJECT).bin: $(PROJECT).elf
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ def generate(self):
113
113
'user_library_flag' : self .USER_LIBRARY_FLAG ,
114
114
'needs_asm_preproc' : self .PREPROCESS_ASM ,
115
115
'shell_escape' : shell_escape ,
116
+ 'response_option' : self .RESPONSE_OPTION ,
116
117
}
117
118
118
119
if hasattr (self .toolchain , "preproc" ):
@@ -233,6 +234,7 @@ class GccArm(Makefile):
233
234
TOOLCHAIN = "GCC_ARM"
234
235
LINK_SCRIPT_OPTION = "-T"
235
236
USER_LIBRARY_FLAG = "-L"
237
+ RESPONSE_OPTION = "@"
236
238
237
239
@staticmethod
238
240
def prepare_lib (libname ):
@@ -250,6 +252,7 @@ class Arm(Makefile):
250
252
LINK_SCRIPT_OPTION = "--scatter"
251
253
USER_LIBRARY_FLAG = "--userlibpath "
252
254
TEMPLATE = 'make-arm'
255
+ RESPONSE_OPTION = "--via "
253
256
254
257
@staticmethod
255
258
def prepare_lib (libname ):
@@ -289,6 +292,7 @@ class IAR(Makefile):
289
292
TOOLCHAIN = "IAR"
290
293
LINK_SCRIPT_OPTION = "--config"
291
294
USER_LIBRARY_FLAG = "-L"
295
+ RESPONSE_OPTION = "-f "
292
296
293
297
@staticmethod
294
298
def prepare_lib (libname ):
You can’t perform that action at this time.
0 commit comments