mirror of https://github.com/ARMmbed/mbed-os.git
changed template to gae exporter style
creates output for debug, develop and release builds TODO. replaces some fixed flags, develop build not working , linker has no input filespull/4916/head
parent
f9152c2bd6
commit
af177c577e
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><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="com.crt.advproject.config.exe.{{opts['id']}}.{{opts['uid']['config']}}">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.{{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.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" 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 artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="{{opts['name']}} build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.{{opts['id']}}.{{opts['uid']['config']}}" name="{{opts['name']}}" parent="com.crt.advproject.config.exe.{{opts['parent_id']}}" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}" ; arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"">
|
||||
<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']}}"/>
|
||||
<tool id="com.crt.advproject.cpp.exe.{{opts['id']}}.{{u.id}}" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.{{opts['id']}}">
|
||||
<option id="com.crt.advproject.cpp.thumb.{{u.id}}" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.cpp.specs.{{u.id}}" name="Specs" superClass="com.crt.advproject.cpp.specs" useByScannerDiscovery="false" value="com.crt.advproject.cpp.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.cpp.arch.{{u.id}}" name="Architecture" superClass="com.crt.advproject.cpp.arch" useByScannerDiscovery="false" value="com.crt.advproject.cpp.target.cm4" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.cpp.fpu.{{u.id}}" name="Floating point" superClass="com.crt.advproject.cpp.fpu" useByScannerDiscovery="false" value="com.crt.advproject.cpp.fpu.fpv4" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.{{u.id}}" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
{% for s in opts['cpp']['defines'] %}
|
||||
<listOptionValue builtIn="false" value="{{s}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.{{u.id}}" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.files.{{u.id}}" name="Include files (-include)" superClass="gnu.cpp.compiler.option.include.files" useByScannerDiscovery="false" valueType="includeFiles">
|
||||
{% for file in opts['common']['include_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{file}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.other.other.{{u.id}}" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -fno-delete-null-pointer-checks -fomit-frame-pointer" valueType="string"/>
|
||||
<inputType id="com.crt.advproject.compiler.cpp.input.{{u.id}}" superClass="com.crt.advproject.compiler.cpp.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.gcc.exe.{{opts['id']}}.{{u.id}}" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.{{opts['id']}}">
|
||||
<option id="com.crt.advproject.gcc.thumb.{{u.id}}" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.gcc.hdrlib.{{u.id}}" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" useByScannerDiscovery="false" value="com.crt.advproject.gcc.hdrlib.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gcc.specs.{{u.id}}" name="Specs" superClass="com.crt.advproject.gcc.specs" useByScannerDiscovery="false" value="com.crt.advproject.gcc.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gcc.arch.{{u.id}}" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="false" value="com.crt.advproject.gcc.target.cm4" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.{{u.id}}" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__NEWLIB__"/>
|
||||
{% for s in opts['c']['defines'] %}
|
||||
<listOptionValue builtIn="false" value="{{s}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.{{u.id}}" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="com.crt.advproject.gcc.fpu.{{u.id}}" name="Floating point" superClass="com.crt.advproject.gcc.fpu" useByScannerDiscovery="false" value="com.crt.advproject.gcc.fpu.fpv4" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.misc.other.{{u.id}}" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -fno-delete-null-pointer-checks -fomit-frame-pointer" valueType="string"/>
|
||||
<inputType id="com.crt.advproject.compiler.input.{{u.id}}" superClass="com.crt.advproject.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.gas.exe.{{opts['id']}}.{{u.id}}" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.{{opts['id']}}">
|
||||
<option id="com.crt.advproject.gas.thumb.{{u.id}}" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.gas.hdrlib.{{u.id}}" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" useByScannerDiscovery="false" value="com.crt.advproject.gas.hdrlib.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gas.specs.{{u.id}}" name="Specs" superClass="com.crt.advproject.gas.specs" useByScannerDiscovery="false" value="com.crt.advproject.gas.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gas.arch.{{u.id}}" name="Architecture" superClass="com.crt.advproject.gas.arch" useByScannerDiscovery="false" value="com.crt.advproject.gas.target.cm4" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gas.fpu.{{u.id}}" name="Floating point" superClass="com.crt.advproject.gas.fpu" useByScannerDiscovery="false" value="com.crt.advproject.gas.fpu.fpv4.hard" valueType="enumerated"/>
|
||||
<option id="gnu.both.asm.option.include.paths.{{u.id}}" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
{% for path in opts['common']['include_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.{{u.id}}" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="com.crt.advproject.assembler.input.{{u.id}}" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.link.cpp.exe.{{opts['id']}}.{{u.id}}" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.{{opts['id']}}">
|
||||
<option id="com.crt.advproject.link.cpp.thumb.{{u.id}}" name="Thumb mode" superClass="com.crt.advproject.link.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.link.cpp.multicore.master.{{u.id}}" name="Multicore master" superClass="com.crt.advproject.link.cpp.multicore.master" useByScannerDiscovery="false"/>
|
||||
<option id="com.crt.advproject.link.cpp.multicore.master.userobjs.{{u.id}}" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.cpp.multicore.master.userobjs" useByScannerDiscovery="false" valueType="userObjs"/>
|
||||
<option id="com.crt.advproject.link.cpp.arch.{{u.id}}" name="Architecture" superClass="com.crt.advproject.link.cpp.arch" useByScannerDiscovery="false" value="com.crt.advproject.link.cpp.target.cm4" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.link.option.paths.{{u.id}}" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
|
||||
{% for path in opts['ld']['library_paths'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.{{u.id}}" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
|
||||
{% for lib in opts['ld']['user_libraries'] %}
|
||||
<listOptionValue builtIn="false" value="{{lib}}"/>
|
||||
{% endfor %}
|
||||
{% for lib in opts['ld']['system_libraries'] %}
|
||||
<listOptionValue builtIn="false" value="{{lib}}"/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<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.fpv4" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.link.option.userobjs.{{u.id}}" name="Other objects" superClass="gnu.cpp.link.option.userobjs" useByScannerDiscovery="false">
|
||||
{% for path in opts['ld']['object_files'] %}
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/{{path}}""/>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option id="com.crt.advproject.link.cpp.script.{{u.id}}" name="Linker script" superClass="com.crt.advproject.link.cpp.script" value=""${workspace_loc:/${ProjName}/{{opts['ld']['script']}}"" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.other.{{u.id}}" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-Map="${BuildArtifactFileBaseName}.map""/>
|
||||
<listOptionValue builtIn="false" value="-print-memory-usage"/>
|
||||
<listOptionValue builtIn="false" value="--gc-sections"/>
|
||||
</option>
|
||||
<option id="com.crt.advproject.link.cpp.multicore.slave.{{u.id}}" name="Multicore configuration" superClass="com.crt.advproject.link.cpp.multicore.slave" useByScannerDiscovery="false"/>
|
||||
<option id="gnu.cpp.link.option.flags.{{u.id}}" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-Wl,--wrap,main -Wl,--wrap,_malloc_r -Wl,--wrap,_free_r -Wl,--wrap,_realloc_r -Wl,--wrap,_memalign_r -Wl,--wrap,_calloc_r -Wl,--wrap,exit -Wl,--wrap,atexit" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.{{u.id}}" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.link.exe.{{opts['id']}}.{{u.id}}" name="MCU Linker" superClass="com.crt.advproject.link.exe.{{opts['id']}}"/>
|
||||
</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}}.com.crt.advproject.projecttype.exe.{{u.id}}" name="Executable" projectType="com.crt.advproject.projecttype.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by the GNU ARM Eclipse exporter from an 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>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
mbed SDK
|
||||
Copyright (c) 2011-2016 ARM Limited
|
||||
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.
|
||||
|
|
@ -13,40 +13,955 @@ 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 os.path import splitext, basename
|
||||
|
||||
from tools.export.gnuarmeclipse import GNUARMEclipse
|
||||
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 MCUXpresso(GNUARMEclipse):
|
||||
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([
|
||||
"TEENSY3_1Code.binary_hook",
|
||||
"MCU_NRF51Code.binary_hook",
|
||||
"LPCTargetCode.lpc_patch",
|
||||
"LPC4088Code.binary_hook"
|
||||
])
|
||||
|
||||
class MCUXpresso(Exporter):
|
||||
NAME = 'MCUXpresso'
|
||||
TOOLCHAIN = 'GCC_ARM'
|
||||
|
||||
MBED_CONFIG_HEADER_SUPPORTED = True
|
||||
@classmethod
|
||||
def is_target_supported(cls, target_name):
|
||||
target = TARGET_MAP[target_name]
|
||||
return apply_supported_whitelist(
|
||||
cls.TOOLCHAIN, POST_BINARY_WHITELIST, target)
|
||||
|
||||
TARGETS = [
|
||||
'LPC54114',
|
||||
]
|
||||
# override
|
||||
@property
|
||||
def flags(self):
|
||||
"""Returns a dictionary of toolchain flags.
|
||||
Keys of the dictionary are:
|
||||
cxx_flags - c++ flags
|
||||
c_flags - c flags
|
||||
ld_flags - linker flags
|
||||
asm_flags - assembler flags
|
||||
common_flags - common options
|
||||
|
||||
The difference from the parent function is that it does not
|
||||
add macro definitions, since they are passed separately.
|
||||
"""
|
||||
|
||||
config_header = self.toolchain.get_config_header()
|
||||
flags = {key + "_flags": copy.deepcopy(value) for key, value
|
||||
in self.toolchain.flags.iteritems()}
|
||||
if config_header:
|
||||
config_header = relpath(config_header,
|
||||
self.resources.file_basepath[config_header])
|
||||
flags['c_flags'] += self.toolchain.get_config_option(config_header)
|
||||
flags['cxx_flags'] += self.toolchain.get_config_option(
|
||||
config_header)
|
||||
return flags
|
||||
|
||||
def toolchain_flags(self, toolchain):
|
||||
"""Returns a dictionary of toolchain flags.
|
||||
Keys of the dictionary are:
|
||||
cxx_flags - c++ flags
|
||||
c_flags - c flags
|
||||
ld_flags - linker flags
|
||||
asm_flags - assembler flags
|
||||
common_flags - common options
|
||||
|
||||
The difference from the above is that it takes a parameter.
|
||||
"""
|
||||
|
||||
# Note: use the config options from the currently selected toolchain.
|
||||
config_header = self.toolchain.get_config_header()
|
||||
|
||||
flags = {key + "_flags": copy.deepcopy(value) for key, value
|
||||
in toolchain.flags.iteritems()}
|
||||
if config_header:
|
||||
config_header = relpath(config_header,
|
||||
self.resources.file_basepath[config_header])
|
||||
header_options = self.toolchain.get_config_option(config_header)
|
||||
flags['c_flags'] += header_options
|
||||
flags['cxx_flags'] += header_options
|
||||
return flags
|
||||
|
||||
# override
|
||||
def generate(self):
|
||||
"""
|
||||
Generate the .project and .cproject files.
|
||||
"""
|
||||
if not self.resources.linker_script:
|
||||
raise NotSupportedException("No linker script found.")
|
||||
|
||||
print
|
||||
print 'Create a GNU ARM Eclipse C++ managed project'
|
||||
print 'Project name: {0}'.format(self.project_name)
|
||||
print 'Target: {0}'.format(self.toolchain.target.name)
|
||||
print 'Toolchain: {0}'.format(self.TOOLCHAIN)
|
||||
|
||||
self.resources.win_to_unix()
|
||||
|
||||
# TODO: use some logger to display additional info if verbose
|
||||
|
||||
libraries = []
|
||||
# print 'libraries'
|
||||
# print self.resources.libraries
|
||||
for lib in self.resources.libraries:
|
||||
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')
|
||||
# print build_folders
|
||||
|
||||
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 + '/')]
|
||||
# print 'objects'
|
||||
# print objects
|
||||
|
||||
self.compute_exclusions()
|
||||
|
||||
ctx = {
|
||||
self.include_path = [
|
||||
self.filter_dot(s) for s in self.resources.inc_dirs]
|
||||
print 'Include folders: {0}'.format(len(self.include_path))
|
||||
|
||||
self.as_defines = self.toolchain.get_symbols(True)
|
||||
self.c_defines = self.toolchain.get_symbols()
|
||||
self.cpp_defines = self.c_defines
|
||||
print 'Symbols: {0}'.format(len(self.c_defines))
|
||||
|
||||
self.ld_script = self.filter_dot(
|
||||
self.resources.linker_script)
|
||||
print 'Linker script: {0}'.format(self.ld_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()
|
||||
|
||||
print
|
||||
print 'Build configuration: {0}'.format(opts['name'])
|
||||
|
||||
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
|
||||
|
||||
flags = self.toolchain_flags(toolchain)
|
||||
|
||||
print 'Common flags:', ' '.join(flags['common_flags'])
|
||||
print 'C++ flags:', ' '.join(flags['cxx_flags'])
|
||||
print 'C flags:', ' '.join(flags['c_flags'])
|
||||
print 'ASM flags:', ' '.join(flags['asm_flags'])
|
||||
print 'Linker flags:', ' '.join(flags['ld_flags'])
|
||||
|
||||
# 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']['system_libraries'] = self.system_libraries
|
||||
opts['ld']['script'] = join(id.capitalize(),
|
||||
"linker-script-%s.ld" % id)
|
||||
opts['cpp_cmd'] = " ".join(toolchain.preproc)
|
||||
|
||||
# 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,
|
||||
'include_paths': self.resources.inc_dirs,
|
||||
'linker_script': self.resources.linker_script,
|
||||
'object_files': self.resources.objects,
|
||||
'libraries': libraries,
|
||||
'exclude': '|'.join(self.excluded_folders),
|
||||
'symbols': self.toolchain.get_symbols()
|
||||
'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,
|
||||
}
|
||||
ctx.update(self.flags)
|
||||
self.gen_file('mcuxpresso/%s_project.tmpl' % self.target.lower(), ctx, '.project')
|
||||
self.gen_file('mcuxpresso/%s_cproject.tmpl' % self.target.lower(), ctx, '.cproject')
|
||||
|
||||
self.gen_file('mcuxpresso/.project.tmpl', jinja_ctx,
|
||||
'.project', trim_blocks=True, lstrip_blocks=True)
|
||||
self.gen_file('mcuxpresso/.cproject.tmpl', 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
|
||||
print 'Done. Import the \'{0}\' project in Eclipse.'.format(self.project_name)
|
||||
|
||||
# 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)
|
||||
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')
|
||||
|
||||
# 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")]
|
||||
|
||||
# print file_names
|
||||
|
||||
profile_names = [basename(fn).replace(".json", "")
|
||||
for fn in file_names]
|
||||
# print profile_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
|
||||
"""
|
||||
source_folders = [self.filter_dot(s) for s in set(dirname(
|
||||
src) for src in self.resources.c_sources + self.resources.cpp_sources + self.resources.s_sources)]
|
||||
|
||||
self.excluded_folders = set(self.resources.ignored_dirs) - set(self.resources.inc_dirs)
|
||||
print 'Source folders: {0}, with {1} exclusions'.format(len(source_folders), len(self.excluded_folders))
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@staticmethod
|
||||
def filter_dot(str):
|
||||
"""
|
||||
Remove the './' prefix, if present.
|
||||
This function assumes that resources.win_to_unix()
|
||||
replaced all windows backslashes with slashes.
|
||||
"""
|
||||
if str == None:
|
||||
return None
|
||||
if str[:2] == './':
|
||||
return str[2:]
|
||||
return str
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def dump_tree(self, nodes, depth=0):
|
||||
for k in nodes.keys():
|
||||
node = nodes[k]
|
||||
parent_name = node['parent'][
|
||||
'name'] if 'parent' in node.keys() else ''
|
||||
print ' ' * depth, node['name'], node['is_used'], parent_name
|
||||
if len(node['children'].keys()) != 0:
|
||||
self.dump_tree(node['children'], depth + 1)
|
||||
|
||||
def dump_paths(self, nodes, depth=0):
|
||||
for k in nodes.keys():
|
||||
node = nodes[k]
|
||||
parts = []
|
||||
while True:
|
||||
parts.insert(0, node['name'])
|
||||
if 'parent' not in node:
|
||||
break
|
||||
node = node['parent']
|
||||
path = '/'.join(parts)
|
||||
print path, nodes[k]['is_used']
|
||||
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)
|
||||
|
||||
if False:
|
||||
print
|
||||
print 'common_flags', flags['common_flags']
|
||||
print 'asm_flags', flags['asm_flags']
|
||||
print 'c_flags', flags['c_flags']
|
||||
print 'cxx_flags', flags['cxx_flags']
|
||||
print 'ld_flags', flags['ld_flags']
|
||||
|
||||
# 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()
|
||||
|
||||
if False:
|
||||
print
|
||||
print opts
|
||||
|
||||
print
|
||||
print 'common_flags', flags['common_flags']
|
||||
print 'asm_flags', flags['asm_flags']
|
||||
print 'c_flags', flags['c_flags']
|
||||
print 'cxx_flags', flags['cxx_flags']
|
||||
print 'ld_flags', flags['ld_flags']
|
||||
|
||||
@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
|
||||
MCUXpresso.remove_option(lst, opt)
|
||||
return other.strip()
|
||||
|
||||
@staticmethod
|
||||
def remove_option(lst, option):
|
||||
if option in lst:
|
||||
lst.remove(option)
|
||||
|
||||
# =============================================================================
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.crt.advproject.config.exe.debug.1175217673">
|
||||
{% for cfg_key in options %}
|
||||
{% set opts = options[cfg_key] %}
|
||||
<cconfiguration id="com.crt.advproject.config.exe.{{opts['id']}}.{{opts['uid']['config']}}">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1175217673" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
|
|
@ -130,64 +132,7 @@
|
|||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.crt.advproject.config.exe.release.1874082488">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.release.1874082488" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" 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 artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Release build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.release.1874082488" name="Release" parent="com.crt.advproject.config.exe.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}"; # arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; # checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"; ">
|
||||
<folderInfo id="com.crt.advproject.config.exe.release.1874082488." name="/" resourcePath="">
|
||||
<toolChain id="com.crt.advproject.toolchain.exe.release.1287422571" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.exe.release">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.release.655561029" name="ARM-based MCU (Release)" superClass="com.crt.advproject.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/Test}/Release" id="com.crt.advproject.builder.exe.release.774540823" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.release"/>
|
||||
<tool id="com.crt.advproject.cpp.exe.release.1585529981" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.release">
|
||||
<option id="com.crt.advproject.cpp.thumb.466745295" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.cpp.specs.329940437" name="Specs" superClass="com.crt.advproject.cpp.specs" value="com.crt.advproject.cpp.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.cpp.arch.1475567372" name="Architecture" superClass="com.crt.advproject.cpp.arch" value="com.crt.advproject.cpp.target.cm4" valueType="enumerated"/>
|
||||
<inputType id="com.crt.advproject.compiler.cpp.input.712759729" superClass="com.crt.advproject.compiler.cpp.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.gcc.exe.release.436473778" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.release">
|
||||
<option id="com.crt.advproject.gcc.thumb.1207519611" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.gcc.hdrlib.304359750" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" value="com.crt.advproject.gcc.hdrlib.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gcc.specs.711819549" name="Specs" superClass="com.crt.advproject.gcc.specs" value="com.crt.advproject.gcc.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gcc.arch.1778572792" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm4" valueType="enumerated"/>
|
||||
<inputType id="com.crt.advproject.compiler.input.291496284" superClass="com.crt.advproject.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.gas.exe.release.379864529" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.release">
|
||||
<option id="com.crt.advproject.gas.thumb.79075182" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.gas.hdrlib.7291150" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" value="com.crt.advproject.gas.hdrlib.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gas.specs.2076951344" name="Specs" superClass="com.crt.advproject.gas.specs" value="com.crt.advproject.gas.specs.newlibnano" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.gas.arch.1195132811" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm4" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.212785567" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="com.crt.advproject.assembler.input.1836994186" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.link.cpp.exe.release.1913039793" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.release">
|
||||
<option id="com.crt.advproject.link.cpp.thumb.144065588" name="Thumb mode" superClass="com.crt.advproject.link.cpp.thumb" value="true" valueType="boolean"/>
|
||||
<option id="com.crt.advproject.link.cpp.multicore.master.917760706" name="Multicore master" superClass="com.crt.advproject.link.cpp.multicore.master"/>
|
||||
<option id="com.crt.advproject.link.cpp.multicore.master.userobjs.1270351441" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.cpp.multicore.master.userobjs" valueType="userObjs"/>
|
||||
<option id="com.crt.advproject.link.cpp.arch.1961698982" name="Architecture" superClass="com.crt.advproject.link.cpp.arch" value="com.crt.advproject.link.cpp.target.cm4" valueType="enumerated"/>
|
||||
<option id="com.crt.advproject.link.cpp.script.1663456123" name="Linker script" superClass="com.crt.advproject.link.cpp.script" value=""${workspace_loc:/${ProjName}/{{linker_script}}}"" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1869834449" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.crt.advproject.link.exe.release.599520946" name="MCU Linker" superClass="com.crt.advproject.link.exe.release"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
{% endfor %}
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="Test.com.crt.advproject.projecttype.exe.153449255" name="Executable" projectType="com.crt.advproject.projecttype.exe"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{%- for config in options.values() -%}
|
||||
{{config.name}}/*
|
||||
{% endfor -%}
|
||||
Loading…
Reference in New Issue