File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
tools/export/gnuarmeclipse Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,9 @@ def generate(self):
244
244
opts ['ld' ]['object_files' ] = objects
245
245
opts ['ld' ]['user_libraries' ] = libraries
246
246
opts ['ld' ]['system_libraries' ] = self .system_libraries
247
- opts ['ld' ]['script' ] = self .ld_script
247
+ opts ['ld' ]['script' ] = join (id .capitalize (),
248
+ "linker-script-%s.ld" % id )
249
+ opts ['cpp_cmd' ] = " " .join (toolchain .preproc )
248
250
249
251
# Unique IDs used in multiple places.
250
252
# Those used only once are implemented with {{u.id}}.
@@ -261,6 +263,7 @@ def generate(self):
261
263
262
264
jinja_ctx = {
263
265
'name' : self .project_name ,
266
+ 'ld_script' : self .ld_script ,
264
267
265
268
# Compiler & linker command line options
266
269
'options' : self .options ,
Original file line number Diff line number Diff line change 3
3
mbedclean:
4
4
$(RM) $(OBJS)
5
5
$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS)
6
- $(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.*
7
- -@echo ' '
6
+ $(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.* linker-script-*.ld
7
+ -@echo ' '
8
+
9
+ {% for config, data in options.iteritems() %}
10
+ linker-script-{{config}}.ld: ../{{ld_script}}
11
+ {{data.cpp_cmd}} {{data.ld.other}} $< -o $@
12
+ {{name}}.elf: linker-script-{{config}}.ld
13
+ {% endfor %}
You can’t perform that action at this time.
0 commit comments