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 @@ -243,7 +243,9 @@ def generate(self):
243
243
opts ['ld' ]['object_files' ] = objects
244
244
opts ['ld' ]['user_libraries' ] = libraries
245
245
opts ['ld' ]['system_libraries' ] = self .system_libraries
246
- opts ['ld' ]['script' ] = self .ld_script
246
+ opts ['ld' ]['script' ] = join (id .capitalize (),
247
+ "linker-script-%s.ld" % id )
248
+ opts ['cpp_cmd' ] = " " .join (toolchain .preproc )
247
249
248
250
# Unique IDs used in multiple places.
249
251
# Those used only once are implemented with {{u.id}}.
@@ -260,6 +262,7 @@ def generate(self):
260
262
261
263
jinja_ctx = {
262
264
'name' : self .project_name ,
265
+ 'ld_script' : self .ld_script ,
263
266
264
267
# Compiler & linker command line options
265
268
'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