Skip to content

Commit b741e85

Browse files
author
c.mandl
committed
Added Compiler Toolchain Varibales in Templates and modfied generation of jinja
1 parent a070327 commit b741e85

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

tools/export/nb/Makefile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CCADMIN=CCadmin
5151

5252
BUILDDIR = BUILD
5353
PLATFORM = {{target}}
54-
ELF2BIN = 'arm-none-eabi-objcopy'
54+
ELF2BIN = '{{elf2bin_cmd}}'
5555
TARGET = ${CND_DISTDIR}/${CONF}/${CND_PLATFORM}/{{name}}
5656

5757

tools/export/nb/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ def create_jinja_ctx(self):
243243
'cpp_std': self.get_netbeans_cpp_std(cpp_std),
244244
'linker_script': self.ld_script,
245245
'linker_libs': sys_libs,
246-
'pp_cmd': preproc
246+
'pp_cmd': preproc,
247+
'cc_cmd': self.toolchain.cc[0],
248+
'cppc_cmd': self.toolchain.cppc[0],
249+
'asm_cmd': self.toolchain.asm[0],
250+
'ld_cmd': self.toolchain.ld[0],
251+
'elf2bin_cmd': self.toolchain.elf2bin
247252
}
248253
return jinja_ctx
249254

tools/export/nb/configurations.tmpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<Elem>{{ symbol }}</Elem>
8080
{% endfor -%}
8181
</preprocessorList>
82+
<commandlineTool>{{cc_cmd}}</commandlineTool>
8283
</cTool>
8384
<ccTool>
8485
<standard>{{ cpp_std }}</standard>
@@ -104,6 +105,7 @@
104105
<Elem>{{ symbol }}</Elem>
105106
{% endfor -%}
106107
</preprocessorList>
108+
<commandlineTool>{{cppc_cmd}}</commandlineTool>
107109
</ccTool>
108110
<fortranCompilerTool>
109111
<developmentMode>5</developmentMode>
@@ -129,11 +131,12 @@
129131
<Elem>{{ symbol }}</Elem>
130132
{% endfor -%}
131133
</preprocessorList>
134+
<commandlineTool>{{asm_cmd}}</commandlineTool>
132135
</asmTool>
133136
<linkerTool>
134137
<output>${CND_DISTDIR}/${CND_CONF}/{{target}}/{{name}}.elf</output>
135138
<additionalDep>${CND_BUILDDIR}/${CND_CONF}/{{target}}/.link_script.ld</additionalDep>
136-
<commandlineTool>arm-none-eabi-gcc</commandlineTool>
139+
<commandlineTool>{{ld_cmd}}</commandlineTool>
137140
<commandLine>-T ${CND_BUILDDIR}/${CND_CONF}/{{target}}/.link_script.ld {%- for symbol in opts['ld'] -%}{{" "+symbol}}{%- endfor -%} {%- for item in linker_libs -%}{{" "+item}}{%- endfor -%} </commandLine>
138141
</linkerTool>
139142
</compileType>

0 commit comments

Comments
 (0)