Import Mbed OS hard-float snapshot
This commit is contained in:
417
tools/export/gnuarmeclipse/.cproject.tmpl
Normal file
417
tools/export/gnuarmeclipse/.cproject.tmpl
Normal file
@@ -0,0 +1,417 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
<!-- Generated by the GNU ARM Eclipse exporter from an mBed project. -->
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
{% for cfg_key in options %}
|
||||
{% set opts = options[cfg_key] %}
|
||||
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}" moduleId="org.eclipse.cdt.core.settings" name="{{opts['name']}}">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.{{opts['parent_id']}}" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}" name="{{opts['name']}}" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['parent_id']}}">
|
||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}." name="/" resourcePath="">
|
||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.{{opts['id']}}.{{u.id}}" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.{{opts['parent_id']}}">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.{{u.id}}" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.{{opts['common']['arm.target.family']}}" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.arch.{{opts['common']['arm.target.arch']}}" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.{{u.id}}" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.{{opts['common']['arm.target.instructionset']}}" valueType="enumerated"/>
|
||||
{% if opts['common']['arm.target.thumbinterwork'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.thumbinterwork.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.thumbinterwork" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['arm.target.endianness'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.endianness.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.endianness" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.endianness.{{opts['common']['arm.target.endianness']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['arm.target.fpu.abi'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.{{u.id}}" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.{{opts['common']['arm.target.fpu.abi']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['arm.target.fpu.unit'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.{{u.id}}" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.{{opts['common']['arm.target.fpu.unit']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['arm.target.unalignedaccess'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.unalignedaccess.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.unalignedaccess" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.unalignedaccess.{{opts['common']['arm.target.unalignedaccess']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['common']['optimization.level'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.{{u.id}}" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.{{opts['common']['optimization.level']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.messagelength'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.{{u.id}}" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.signedchar'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.{{u.id}}" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.functionsections'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.{{u.id}}" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.datasections'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.{{u.id}}" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.nocommon'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.noinlinefunctions'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.noinlinefunctions.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.noinlinefunctions" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.freestanding'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.nobuiltin'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.spconstant'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.PIC'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.PIC.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.PIC" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.nomoveloopinvariants'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nomoveloopinvariants.{{u.id}}" name="Disable loop invariant move (-fno-move-loop-invariants)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nomoveloopinvariants" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['optimization.other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.other.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.other" value="{{opts['common']['optimization.other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['common']['warnings.syntaxonly'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.syntaxonly.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.syntaxonly" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.pedantic'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedantic.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedantic" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.pedanticerrors'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedanticerrors.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pedanticerrors" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.nowarn'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.unused'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.{{u.id}}" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.uninitialized'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.{{u.id}}" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.allwarn'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.{{u.id}}" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.extrawarn'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.{{u.id}}" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.missingdeclaration'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.{{u.id}}" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.conversion'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.{{u.id}}" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.pointerarith'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.{{u.id}}" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.padded'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.padded.{{u.id}}" name="Warn if padding is included (-Wpadded)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.padded" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.shadow'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.{{u.id}}" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.logicalop'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.{{u.id}}" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.agreggatereturn'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.{{u.id}}" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.floatequal'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.{{u.id}}" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['warnings.toerrors'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['common']['warnings.other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.other.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.other" value="{{opts['common']['warnings.other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['common']['debugging.level'] != 'none' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.{{u.id}}" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.{{opts['common']['debugging.level']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['debugging.format'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.{{u.id}}" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.{{opts['common']['debugging.format']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['debugging.prof'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.prof.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.prof" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['common']['debugging.gprof'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.gprof.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.gprof" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.{{u.id}}" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.{{u.id}}" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.{{u.id}}" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.{{u.id}}" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.{{u.id}}" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.{{u.id}}" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.{{u.id}}" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.{{u.id}}" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.{{u.id}}" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.{{u.id}}" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.{{u.id}}" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.{{u.id}}" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/{{name}}}/BUILD/{{opts['name']}}" cleanBuildTarget="mbedclean" id="ilg.gnuarmeclipse.managedbuild.cross.builder.{{u.id}}" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.{{u.id}}" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
{% if opts['as']['usepreprocessor'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.{{u.id}}" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['as']['nostdinc'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.{{u.id}}" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.{{u.id}}" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
{% for s in opts['as']['defines'] %}
|
||||
<listOptionValue builtIn="false" value="{{s|replace("\"", "\\\"")|escape}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.files.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.files" useByScannerDiscovery="true" valueType="includeFiles">
|
||||
{% for file in opts['common']['include_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
{% if opts['as']['otherwarnings'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.otherwarnings.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.otherwarnings" value="{{opts['as']['otherwarnings']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
{% if opts['as']['verbose'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.verbose.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.verbose" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['as']['other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.{{u.id}}" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value="{{opts['as']['other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.{{opts['uid']['tool_c_compiler']}}" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
{% if opts['c']['nostdinc'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.{{u.id}}" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.{{u.id}}" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
{% for s in opts['c']['defines'] %}
|
||||
<listOptionValue builtIn="false" value="{{s|replace("\"", "\\\"")|escape}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files.{{u.id}}" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files" useByScannerDiscovery="true" valueType="includeFiles">
|
||||
{% for file in opts['common']['include_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
{% if opts['c']['compiler.std'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.{{opts['c']['compiler.std']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['otheroptimizations'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.otheroptimizations.{{u.id}}" name="Other optimization flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.otheroptimizations" useByScannerDiscovery="true" value="{{opts['c']['otheroptimizations']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['warnings.missingprototypes'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.missingprototypes.{{u.id}}" name="Warn if a global function has no prototype (-Wmissing-prototypes)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.missingprototypes" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['warnings.strictprototypes'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.strictprototypes.{{u.id}}" name="Warn if a function has no arg type (-Wstrict-prototypes)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.strictprototypes" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['warnings.badfunctioncast'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.badfunctioncast.{{u.id}}" name="Warn if wrong cast (-Wbad-function-cast)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.warning.badfunctioncast" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['otherwarnings'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.otherwarnings.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.otherwarnings" value="{{opts['c']['otherwarnings']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['verbose'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.verbose.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.verbose" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['c']['other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" value="{{opts['c']['other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.{{opts['uid']['tool_c_compiler_input']}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.{{opts['uid']['tool_cpp_compiler']}}" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||
{% if opts['cpp']['nostdinc'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nostdinc.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nostdinc" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['nostdincpp'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nostdincpp.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nostdincpp" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.{{u.id}}" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.{{u.id}}" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
{% for s in opts['cpp']['defines'] %}
|
||||
<listOptionValue builtIn="false" value="{{s|replace("\"", "\\\"")|escape}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files.{{u.id}}" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files" useByScannerDiscovery="true" valueType="includeFiles">
|
||||
{% for file in opts['common']['include_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
{% if opts['cpp']['compiler.std'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std" value="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.{{opts['cpp']['compiler.std']}}" valueType="enumerated"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['cpp']['optimization.noexceptions'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.{{u.id}}" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['optimization.nortti'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.{{u.id}}" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['optimization.nousecxaatexit'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit.{{u.id}}" name="Do not use _cxa_atexit() (-fno-use-cxa-atexit)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['optimization.nothreadsafestatics'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics.{{u.id}}" name="Do not use thread-safe statics (-fno-threadsafe-statics)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['otheroptimizations'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.otheroptimizations.{{u.id}}" name="Other optimization flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.otheroptimizations" useByScannerDiscovery="true" value="{{opts['cpp']['otheroptimizations']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['cpp']['warnabi'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warnabi.{{u.id}}" name="Warn on ABI violations (-Wabi)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warnabi" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warnings.ctordtorprivacy'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.ctordtorprivacy.{{u.id}}" name="Warn on class privacy (-Wctor-dtor-privacy)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.ctordtorprivacy" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warnings.noexcept'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.noexcept.{{u.id}}" name="Warn on no-except expressions (-Wnoexcept)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.noexcept" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warnings.nonvirtualdtor'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.nonvirtualdtor.{{u.id}}" name="Warn on virtual destructors (-Wnon-virtual-dtor)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.nonvirtualdtor" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warnings.strictnullsentinel'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.strictnullsentinel.{{u.id}}" name="Warn on uncast NULL (-Wstrict-null-sentinel)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.strictnullsentinel" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warnings.signpromo'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.signpromo.{{u.id}}" name="Warn on sign promotion (-Wsign-promo)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warning.signpromo" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['warneffc'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warneffc.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.warneffc" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['otherwarnings'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.otherwarnings.{{u.id}}" name="Other warning flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.otherwarnings" useByScannerDiscovery="true" value="{{opts['cpp']['otherwarnings']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['cpp']['verbose'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.verbose.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.verbose" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['cpp']['other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" value="{{opts['cpp']['other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.{{opts['uid']['tool_cpp_compiler_input']}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.{{u.id}}" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.{{u.id}}" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{opts['ld']['script']}}""/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.{{u.id}}" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" valueType="libPaths">
|
||||
{% for path in opts['ld']['library_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" valueType="libs">
|
||||
{% for lib in opts['ld']['system_libraries'] %}
|
||||
<listOptionValue builtIn="false" value="{{lib}}"/>
|
||||
{% endfor %}
|
||||
{% for lib in opts['ld']['user_libraries'] %}
|
||||
<listOptionValue builtIn="false" value="{{lib}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs" valueType="userObjs">
|
||||
{% for path in opts['ld']['object_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
{% for path in opts['ld']['user_library_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
{% if opts['ld']['gcsections'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.{{u.id}}" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
|
||||
{% if opts['ld']['nostart'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.{{u.id}}" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['ld']['nodeflibs'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
{% if opts['ld']['nostdlibs'] %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" value="true" valueType="boolean"/>
|
||||
{% endif %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.flags.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.flags" valueType="stringList">
|
||||
{% for opt in opts['ld']['flags'] %}
|
||||
<listOptionValue builtIn="false" value="{{opt}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
|
||||
{% if opts['ld']['other'] != '' %}
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="{{opts['ld']['other']}}" valueType="string"/>
|
||||
{% endif %}
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.{{u.id}}" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.{{u.id}}" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.binary" valueType="enumerated"/>
|
||||
</tool>
|
||||
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.{{u.id}}" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.{{u.id}}" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.{{u.id}}" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.{{u.id}}" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.{{u.id}}" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.{{u.id}}" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.{{u.id}}" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.{{u.id}}" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="{{opts['common']['excluded_folders']}}" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
{% endfor %}
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="{{name}}.ilg.gnuarmeclipse.managedbuild.cross.target.elf.{{u.id}}" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
{% for cfg_key in options %}
|
||||
{% set opts = options[cfg_key] %}
|
||||
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}};ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.{{opts['uid']['tool_cpp_compiler']}};ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.{{opts['uid']['tool_cpp_compiler_input']}}">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
{% endfor %}
|
||||
{% for cfg_key in options %}
|
||||
{% set opts = options[cfg_key] %}
|
||||
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}};ilg.gnuarmeclipse.managedbuild.cross.config.elf.{{opts['id']}}.{{opts['uid']['config']}}.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.{{opts['uid']['tool_c_compiler']}};ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.{{opts['uid']['tool_c_compiler_input']}}">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
{% endfor %}
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
28
tools/export/gnuarmeclipse/.project.tmpl
Normal file
28
tools/export/gnuarmeclipse/.project.tmpl
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by the GNU ARM Eclipse exporter from an Arm Mbed project. -->
|
||||
<projectDescription>
|
||||
<name>{{name}}</name>
|
||||
<comment>This file was automagically generated by mbed.org. For more information, see http://mbed.org/handbook/Exporting-To-GNU-ARM-Eclipse</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
488
tools/export/gnuarmeclipse/NOTES.md
Normal file
488
tools/export/gnuarmeclipse/NOTES.md
Normal file
@@ -0,0 +1,488 @@
|
||||
# GNU ARM Eclipse
|
||||
|
||||
The [GNU ARM Eclipse](http://gnuarmeclipse.github.io) is an open source project that includes a family of Eclipse plug-ins and tools for multi-platform embedded ARM development, based on GNU toolchains. The project is hosted on [GitHub](https://github.com/gnuarmeclipse).
|
||||
|
||||
This exporter aims to create managed GNU ARM Eclipse projects, ready to build, and with as many options properly identified and set in the Eclipse C/C++ Build -> Settings page.
|
||||
|
||||
## Build plug-in configuration options
|
||||
|
||||
All options are prefixed by `ilg.gnuarmeclipse.managedbuild.cross.option.`.
|
||||
|
||||
### Target Processor
|
||||
|
||||
- `arm.target.family` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3** '-mcpu=cortex-m3'
|
||||
- cortex-m0 '-mcpu=%s'
|
||||
- cortex-m0-small-multiply '-mcpu=%s'
|
||||
- cortex-m0plus '-mcpu=%s'
|
||||
- cortex-m0plus-small-multiply '-mcpu=%s'
|
||||
- cortex-m1 '-mcpu=%s'
|
||||
- cortex-m1-small-multiply '-mcpu=%s'
|
||||
- cortex-m4 '-mcpu=%s'
|
||||
- cortex-m7 '-mcpu=%s'
|
||||
|
||||
- `arm.target.architecture` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.arch.none** ''
|
||||
- armv6-m '-march=%s'
|
||||
- armv7-m '-march=%s'
|
||||
|
||||
- `arm.target.instructionset` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb** '-mthumb'
|
||||
- arm '-marm'
|
||||
|
||||
- `arm.target.thumbinterwork` bool
|
||||
- true `-mthumb-interwork`
|
||||
|
||||
- `arm.target.endianness` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.endianness.default**
|
||||
- little `-mlittle-endian`
|
||||
- big `-mbig-endian`
|
||||
|
||||
- `arm.target.fpu.abi` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.default**
|
||||
- soft '-mfloat-abi=soft'
|
||||
- softfp '-mfloat-abi=softfp'
|
||||
- hard '-mfloat-abi=hard'
|
||||
|
||||
- `arm.target.fpu.unit` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.default**
|
||||
- fpv4spd16 '-mfpu=fpv4-sp-d16'
|
||||
- fpv5d16 '-mfpu=fpv5-d16'
|
||||
- fpv5spd16 '-mfpu=fpv5-sp-d16'
|
||||
- ...
|
||||
|
||||
- `arm.target.unalignedaccess`
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.unalignedaccess.default**
|
||||
- enabled '-munaligned-access'
|
||||
- disabled '-mno-unaligned-access'
|
||||
|
||||
- `target.other` string
|
||||
|
||||
### Optimization
|
||||
|
||||
- `optimization.level` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more** '-O2'
|
||||
- none '-O0'
|
||||
- optimize '-O1'
|
||||
- most '-O3'
|
||||
- size '-Os'
|
||||
- debug '-Og'
|
||||
|
||||
- `optimization.messagelength` bool
|
||||
- **false** ''
|
||||
- true '-fmessage-length=0'
|
||||
|
||||
- `optimization.signedchar` bool
|
||||
- **false**
|
||||
- true '-fsigned-char'
|
||||
|
||||
- `optimization.functionsections` bool
|
||||
- **false**
|
||||
- true '-ffunction-sections'
|
||||
|
||||
- `optimization.datasections` bool
|
||||
- **false**
|
||||
- true '-fdata-sections'
|
||||
|
||||
- `optimization.nocommon` bool
|
||||
- **false**
|
||||
- true '-fno-common'
|
||||
|
||||
- `optimization.noinlinefunctions` bool
|
||||
- **false** ''
|
||||
- true '-fno-inline-functions'
|
||||
|
||||
- `optimization.freestanding` bool
|
||||
- **false** ''
|
||||
- true '-ffreestanding'
|
||||
|
||||
- `optimization.nobuiltin` bool
|
||||
- **false** ''
|
||||
- true '-fno-builtin'
|
||||
|
||||
- `optimization.spconstant` bool
|
||||
- **false** ''
|
||||
- true '-fsingle-precision-constant'
|
||||
|
||||
- `optimization.PIC` bool
|
||||
- **false** ''
|
||||
- true '-fPIC'
|
||||
|
||||
- `optimization.lto` bool
|
||||
- **false** ''
|
||||
- true '-flto'
|
||||
|
||||
- `optimization.nomoveloopinvariants` bool
|
||||
- **false** ''
|
||||
- true '-fno-move-loop-invariants'
|
||||
|
||||
- `optimization.other` string
|
||||
|
||||
- `` bool
|
||||
- **false** ''
|
||||
- true ''
|
||||
|
||||
### Warnings
|
||||
|
||||
- `warnings.syntaxonly` bool
|
||||
- **false** ''
|
||||
- true '-fsyntax-only'
|
||||
|
||||
- `warnings.pedantic` bool
|
||||
- **false** ''
|
||||
- true '-pedantic'
|
||||
|
||||
- `warnings.pedanticerrors` bool
|
||||
- **false** ''
|
||||
- true '-pedantic-errors'
|
||||
|
||||
- `warnings.nowarn` bool
|
||||
- **false** ''
|
||||
- true '-w'
|
||||
|
||||
- `warnings.unused` bool
|
||||
- **false** ''
|
||||
- true '-Wunused'
|
||||
|
||||
- `warnings.uninitialized` bool
|
||||
- **false** ''
|
||||
- true '-Wuninitialized'
|
||||
|
||||
- `warnings.allwarn` bool
|
||||
- **false** ''
|
||||
- true '-Wall'
|
||||
|
||||
- `warnings.extrawarn` bool
|
||||
- **false** ''
|
||||
- true '-Wextra'
|
||||
|
||||
- `warnings.missingdeclaration` bool
|
||||
- **false** ''
|
||||
- true '-Wmissing-declarations'
|
||||
|
||||
- `warnings.conversion` bool
|
||||
- **false** ''
|
||||
- true '-Wconversion'
|
||||
|
||||
- `warnings.pointerarith` bool
|
||||
- **false** ''
|
||||
- true '-Wpointer-arith'
|
||||
|
||||
- `warnings.padded` bool
|
||||
- **false** ''
|
||||
- true '-Wpadded'
|
||||
|
||||
- `warnings.shadow` bool
|
||||
- **false** ''
|
||||
- true '-Wshadow'
|
||||
|
||||
- `warnings.logicalop` bool
|
||||
- **false** ''
|
||||
- true '-Wlogical-op'
|
||||
|
||||
- `warnings.agreggatereturn` bool
|
||||
- **false** ''
|
||||
- true '-Waggregate-return'
|
||||
|
||||
- `warnings.floatequal` bool
|
||||
- **false** ''
|
||||
- true '-Wfloat-equal'
|
||||
|
||||
- `warnings.toerrors` bool
|
||||
- **false** ''
|
||||
- true '-Werror'
|
||||
|
||||
- `warnings.other` string
|
||||
|
||||
### Debugging
|
||||
|
||||
- `debugging.level` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.default** '-g'
|
||||
- none ''
|
||||
- minimal '-g1'
|
||||
- max '-g3'
|
||||
|
||||
- `debugging.format` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.default** ''
|
||||
- gdb '-ggdb'
|
||||
- stabs '-gstabs'
|
||||
- stabsplus '-gstabs+'
|
||||
- dwarf2 '-gdwarf-2'
|
||||
- dwarf3 '-gdwarf-3'
|
||||
- dwarf4 '-gdwarf-4'
|
||||
- dwarf5 '-gdwarf-5'
|
||||
|
||||
- `debugging.prof` bool
|
||||
- **false** ''
|
||||
- true '-p'
|
||||
|
||||
- `debugging.gprof` bool
|
||||
- **false** ''
|
||||
- true '-pg'
|
||||
|
||||
- `debugging.other` string
|
||||
|
||||
|
||||
### Compiler common options
|
||||
|
||||
- `verbose` bool
|
||||
- **false** ''
|
||||
- true '-v'
|
||||
|
||||
- `savetemps` bool
|
||||
- **false** ''
|
||||
- true '--save-temps'
|
||||
|
||||
- `nostdinc` bool
|
||||
- **false** ''
|
||||
- true '-nostdinc'
|
||||
|
||||
- `asmlisting` bool
|
||||
- **false** ''
|
||||
- true '-Wa,-adhlns="$@.lst"'
|
||||
|
||||
- `preprocessor.preprocessonly` bool
|
||||
- **false** ''
|
||||
- true '-E'
|
||||
|
||||
- `dirs.include.files`
|
||||
- '-include%s'
|
||||
|
||||
- `compiler.other` string
|
||||
|
||||
### Linker common options
|
||||
|
||||
- `mapfilename` string
|
||||
- '-Wl,-Map,"${BuildArtifactFileBaseName}.map"'
|
||||
|
||||
- `linker.scriptfile`
|
||||
- '-T %s'
|
||||
|
||||
- `cref` bool
|
||||
- **false** ''
|
||||
- true '-Xlinker --cref'
|
||||
|
||||
- `printmap` bool
|
||||
- **false** ''
|
||||
- true '-Xlinker --print-map'
|
||||
|
||||
- `linker.nostart` bool
|
||||
- **false** ''
|
||||
- true '-nostartfiles'
|
||||
|
||||
- `linker.nodeflibs` bool
|
||||
- **false** ''
|
||||
- true '-nodefaultlibs'
|
||||
|
||||
- `linker.nostdlibs` bool
|
||||
- **false** ''
|
||||
- true '-nostdlib'
|
||||
|
||||
- `linker.gcsections` bool
|
||||
- **false** ''
|
||||
- true '-Xlinker --gc-sections'
|
||||
|
||||
- `linker.printgcsections` bool
|
||||
- **false** ''
|
||||
- true '-Xlinker --print-gc-sections'
|
||||
|
||||
- `linker.strip` bool
|
||||
- **false** ''
|
||||
- true '-s'
|
||||
|
||||
- `linker.other` string
|
||||
|
||||
- `linker.usenewlibnano` bool
|
||||
- **false** ''
|
||||
- true '--specs=nano.specs'
|
||||
|
||||
- `linker.useprintffloat` bool
|
||||
- **false** ''
|
||||
- true '-u \_printf\_float'
|
||||
|
||||
- `linker.usescanffloat` bool
|
||||
- **false** ''
|
||||
- true '-u \_scanf\_float'
|
||||
|
||||
|
||||
### Cross ARM GNU Assembler
|
||||
|
||||
#### Preprocessor
|
||||
|
||||
- `nostdinc` bool
|
||||
- **false** ''
|
||||
- true '-nostdinc'
|
||||
|
||||
#### Includes
|
||||
|
||||
#### Warnings
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- `verbose` bool
|
||||
- **false** ''
|
||||
- true '-v'
|
||||
|
||||
- `assembler.other` string
|
||||
|
||||
### Cross ARM GNU C Compiler
|
||||
|
||||
#### Preprocessor
|
||||
|
||||
- `nostdinc` bool
|
||||
- **false** ''
|
||||
- true '-nostdinc'
|
||||
|
||||
#### Includes
|
||||
|
||||
#### Optimization
|
||||
|
||||
- `c.compiler.std` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.default** ''
|
||||
- ansi '-ansi'
|
||||
- c90 '-std=c90' (c89)
|
||||
- gnu90 '-std=gnu90' (gnu89)
|
||||
- c99 '-std=c99' (c9x)
|
||||
- gnu99 '-std=gnu99' (gnu9x)
|
||||
- c11 '-std=c11' (c1x)
|
||||
- gnu11 '-std=gnu11' (gnu1x)
|
||||
|
||||
#### Warnings
|
||||
|
||||
- `c.compiler.warning.missingprototypes` bool
|
||||
- **false** ''
|
||||
- true '-Wmissing-prototypes'
|
||||
|
||||
- `c.compiler.warning.strictprototypes` bool
|
||||
- **false** ''
|
||||
- true '-Wstrict-prototypes'
|
||||
|
||||
- `c.compiler.warning.badfunctioncast` bool
|
||||
- **false** ''
|
||||
- true '-Wbad-function-cast'
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- `verbose` bool
|
||||
- **false** ''
|
||||
- true '-v'
|
||||
|
||||
- `c.compiler.other` string
|
||||
|
||||
### Cross ARM GNU C++ Compiler
|
||||
|
||||
#### Preprocessor
|
||||
|
||||
- `nostdinc` bool
|
||||
- **false** ''
|
||||
- true '-nostdinc'
|
||||
|
||||
- `nostdincpp` bool
|
||||
- **false** ''
|
||||
- true '-nostdinc++'
|
||||
|
||||
#### Includes
|
||||
|
||||
#### Optimization
|
||||
|
||||
- `cpp.compiler.std` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.default** ''
|
||||
- ansi (-ansi)
|
||||
- cpp98 '-std=c++98' (c++03)
|
||||
- gnucpp98 '-std=gnu++98' (gnu++03)
|
||||
- cpp0x '-std=c++0x'
|
||||
- gnucpp0x '-std=gnu++0x'
|
||||
- cpp11 '-std=c++11'
|
||||
- gnucpp11 '-std=gnu++11'
|
||||
- cpp1y '-std=c++1y'
|
||||
- gnucpp1y '-std=gnu++1y'
|
||||
- cpp14 '-std=c++14'
|
||||
- gnucpp1 4'-std=gnu++14'
|
||||
- cpp1z '-std=c++1z'
|
||||
- gnucpp1z '-std=gnu++1z'
|
||||
|
||||
- `cpp.compiler.abiversion` enumerated
|
||||
- **ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.abiversion.0** '-fabi-version=0'
|
||||
- default ''
|
||||
- 1 '-fabi-version=1'
|
||||
- 2 '-fabi-version=2'
|
||||
- 3 '-fabi-version=3'
|
||||
- 4 '-fabi-version=4'
|
||||
- 5 '-fabi-version=5'
|
||||
- 6 '-fabi-version=6'
|
||||
|
||||
- `cpp.compiler.noexceptions` bool
|
||||
- **false** ''
|
||||
- true '-fno-exceptions'
|
||||
|
||||
- `cpp.compiler.nortti` bool
|
||||
- **false** ''
|
||||
- true '-fno-rtti'
|
||||
|
||||
- `cpp.compiler.nousecxaatexit` bool
|
||||
- **false** ''
|
||||
- true '-fno-use-cxa-atexit'
|
||||
|
||||
- `cpp.compiler.nothreadsafestatics` bool
|
||||
- **false** ''
|
||||
- true '-fno-threadsafe-statics'
|
||||
|
||||
|
||||
#### Warnings
|
||||
|
||||
- `cpp.compiler.warnabi` bool
|
||||
- **false** '-Wabi'
|
||||
|
||||
- `cpp.compiler.warning.ctordtorprivacy` bool
|
||||
- **false** '-Wctor-dtor-privacy'
|
||||
|
||||
- `cpp.compiler.warning.noexcept` bool
|
||||
- **false** '-Wnoexcept'
|
||||
|
||||
- `cpp.compiler.warning.nonvirtualdtor` bool
|
||||
- **false** '-Wnon-virtual-dtor'
|
||||
|
||||
- `cpp.compiler.warning.strictnullsentinel` bool
|
||||
- **false** '-Wstrict-null-sentinel'
|
||||
|
||||
- `cpp.compiler.warning.signpromo` bool
|
||||
- **false** '-Wsign-promo'
|
||||
|
||||
- `cpp.compiler.warneffc` bool
|
||||
- **false** ''
|
||||
- true '-Weffc++'
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- `verbose` bool
|
||||
- **false** ''
|
||||
- true '-v'
|
||||
|
||||
- `cpp.compiler.other` string
|
||||
|
||||
### Cross ARM GNU C++ Linker
|
||||
|
||||
#### General
|
||||
|
||||
- `cpp.linker.nostart`
|
||||
- **false** ''
|
||||
- true '-nostartfiles'
|
||||
|
||||
- `cpp.linker.nodeflibs`
|
||||
- **false** ''
|
||||
- true '-nodefaultlibs'
|
||||
|
||||
- `cpp.linker.nostdlibs`
|
||||
- **false** ''
|
||||
- true '-nostdlib'
|
||||
|
||||
#### Libraries
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
|
||||
## Template
|
||||
|
||||
- `` bool
|
||||
- **false** ''
|
||||
- true ''
|
||||
869
tools/export/gnuarmeclipse/__init__.py
Normal file
869
tools/export/gnuarmeclipse/__init__.py
Normal file
@@ -0,0 +1,869 @@
|
||||
"""
|
||||
mbed SDK
|
||||
Copyright (c) 2011-2017 ARM Limited
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Title: GNU ARM Eclipse (http://gnuarmeclipse.github.io) exporter.
|
||||
|
||||
Description: Creates a managed build project that can be imported by
|
||||
the GNU ARM Eclipse plug-ins.
|
||||
|
||||
Author: Liviu Ionescu <ilg@livius.net>
|
||||
"""
|
||||
from __future__ import print_function, absolute_import
|
||||
from builtins import str
|
||||
|
||||
import os
|
||||
import copy
|
||||
import tempfile
|
||||
import shutil
|
||||
import copy
|
||||
|
||||
from subprocess import call, Popen, PIPE
|
||||
from os.path import splitext, basename, relpath, dirname, exists, join, dirname
|
||||
from random import randint
|
||||
from json import load
|
||||
|
||||
from tools.export.exporters import Exporter, apply_supported_whitelist
|
||||
from tools.options import list_profiles
|
||||
from tools.targets import TARGET_MAP
|
||||
from tools.utils import NotSupportedException
|
||||
from tools.build_api import prepare_toolchain
|
||||
|
||||
# =============================================================================
|
||||
|
||||
|
||||
class UID:
|
||||
"""
|
||||
Helper class, used to generate unique ids required by .cproject symbols.
|
||||
"""
|
||||
@property
|
||||
def id(self):
|
||||
return "%0.9u" % randint(0, 999999999)
|
||||
|
||||
# Global UID generator instance.
|
||||
# Passed to the template engine, and referred as {{u.id}}.
|
||||
# Each invocation generates a new number.
|
||||
u = UID()
|
||||
|
||||
# =============================================================================
|
||||
|
||||
|
||||
POST_BINARY_WHITELIST = set([
|
||||
"LPCTargetCode.lpc_patch",
|
||||
"PSOC6Code.complete"
|
||||
])
|
||||
|
||||
class GNUARMEclipse(Exporter):
|
||||
NAME = 'GNU ARM Eclipse'
|
||||
TOOLCHAIN = 'GCC_ARM'
|
||||
|
||||
@classmethod
|
||||
def is_target_supported(cls, target_name):
|
||||
target = TARGET_MAP[target_name]
|
||||
return apply_supported_whitelist(
|
||||
cls.TOOLCHAIN, POST_BINARY_WHITELIST, target)
|
||||
|
||||
def validate_resources(self):
|
||||
if not self.resources.linker_script:
|
||||
raise NotSupportedException("No linker script found.")
|
||||
|
||||
def create_jinja_ctx(self):
|
||||
|
||||
self.validate_resources()
|
||||
|
||||
self.resources.win_to_unix()
|
||||
|
||||
# TODO: use some logger to display additional info if verbose
|
||||
|
||||
libraries = []
|
||||
library_files = []
|
||||
for lib in self.libraries:
|
||||
library_files.append(self.filter_dot(lib))
|
||||
l, _ = splitext(basename(lib))
|
||||
libraries.append(l[3:])
|
||||
|
||||
self.system_libraries = [
|
||||
'stdc++', 'supc++', 'm', 'c', 'gcc', 'nosys'
|
||||
]
|
||||
|
||||
# Read in all profiles, we'll extract compiler options.
|
||||
profiles = self.get_all_profiles()
|
||||
|
||||
profile_ids = [s.lower() for s in profiles]
|
||||
profile_ids.sort()
|
||||
|
||||
# TODO: get the list from existing .cproject
|
||||
build_folders = [s.capitalize() for s in profile_ids]
|
||||
build_folders.append('BUILD')
|
||||
|
||||
objects = [self.filter_dot(s) for s in self.resources.objects]
|
||||
for bf in build_folders:
|
||||
objects = [o for o in objects if not o.startswith(bf + '/')]
|
||||
|
||||
self.compute_exclusions()
|
||||
|
||||
self.include_path = [
|
||||
self.filter_dot(s) for s in self.resources.inc_dirs]
|
||||
|
||||
self.as_defines = self.toolchain.get_symbols(True)
|
||||
self.c_defines = self.toolchain.get_symbols()
|
||||
self.cpp_defines = self.c_defines
|
||||
|
||||
self.ld_script = self.filter_dot(
|
||||
self.resources.linker_script)
|
||||
|
||||
self.options = {}
|
||||
for id in profile_ids:
|
||||
|
||||
# There are 4 categories of options, a category common too
|
||||
# all tools and a specific category for each of the tools.
|
||||
opts = {}
|
||||
opts['common'] = {}
|
||||
opts['as'] = {}
|
||||
opts['c'] = {}
|
||||
opts['cpp'] = {}
|
||||
opts['ld'] = {}
|
||||
|
||||
opts['id'] = id
|
||||
opts['name'] = opts['id'].capitalize()
|
||||
|
||||
|
||||
profile = profiles[id]
|
||||
|
||||
# A small hack, do not bother with src_path again,
|
||||
# pass an empty string to avoid crashing.
|
||||
src_paths = ['']
|
||||
target_name = self.toolchain.target.name
|
||||
toolchain = prepare_toolchain(
|
||||
src_paths, "", target_name, self.TOOLCHAIN, build_profile=[profile])
|
||||
|
||||
# Hack to fill in build_dir
|
||||
toolchain.build_dir = self.toolchain.build_dir
|
||||
toolchain.config = self.toolchain.config
|
||||
toolchain.set_config_data(self.toolchain.config.get_config_data())
|
||||
|
||||
flags = self.toolchain_flags(toolchain)
|
||||
|
||||
# Most GNU ARM Eclipse options have a parent,
|
||||
# either debug or release.
|
||||
if '-O0' in flags['common_flags'] or '-Og' in flags['common_flags']:
|
||||
opts['parent_id'] = 'debug'
|
||||
else:
|
||||
opts['parent_id'] = 'release'
|
||||
|
||||
self.process_options(opts, flags)
|
||||
|
||||
opts['as']['defines'] = self.as_defines
|
||||
opts['c']['defines'] = self.c_defines
|
||||
opts['cpp']['defines'] = self.cpp_defines
|
||||
|
||||
opts['common']['include_paths'] = self.include_path
|
||||
opts['common']['excluded_folders'] = '|'.join(
|
||||
self.excluded_folders)
|
||||
|
||||
opts['ld']['library_paths'] = [
|
||||
self.filter_dot(s) for s in self.resources.lib_dirs]
|
||||
|
||||
opts['ld']['object_files'] = objects
|
||||
opts['ld']['user_libraries'] = libraries
|
||||
opts['ld']['user_library_files'] = library_files
|
||||
opts['ld']['system_libraries'] = self.system_libraries
|
||||
opts['ld']['script'] = join(id.capitalize(),
|
||||
"linker-script-%s.ld" % id)
|
||||
opts['cpp_cmd'] = '"{}"'.format(toolchain.preproc[0]) + " " + " ".join(toolchain.preproc[1:])
|
||||
|
||||
# Unique IDs used in multiple places.
|
||||
# Those used only once are implemented with {{u.id}}.
|
||||
uid = {}
|
||||
uid['config'] = u.id
|
||||
uid['tool_c_compiler'] = u.id
|
||||
uid['tool_c_compiler_input'] = u.id
|
||||
uid['tool_cpp_compiler'] = u.id
|
||||
uid['tool_cpp_compiler_input'] = u.id
|
||||
|
||||
opts['uid'] = uid
|
||||
|
||||
self.options[id] = opts
|
||||
|
||||
jinja_ctx = {
|
||||
'name': self.project_name,
|
||||
'ld_script': self.ld_script,
|
||||
|
||||
# Compiler & linker command line options
|
||||
'options': self.options,
|
||||
|
||||
# Must be an object with an `id` property, which
|
||||
# will be called repeatedly, to generate multiple UIDs.
|
||||
'u': u,
|
||||
}
|
||||
return jinja_ctx
|
||||
|
||||
# override
|
||||
def generate(self):
|
||||
"""
|
||||
Generate the .project and .cproject files.
|
||||
"""
|
||||
jinja_ctx = self.create_jinja_ctx()
|
||||
|
||||
|
||||
self.gen_file('gnuarmeclipse/.project.tmpl', jinja_ctx,
|
||||
'.project', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('gnuarmeclipse/.cproject.tmpl', jinja_ctx,
|
||||
'.cproject', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx,
|
||||
'makefile.targets', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file_nonoverwrite('gnuarmeclipse/mbedignore.tmpl', jinja_ctx,
|
||||
'.mbedignore')
|
||||
|
||||
print('Done. Import the \'{0}\' project in Eclipse.'.format(self.project_name))
|
||||
|
||||
@staticmethod
|
||||
def clean(_):
|
||||
os.remove('.project')
|
||||
os.remove('.cproject')
|
||||
if exists('Debug'):
|
||||
shutil.rmtree('Debug')
|
||||
if exists('Release'):
|
||||
shutil.rmtree('Release')
|
||||
if exists('makefile.targets'):
|
||||
os.remove('makefile.targets')
|
||||
|
||||
# override
|
||||
@staticmethod
|
||||
def build(project_name, log_name="build_log.txt", cleanup=True):
|
||||
"""
|
||||
Headless build an Eclipse project.
|
||||
|
||||
The following steps are performed:
|
||||
- a temporary workspace is created,
|
||||
- the project is imported,
|
||||
- a clean build of all configurations is performed and
|
||||
- the temporary workspace is removed.
|
||||
|
||||
The build results are in the Debug & Release folders.
|
||||
|
||||
All executables (eclipse & toolchain) must be in the PATH.
|
||||
|
||||
The general method to start a headless Eclipse build is:
|
||||
|
||||
$ eclipse \
|
||||
--launcher.suppressErrors \
|
||||
-nosplash \
|
||||
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
|
||||
-data /path/to/workspace \
|
||||
-import /path/to/project \
|
||||
-cleanBuild "project[/configuration] | all"
|
||||
"""
|
||||
|
||||
# TODO: possibly use the log file.
|
||||
|
||||
# Create a temporary folder for the workspace.
|
||||
tmp_folder = tempfile.mkdtemp()
|
||||
|
||||
cmd = [
|
||||
'eclipse',
|
||||
'--launcher.suppressErrors',
|
||||
'-nosplash',
|
||||
'-application org.eclipse.cdt.managedbuilder.core.headlessbuild',
|
||||
'-data', tmp_folder,
|
||||
'-import', os.getcwd(),
|
||||
'-cleanBuild', project_name
|
||||
]
|
||||
|
||||
p = Popen(' '.join(cmd), shell=True, stdout=PIPE, stderr=PIPE)
|
||||
out, err = p.communicate()
|
||||
ret_code = p.returncode
|
||||
stdout_string = "=" * 10 + "STDOUT" + "=" * 10 + "\n"
|
||||
err_string = "=" * 10 + "STDERR" + "=" * 10 + "\n"
|
||||
err_string += err
|
||||
|
||||
ret_string = "SUCCESS\n"
|
||||
if ret_code != 0:
|
||||
ret_string += "FAILURE\n"
|
||||
|
||||
print("%s\n%s\n%s\n%s" % (stdout_string, out, err_string, ret_string))
|
||||
|
||||
if log_name:
|
||||
# Write the output to the log file
|
||||
with open(log_name, 'w+') as f:
|
||||
f.write(stdout_string)
|
||||
f.write(out)
|
||||
f.write(err_string)
|
||||
f.write(ret_string)
|
||||
|
||||
# Cleanup the exported and built files
|
||||
if cleanup:
|
||||
if exists(log_name):
|
||||
os.remove(log_name)
|
||||
|
||||
# Always remove the temporary folder.
|
||||
if exists(tmp_folder):
|
||||
shutil.rmtree(tmp_folder)
|
||||
|
||||
if ret_code == 0:
|
||||
# Return Success
|
||||
return 0
|
||||
|
||||
# Seems like something went wrong.
|
||||
return -1
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@staticmethod
|
||||
def get_all_profiles():
|
||||
tools_path = dirname(dirname(dirname(__file__)))
|
||||
file_names = [join(tools_path, "profiles", fn) for fn in os.listdir(
|
||||
join(tools_path, "profiles")) if fn.endswith(".json")]
|
||||
|
||||
|
||||
profile_names = [basename(fn).replace(".json", "")
|
||||
for fn in file_names]
|
||||
|
||||
profiles = {}
|
||||
|
||||
for fn in file_names:
|
||||
content = load(open(fn))
|
||||
profile_name = basename(fn).replace(".json", "")
|
||||
profiles[profile_name] = content
|
||||
|
||||
return profiles
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Process source files/folders exclusions.
|
||||
|
||||
def compute_exclusions(self):
|
||||
"""
|
||||
With the project root as the only source folder known to CDT,
|
||||
based on the list of source files, compute the folders to not
|
||||
be included in the build.
|
||||
|
||||
The steps are:
|
||||
- get the list of source folders, as dirname(source_file)
|
||||
- compute the top folders (subfolders of the project folder)
|
||||
- iterate all subfolders and add them to a tree, with all
|
||||
nodes markes as 'not used'
|
||||
- iterate the source folders and mark them as 'used' in the
|
||||
tree, including all intermediate nodes
|
||||
- recurse the tree and collect all unused folders; descend
|
||||
the hierarchy only for used nodes
|
||||
"""
|
||||
self.excluded_folders = set(self.resources.ignored_dirs) - set(self.resources.inc_dirs)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def dump_tree(self, nodes, depth=0):
|
||||
for k in list(nodes):
|
||||
node = nodes[k]
|
||||
parent_name = node['parent'][
|
||||
'name'] if 'parent' in list(node) else ''
|
||||
if len(node['children'].keys()) != 0:
|
||||
self.dump_tree(node['children'], depth + 1)
|
||||
|
||||
def dump_paths(self, nodes, depth=0):
|
||||
for k in list(nodes):
|
||||
node = nodes[k]
|
||||
parts = []
|
||||
while True:
|
||||
parts.insert(0, node['name'])
|
||||
if 'parent' not in node:
|
||||
break
|
||||
node = node['parent']
|
||||
path = '/'.join(parts)
|
||||
self.dump_paths(nodes[k]['children'], depth + 1)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def process_options(self, opts, flags_in):
|
||||
"""
|
||||
CDT managed projects store lots of build options in separate
|
||||
variables, with separate IDs in the .cproject file.
|
||||
When the CDT build is started, all these options are brought
|
||||
together to compose the compiler and linker command lines.
|
||||
|
||||
Here the process is reversed, from the compiler and linker
|
||||
command lines, the options are identified and various flags are
|
||||
set to control the template generation process.
|
||||
|
||||
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'
|
||||
categories.
|
||||
|
||||
Although this process does not have a very complicated logic,
|
||||
given the large number of explicit configuration options
|
||||
used by the GNU ARM Eclipse managed build plug-in, it is tedious...
|
||||
"""
|
||||
|
||||
# Make a copy of the flags, to be one by one removed after processing.
|
||||
flags = copy.deepcopy(flags_in)
|
||||
|
||||
# Initialise the 'last resort' options where all unrecognised
|
||||
# options will be collected.
|
||||
opts['as']['other'] = ''
|
||||
opts['c']['other'] = ''
|
||||
opts['cpp']['other'] = ''
|
||||
opts['ld']['other'] = ''
|
||||
|
||||
MCPUS = {
|
||||
'Cortex-M0': {'mcpu': 'cortex-m0', 'fpu_unit': None},
|
||||
'Cortex-M0+': {'mcpu': 'cortex-m0plus', 'fpu_unit': None},
|
||||
'Cortex-M1': {'mcpu': 'cortex-m1', 'fpu_unit': None},
|
||||
'Cortex-M3': {'mcpu': 'cortex-m3', 'fpu_unit': None},
|
||||
'Cortex-M4': {'mcpu': 'cortex-m4', 'fpu_unit': None},
|
||||
'Cortex-M4F': {'mcpu': 'cortex-m4', 'fpu_unit': 'fpv4spd16'},
|
||||
'Cortex-M7': {'mcpu': 'cortex-m7', 'fpu_unit': None},
|
||||
'Cortex-M7F': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv4spd16'},
|
||||
'Cortex-M7FD': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv5d16'},
|
||||
'Cortex-A9': {'mcpu': 'cortex-a9', 'fpu_unit': 'vfpv3'}
|
||||
}
|
||||
|
||||
# Remove options that are supplied by CDT
|
||||
self.remove_option(flags['common_flags'], '-c')
|
||||
self.remove_option(flags['common_flags'], '-MMD')
|
||||
|
||||
# As 'plan B', get the CPU from the target definition.
|
||||
core = self.toolchain.target.core
|
||||
|
||||
opts['common']['arm.target.family'] = None
|
||||
|
||||
# cortex-m0, cortex-m0-small-multiply, cortex-m0plus,
|
||||
# cortex-m0plus-small-multiply, cortex-m1, cortex-m1-small-multiply,
|
||||
# cortex-m3, cortex-m4, cortex-m7.
|
||||
str = self.find_options(flags['common_flags'], '-mcpu=')
|
||||
if str != None:
|
||||
opts['common']['arm.target.family'] = str[len('-mcpu='):]
|
||||
self.remove_option(flags['common_flags'], str)
|
||||
self.remove_option(flags['ld_flags'], str)
|
||||
else:
|
||||
if core not in MCPUS:
|
||||
raise NotSupportedException(
|
||||
'Target core {0} not supported.'.format(core))
|
||||
opts['common']['arm.target.family'] = MCPUS[core]['mcpu']
|
||||
|
||||
opts['common']['arm.target.arch'] = 'none'
|
||||
str = self.find_options(flags['common_flags'], '-march=')
|
||||
arch = str[len('-march='):]
|
||||
archs = {'armv6-m': 'armv6-m', 'armv7-m': 'armv7-m', 'armv7-a': 'armv7-a'}
|
||||
if arch in archs:
|
||||
opts['common']['arm.target.arch'] = archs[arch]
|
||||
self.remove_option(flags['common_flags'], str)
|
||||
|
||||
opts['common']['arm.target.instructionset'] = 'thumb'
|
||||
if '-mthumb' in flags['common_flags']:
|
||||
self.remove_option(flags['common_flags'], '-mthumb')
|
||||
self.remove_option(flags['ld_flags'], '-mthumb')
|
||||
elif '-marm' in flags['common_flags']:
|
||||
opts['common']['arm.target.instructionset'] = 'arm'
|
||||
self.remove_option(flags['common_flags'], '-marm')
|
||||
self.remove_option(flags['ld_flags'], '-marm')
|
||||
|
||||
opts['common']['arm.target.thumbinterwork'] = False
|
||||
if '-mthumb-interwork' in flags['common_flags']:
|
||||
opts['common']['arm.target.thumbinterwork'] = True
|
||||
self.remove_option(flags['common_flags'], '-mthumb-interwork')
|
||||
|
||||
opts['common']['arm.target.endianness'] = None
|
||||
if '-mlittle-endian' in flags['common_flags']:
|
||||
opts['common']['arm.target.endianness'] = 'little'
|
||||
self.remove_option(flags['common_flags'], '-mlittle-endian')
|
||||
elif '-mbig-endian' in flags['common_flags']:
|
||||
opts['common']['arm.target.endianness'] = 'big'
|
||||
self.remove_option(flags['common_flags'], '-mbig-endian')
|
||||
|
||||
opts['common']['arm.target.fpu.unit'] = None
|
||||
# default, fpv4spd16, fpv5d16, fpv5spd16
|
||||
str = self.find_options(flags['common_flags'], '-mfpu=')
|
||||
if str != None:
|
||||
fpu = str[len('-mfpu='):]
|
||||
fpus = {
|
||||
'fpv4-sp-d16': 'fpv4spd16',
|
||||
'fpv5-d16': 'fpv5d16',
|
||||
'fpv5-sp-d16': 'fpv5spd16'
|
||||
}
|
||||
if fpu in fpus:
|
||||
opts['common']['arm.target.fpu.unit'] = fpus[fpu]
|
||||
|
||||
self.remove_option(flags['common_flags'], str)
|
||||
self.remove_option(flags['ld_flags'], str)
|
||||
if opts['common']['arm.target.fpu.unit'] == None:
|
||||
if core not in MCPUS:
|
||||
raise NotSupportedException(
|
||||
'Target core {0} not supported.'.format(core))
|
||||
if MCPUS[core]['fpu_unit']:
|
||||
opts['common'][
|
||||
'arm.target.fpu.unit'] = MCPUS[core]['fpu_unit']
|
||||
|
||||
# soft, softfp, hard.
|
||||
str = self.find_options(flags['common_flags'], '-mfloat-abi=')
|
||||
if str != None:
|
||||
opts['common']['arm.target.fpu.abi'] = str[
|
||||
len('-mfloat-abi='):]
|
||||
self.remove_option(flags['common_flags'], str)
|
||||
self.remove_option(flags['ld_flags'], str)
|
||||
|
||||
opts['common']['arm.target.unalignedaccess'] = None
|
||||
if '-munaligned-access' in flags['common_flags']:
|
||||
opts['common']['arm.target.unalignedaccess'] = 'enabled'
|
||||
self.remove_option(flags['common_flags'], '-munaligned-access')
|
||||
elif '-mno-unaligned-access' in flags['common_flags']:
|
||||
opts['common']['arm.target.unalignedaccess'] = 'disabled'
|
||||
self.remove_option(flags['common_flags'], '-mno-unaligned-access')
|
||||
|
||||
# Default optimisation level for Release.
|
||||
opts['common']['optimization.level'] = '-Os'
|
||||
|
||||
# If the project defines an optimisation level, it is used
|
||||
# only for the Release configuration, the Debug one used '-Og'.
|
||||
str = self.find_options(flags['common_flags'], '-O')
|
||||
if str != None:
|
||||
levels = {
|
||||
'-O0': 'none', '-O1': 'optimize', '-O2': 'more',
|
||||
'-O3': 'most', '-Os': 'size', '-Og': 'debug'
|
||||
}
|
||||
if str in levels:
|
||||
opts['common']['optimization.level'] = levels[str]
|
||||
self.remove_option(flags['common_flags'], str)
|
||||
|
||||
include_files = []
|
||||
for all_flags in [flags['common_flags'], flags['c_flags'], flags['cxx_flags']]:
|
||||
while '-include' in all_flags:
|
||||
ix = all_flags.index('-include')
|
||||
str = all_flags[ix + 1]
|
||||
if str not in include_files:
|
||||
include_files.append(str)
|
||||
self.remove_option(all_flags, '-include')
|
||||
self.remove_option(all_flags, str)
|
||||
|
||||
opts['common']['include_files'] = include_files
|
||||
|
||||
if '-ansi' in flags['c_flags']:
|
||||
opts['c']['compiler.std'] = '-ansi'
|
||||
self.remove_option(flags['c_flags'], str)
|
||||
else:
|
||||
str = self.find_options(flags['c_flags'], '-std')
|
||||
std = str[len('-std='):]
|
||||
c_std = {
|
||||
'c90': 'c90', 'c89': 'c90', 'gnu90': 'gnu90', 'gnu89': 'gnu90',
|
||||
'c99': 'c99', 'c9x': 'c99', 'gnu99': 'gnu99', 'gnu9x': 'gnu98',
|
||||
'c11': 'c11', 'c1x': 'c11', 'gnu11': 'gnu11', 'gnu1x': 'gnu11'
|
||||
}
|
||||
if std in c_std:
|
||||
opts['c']['compiler.std'] = c_std[std]
|
||||
self.remove_option(flags['c_flags'], str)
|
||||
|
||||
if '-ansi' in flags['cxx_flags']:
|
||||
opts['cpp']['compiler.std'] = '-ansi'
|
||||
self.remove_option(flags['cxx_flags'], str)
|
||||
else:
|
||||
str = self.find_options(flags['cxx_flags'], '-std')
|
||||
std = str[len('-std='):]
|
||||
cpp_std = {
|
||||
'c++98': 'cpp98', 'c++03': 'cpp98',
|
||||
'gnu++98': 'gnucpp98', 'gnu++03': 'gnucpp98',
|
||||
'c++0x': 'cpp0x', 'gnu++0x': 'gnucpp0x',
|
||||
'c++11': 'cpp11', 'gnu++11': 'gnucpp11',
|
||||
'c++1y': 'cpp1y', 'gnu++1y': 'gnucpp1y',
|
||||
'c++14': 'cpp14', 'gnu++14': 'gnucpp14',
|
||||
'c++1z': 'cpp1z', 'gnu++1z': 'gnucpp1z',
|
||||
}
|
||||
if std in cpp_std:
|
||||
opts['cpp']['compiler.std'] = cpp_std[std]
|
||||
self.remove_option(flags['cxx_flags'], str)
|
||||
|
||||
# Common optimisation options.
|
||||
optimization_options = {
|
||||
'-fmessage-length=0': 'optimization.messagelength',
|
||||
'-fsigned-char': 'optimization.signedchar',
|
||||
'-ffunction-sections': 'optimization.functionsections',
|
||||
'-fdata-sections': 'optimization.datasections',
|
||||
'-fno-common': 'optimization.nocommon',
|
||||
'-fno-inline-functions': 'optimization.noinlinefunctions',
|
||||
'-ffreestanding': 'optimization.freestanding',
|
||||
'-fno-builtin': 'optimization.nobuiltin',
|
||||
'-fsingle-precision-constant': 'optimization.spconstant',
|
||||
'-fPIC': 'optimization.PIC',
|
||||
'-fno-move-loop-invariants': 'optimization.nomoveloopinvariants',
|
||||
}
|
||||
|
||||
for option in optimization_options:
|
||||
opts['common'][optimization_options[option]] = False
|
||||
if option in flags['common_flags']:
|
||||
opts['common'][optimization_options[option]] = True
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
# Common warning options.
|
||||
warning_options = {
|
||||
'-fsyntax-only': 'warnings.syntaxonly',
|
||||
'-pedantic': 'warnings.pedantic',
|
||||
'-pedantic-errors': 'warnings.pedanticerrors',
|
||||
'-w': 'warnings.nowarn',
|
||||
'-Wunused': 'warnings.unused',
|
||||
'-Wuninitialized': 'warnings.uninitialized',
|
||||
'-Wall': 'warnings.allwarn',
|
||||
'-Wextra': 'warnings.extrawarn',
|
||||
'-Wmissing-declarations': 'warnings.missingdeclaration',
|
||||
'-Wconversion': 'warnings.conversion',
|
||||
'-Wpointer-arith': 'warnings.pointerarith',
|
||||
'-Wpadded': 'warnings.padded',
|
||||
'-Wshadow': 'warnings.shadow',
|
||||
'-Wlogical-op': 'warnings.logicalop',
|
||||
'-Waggregate-return': 'warnings.agreggatereturn',
|
||||
'-Wfloat-equal': 'warnings.floatequal',
|
||||
'-Werror': 'warnings.toerrors',
|
||||
}
|
||||
|
||||
for option in warning_options:
|
||||
opts['common'][warning_options[option]] = False
|
||||
if option in flags['common_flags']:
|
||||
opts['common'][warning_options[option]] = True
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
# Common debug options.
|
||||
debug_levels = {
|
||||
'-g': 'default',
|
||||
'-g1': 'minimal',
|
||||
'-g3': 'max',
|
||||
}
|
||||
opts['common']['debugging.level'] = 'none'
|
||||
for option in debug_levels:
|
||||
if option in flags['common_flags']:
|
||||
opts['common'][
|
||||
'debugging.level'] = debug_levels[option]
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
debug_formats = {
|
||||
'-ggdb': 'gdb',
|
||||
'-gstabs': 'stabs',
|
||||
'-gstabs+': 'stabsplus',
|
||||
'-gdwarf-2': 'dwarf2',
|
||||
'-gdwarf-3': 'dwarf3',
|
||||
'-gdwarf-4': 'dwarf4',
|
||||
'-gdwarf-5': 'dwarf5',
|
||||
}
|
||||
|
||||
opts['common']['debugging.format'] = ''
|
||||
for option in debug_levels:
|
||||
if option in flags['common_flags']:
|
||||
opts['common'][
|
||||
'debugging.format'] = debug_formats[option]
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
opts['common']['debugging.prof'] = False
|
||||
if '-p' in flags['common_flags']:
|
||||
opts['common']['debugging.prof'] = True
|
||||
self.remove_option(flags['common_flags'], '-p')
|
||||
|
||||
opts['common']['debugging.gprof'] = False
|
||||
if '-pg' in flags['common_flags']:
|
||||
opts['common']['debugging.gprof'] = True
|
||||
self.remove_option(flags['common_flags'], '-gp')
|
||||
|
||||
# Assembler options.
|
||||
opts['as']['usepreprocessor'] = False
|
||||
while '-x' in flags['asm_flags']:
|
||||
ix = flags['asm_flags'].index('-x')
|
||||
str = flags['asm_flags'][ix + 1]
|
||||
|
||||
if str == 'assembler-with-cpp':
|
||||
opts['as']['usepreprocessor'] = True
|
||||
else:
|
||||
# Collect all other assembler options.
|
||||
opts['as']['other'] += ' -x ' + str
|
||||
|
||||
self.remove_option(flags['asm_flags'], '-x')
|
||||
self.remove_option(flags['asm_flags'], 'assembler-with-cpp')
|
||||
|
||||
opts['as']['nostdinc'] = False
|
||||
if '-nostdinc' in flags['asm_flags']:
|
||||
opts['as']['nostdinc'] = True
|
||||
self.remove_option(flags['asm_flags'], '-nostdinc')
|
||||
|
||||
opts['as']['verbose'] = False
|
||||
if '-v' in flags['asm_flags']:
|
||||
opts['as']['verbose'] = True
|
||||
self.remove_option(flags['asm_flags'], '-v')
|
||||
|
||||
# C options.
|
||||
opts['c']['nostdinc'] = False
|
||||
if '-nostdinc' in flags['c_flags']:
|
||||
opts['c']['nostdinc'] = True
|
||||
self.remove_option(flags['c_flags'], '-nostdinc')
|
||||
|
||||
opts['c']['verbose'] = False
|
||||
if '-v' in flags['c_flags']:
|
||||
opts['c']['verbose'] = True
|
||||
self.remove_option(flags['c_flags'], '-v')
|
||||
|
||||
warning_options = {
|
||||
'-Wmissing-prototypes': 'warnings.missingprototypes',
|
||||
'-Wstrict-prototypes': 'warnings.strictprototypes',
|
||||
'-Wbad-function-cast': 'warnings.badfunctioncast',
|
||||
}
|
||||
|
||||
for option in warning_options:
|
||||
opts['c'][warning_options[option]] = False
|
||||
if option in flags['common_flags']:
|
||||
opts['c'][warning_options[option]] = True
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
# C++ options.
|
||||
opts['cpp']['nostdinc'] = False
|
||||
if '-nostdinc' in flags['cxx_flags']:
|
||||
opts['cpp']['nostdinc'] = True
|
||||
self.remove_option(flags['cxx_flags'], '-nostdinc')
|
||||
|
||||
opts['cpp']['nostdincpp'] = False
|
||||
if '-nostdinc++' in flags['cxx_flags']:
|
||||
opts['cpp']['nostdincpp'] = True
|
||||
self.remove_option(flags['cxx_flags'], '-nostdinc++')
|
||||
|
||||
optimization_options = {
|
||||
'-fno-exceptions': 'optimization.noexceptions',
|
||||
'-fno-rtti': 'optimization.nortti',
|
||||
'-fno-use-cxa-atexit': 'optimization.nousecxaatexit',
|
||||
'-fno-threadsafe-statics': 'optimization.nothreadsafestatics',
|
||||
}
|
||||
|
||||
for option in optimization_options:
|
||||
opts['cpp'][optimization_options[option]] = False
|
||||
if option in flags['cxx_flags']:
|
||||
opts['cpp'][optimization_options[option]] = True
|
||||
self.remove_option(flags['cxx_flags'], option)
|
||||
if option in flags['common_flags']:
|
||||
opts['cpp'][optimization_options[option]] = True
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
warning_options = {
|
||||
'-Wabi': 'warnabi',
|
||||
'-Wctor-dtor-privacy': 'warnings.ctordtorprivacy',
|
||||
'-Wnoexcept': 'warnings.noexcept',
|
||||
'-Wnon-virtual-dtor': 'warnings.nonvirtualdtor',
|
||||
'-Wstrict-null-sentinel': 'warnings.strictnullsentinel',
|
||||
'-Wsign-promo': 'warnings.signpromo',
|
||||
'-Weffc++': 'warneffc',
|
||||
}
|
||||
|
||||
for option in warning_options:
|
||||
opts['cpp'][warning_options[option]] = False
|
||||
if option in flags['cxx_flags']:
|
||||
opts['cpp'][warning_options[option]] = True
|
||||
self.remove_option(flags['cxx_flags'], option)
|
||||
if option in flags['common_flags']:
|
||||
opts['cpp'][warning_options[option]] = True
|
||||
self.remove_option(flags['common_flags'], option)
|
||||
|
||||
opts['cpp']['verbose'] = False
|
||||
if '-v' in flags['cxx_flags']:
|
||||
opts['cpp']['verbose'] = True
|
||||
self.remove_option(flags['cxx_flags'], '-v')
|
||||
|
||||
# Linker options.
|
||||
linker_options = {
|
||||
'-nostartfiles': 'nostart',
|
||||
'-nodefaultlibs': 'nodeflibs',
|
||||
'-nostdlib': 'nostdlibs',
|
||||
}
|
||||
|
||||
for option in linker_options:
|
||||
opts['ld'][linker_options[option]] = False
|
||||
if option in flags['ld_flags']:
|
||||
opts['ld'][linker_options[option]] = True
|
||||
self.remove_option(flags['ld_flags'], option)
|
||||
|
||||
opts['ld']['gcsections'] = False
|
||||
if '-Wl,--gc-sections' in flags['ld_flags']:
|
||||
opts['ld']['gcsections'] = True
|
||||
self.remove_option(flags['ld_flags'], '-Wl,--gc-sections')
|
||||
|
||||
opts['ld']['flags'] = []
|
||||
to_remove = []
|
||||
for opt in flags['ld_flags']:
|
||||
if opt.startswith('-Wl,--wrap,'):
|
||||
opts['ld']['flags'].append(
|
||||
'--wrap=' + opt[len('-Wl,--wrap,'):])
|
||||
to_remove.append(opt)
|
||||
for opt in to_remove:
|
||||
self.remove_option(flags['ld_flags'], opt)
|
||||
|
||||
# Other tool remaining options are separated by category.
|
||||
opts['as']['otherwarnings'] = self.find_options(
|
||||
flags['asm_flags'], '-W')
|
||||
|
||||
opts['c']['otherwarnings'] = self.find_options(
|
||||
flags['c_flags'], '-W')
|
||||
opts['c']['otheroptimizations'] = self.find_options(flags[
|
||||
'c_flags'], '-f')
|
||||
|
||||
opts['cpp']['otherwarnings'] = self.find_options(
|
||||
flags['cxx_flags'], '-W')
|
||||
opts['cpp']['otheroptimizations'] = self.find_options(
|
||||
flags['cxx_flags'], '-f')
|
||||
|
||||
# Other common remaining options are separated by category.
|
||||
opts['common']['optimization.other'] = self.find_options(
|
||||
flags['common_flags'], '-f')
|
||||
opts['common']['warnings.other'] = self.find_options(
|
||||
flags['common_flags'], '-W')
|
||||
|
||||
# Remaining common flags are added to each tool.
|
||||
opts['as']['other'] += ' ' + \
|
||||
' '.join(flags['common_flags']) + ' ' + \
|
||||
' '.join(flags['asm_flags'])
|
||||
opts['c']['other'] += ' ' + \
|
||||
' '.join(flags['common_flags']) + ' ' + ' '.join(flags['c_flags'])
|
||||
opts['cpp']['other'] += ' ' + \
|
||||
' '.join(flags['common_flags']) + ' ' + \
|
||||
' '.join(flags['cxx_flags'])
|
||||
opts['ld']['other'] += ' ' + \
|
||||
' '.join(flags['common_flags']) + ' ' + ' '.join(flags['ld_flags'])
|
||||
|
||||
if len(self.system_libraries) > 0:
|
||||
opts['ld']['other'] += ' -Wl,--start-group '
|
||||
opts['ld'][
|
||||
'other'] += ' '.join('-l' + s for s in self.system_libraries)
|
||||
opts['ld']['other'] += ' -Wl,--end-group '
|
||||
|
||||
# Strip all 'other' flags, since they might have leading spaces.
|
||||
opts['as']['other'] = opts['as']['other'].strip()
|
||||
opts['c']['other'] = opts['c']['other'].strip()
|
||||
opts['cpp']['other'] = opts['cpp']['other'].strip()
|
||||
opts['ld']['other'] = opts['ld']['other'].strip()
|
||||
|
||||
@staticmethod
|
||||
def find_options(lst, option):
|
||||
tmp = [str for str in lst if str.startswith(option)]
|
||||
if len(tmp) > 0:
|
||||
return tmp[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def find_options(lst, prefix):
|
||||
other = ''
|
||||
opts = [str for str in lst if str.startswith(prefix)]
|
||||
if len(opts) > 0:
|
||||
for opt in opts:
|
||||
other += ' ' + opt
|
||||
GNUARMEclipse.remove_option(lst, opt)
|
||||
return other.strip()
|
||||
|
||||
@staticmethod
|
||||
def remove_option(lst, option):
|
||||
if option in lst:
|
||||
lst.remove(option)
|
||||
|
||||
# =============================================================================
|
||||
13
tools/export/gnuarmeclipse/makefile.targets.tmpl
Normal file
13
tools/export/gnuarmeclipse/makefile.targets.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
# DO NOT REMOVE! Generated by the GNU ARM Eclipse exporter from an Mbed project.
|
||||
|
||||
mbedclean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS)
|
||||
$(RM) $(SECONDARY_FLASH)$(SECONDARY_SIZE) {{name}}.* linker-script-*.ld
|
||||
-@echo ' '
|
||||
|
||||
{% for config, data in options.items() %}
|
||||
linker-script-{{config}}.ld: ../{{ld_script}}
|
||||
{{data.cpp_cmd}} {{data.ld.other}} $< -o $@
|
||||
{{name}}.elf: linker-script-{{config}}.ld
|
||||
{% endfor %}
|
||||
3
tools/export/gnuarmeclipse/mbedignore.tmpl
Normal file
3
tools/export/gnuarmeclipse/mbedignore.tmpl
Normal file
@@ -0,0 +1,3 @@
|
||||
{%- for config in options.values() -%}
|
||||
{{config.name}}/*
|
||||
{% endfor -%}
|
||||
Reference in New Issue
Block a user