mirror of https://github.com/ARMmbed/mbed-os.git
applied patch from mmahadevan108
- fixes invalid char '#' in linker script - added 'mbedclean'pull/4916/head
parent
025b8d9a4d
commit
2615982b3a
|
|
@ -21,7 +21,7 @@
|
|||
<folderInfo id="com.crt.advproject.config.exe.{{opts['id']}}.{{opts['uid']['config']}}" name="/" resourcePath="">
|
||||
<toolChain id="com.crt.advproject.toolchain.exe.{{opts['id']}}.{{u.id}}" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.exe.{{opts['parent_id']}}">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.{{opts['id']}}.{{u.id}}" name="ARM-based MCU ({{opts['name']}})" superClass="com.crt.advproject.platform.exe.{{opts['id']}}"/>
|
||||
<builder buildPath="${workspace_loc:/{{name}}}/{{opts['name']}}" id="com.crt.advproject.builder.exe.{{opts['id']}}.{{u.id}}" keepEnvironmentInBuildfile="false" managedBuildOn="true" parallelBuildOn="true" parallelizationNumber="optimal" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.{{opts['id']}}"/>
|
||||
<builder buildPath="${workspace_loc:/{{name}}}/{{opts['name']}}" cleanBuildTarget="mbedclean" id="com.crt.advproject.builder.exe.{{opts['id']}}.{{u.id}}" incrementalBuildTarget="{{opts['ld']['script']}} all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.crt.advproject.builder.exe.{{opts['id']}}"/>
|
||||
|
||||
<tool id="com.crt.advproject.cpp.exe.{{opts['id']}}.{{opts['uid']['tool_cpp_compiler']}}" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.{{opts['id']}}">
|
||||
<option id="com.crt.advproject.cpp.specs.{{u.id}}" name="Specs" superClass="com.crt.advproject.cpp.specs" value="com.crt.advproject.cpp.specs.newlibnano" valueType="enumerated"/>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
|
||||
|
||||
{% if opts['common']['warnings.syntaxonly'] %}
|
||||
<option id="gnu.cpp.compiler.option.warnings.syntax.{{u.id}}" superClass="gnu.cpp.compiler.option.warnings.syntax" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
|
@ -74,14 +74,14 @@
|
|||
{% if opts['common']['warnings.conversion'] %}
|
||||
<option id="gnu.cpp.compiler.option.warnings.wconversion.{{u.id}}" name="Warn on implicit conversions (-Wconversion)" superClass="gnu.cpp.compiler.option.warnings.wconversion" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if opts['common']['optimization.lto'] %}
|
||||
<option id="com.crt.advproject.cpp.lto.{{u.id}}" name="Enable Link-time optimization (-flto)" superClass="com.crt.advproject.cpp.lto" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.lto_objects'] %}
|
||||
<option id="com.crt.advproject.cpp.lto.fat.{{u.id}}" name="Fat lto objects (-ffat-lto-objects)" superClass="com.crt.advproject.cpp.lto.fat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if opts['cpp']['verbose'] %}
|
||||
<option id="gnu.cpp.compiler.option.other.verbose.{{u.id}}" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
|
||||
|
||||
{% if opts['common']['warnings.syntaxonly'] %}
|
||||
<option id="gnu.c.compiler.option.warnings.syntax.{{u.id}}" superClass="gnu.c.compiler.option.warnings.syntax" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
{% if opts['common']['optimization.lto_objects'] %}
|
||||
<option id="com.crt.advproject.gcc.lto.fat.{{u.id}}" name="Fat lto objects (-ffat-lto-objects)" superClass="com.crt.advproject.gcc.lto.fat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<option id="gnu.c.compiler.option.misc.other.{{u.id}}" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c {{opts['c']['other']}} {{opts['common']['warnings.other']}}" valueType="string"/>
|
||||
<inputType id="com.crt.advproject.compiler.input.{{opts['uid']['tool_c_compiler']}}" superClass="com.crt.advproject.compiler.input"/>
|
||||
</tool>
|
||||
|
|
@ -230,13 +230,13 @@
|
|||
{% if opts['ld']['other'] != '' %}
|
||||
<option id="gnu.cpp.link.option.flags.{{u.id}}" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="{{opts['ld']['other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if opts['common']['optimization.lto'] %}
|
||||
<option id="com.crt.advproject.link.cpp.lto.{{u.id}}" superClass="com.crt.advproject.link.cpp.lto" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
<option id="com.crt.advproject.link.cpp.script.{{u.id}}" name="Linker script" superClass="com.crt.advproject.link.cpp.script" useByScannerDiscovery="false" value="${ProjDirPath}/{{opts['ld']['script']}}" valueType="string"/>
|
||||
|
||||
<option id="com.crt.advproject.link.cpp.script.{{u.id}}" name="Linker script" superClass="com.crt.advproject.link.cpp.script" useByScannerDiscovery="false" value="${ProjDirPath}/{{opts['name']}}/{{opts['ld']['script']}}" valueType="string"/>
|
||||
|
||||
<option id="com.crt.advproject.link.cpp.multicore.slave.{{u.id}}" name="Multicore configuration" superClass="com.crt.advproject.link.cpp.multicore.slave" useByScannerDiscovery="false"/>
|
||||
{% if opts['common']['arm.target.fpu.unit_nxp'] %}
|
||||
<option id="com.crt.advproject.link.cpp.fpu.{{u.id}}" name="Floating point" superClass="com.crt.advproject.link.cpp.fpu" useByScannerDiscovery="false" value="com.crt.advproject.link.cpp.fpu.{{opts['common']['arm.target.fpu.unit_nxp']}}" valueType="enumerated"/>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
Title: MCUXpresso exporter.
|
||||
|
||||
Description: Creates a managed build project that can be imported by
|
||||
Description: Creates a managed build project that can be imported by
|
||||
the MCUXpresso IDE from NXP
|
||||
|
||||
Based on GNU ARM Eclipse Exporter from Liviu Ionescu <ilg@livius.net>
|
||||
|
|
@ -34,7 +34,7 @@ from tools.targets import TARGET_MAP
|
|||
from tools.utils import NotSupportedException
|
||||
from tools.build_api import prepare_toolchain
|
||||
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ class MCUXpresso(GNUARMEclipse):
|
|||
opts['ld']['object_files'] = objects
|
||||
opts['ld']['user_libraries'] = self.libraries
|
||||
opts['ld']['system_libraries'] = self.system_libraries
|
||||
opts['ld']['script'] = self.ld_script
|
||||
opts['ld']['script'] = "linker-script-%s.ld" % id
|
||||
opts['cpp_cmd'] = " ".join(toolchain.preproc)
|
||||
|
||||
# Unique IDs used in multiple places.
|
||||
|
|
@ -218,6 +218,8 @@ class MCUXpresso(GNUARMEclipse):
|
|||
'.project', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('mcuxpresso/{0}_cproject.tmpl'.format(target_name), jinja_ctx,
|
||||
'.cproject', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('mcuxpresso/makefile.targets.tmpl', jinja_ctx,
|
||||
'makefile.targets', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('mcuxpresso/mbedignore.tmpl', jinja_ctx, '.mbedignore')
|
||||
|
||||
print
|
||||
|
|
@ -230,9 +232,9 @@ class MCUXpresso(GNUARMEclipse):
|
|||
Headless build an Eclipse project.
|
||||
|
||||
The following steps are performed:
|
||||
- a temporary workspace is created,
|
||||
- a temporary workspace is created,
|
||||
- the project is imported,
|
||||
- a clean build of all configurations is performed and
|
||||
- a clean build of all configurations is performed and
|
||||
- the temporary workspace is removed.
|
||||
|
||||
The build results are in the Debug & Release folders.
|
||||
|
|
@ -326,8 +328,8 @@ class MCUXpresso(GNUARMEclipse):
|
|||
|
||||
Once identified, the options are removed from the command lines.
|
||||
|
||||
The options that were not identified are options that do not
|
||||
have CDT equivalents and will be passed in the 'Other options'
|
||||
The options that were not identified are options that do not
|
||||
have CDT equivalents and will be passed in the 'Other options'
|
||||
categories.
|
||||
|
||||
Although this process does not have a very complicated logic,
|
||||
|
|
@ -470,7 +472,7 @@ class MCUXpresso(GNUARMEclipse):
|
|||
self.remove_option(flags['ld_flags'], str)
|
||||
if opts['common']['arm.target.fpu.abi'] == 'hard':
|
||||
opts['common']['arm.target.fpu.unit_nxp'] += '.hard'
|
||||
|
||||
|
||||
# Default optimisation level for Release.
|
||||
opts['common']['optimization.level'] = '-Os'
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
# DO NOT REMOVE! Generated by the MCUXpresso exporter from an mBed project.
|
||||
|
||||
mbedclean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(C_DEPS)$(CPP_DEPS)
|
||||
$(RM) $(EXECUTABLES) {{name}}.* linker-script-*.ld
|
||||
-@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