mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #1100 from stevew817/master
[Silicon Labs] Update exporter for Simplicity Studiopull/1103/head
commit
d595ee7ba1
|
@ -85,6 +85,13 @@ Nordic:
|
|||
Renesas:
|
||||
* [RZ-A1H](http://developer.mbed.org/platforms/Renesas-GR-PEACH/) (Cortex-A9)
|
||||
|
||||
Silicon Labs:
|
||||
* [EFM32 Zero Gecko] (https://developer.mbed.org/platforms/EFM32-Zero-Gecko/) (Cortex-M0+)
|
||||
* [EFM32 Happy Gecko] (https://developer.mbed.org/platforms/EFM32-Happy-Gecko/) (Cortex-M0+)
|
||||
* [EFM32 Leopard Gecko] (https://developer.mbed.org/platforms/EFM32-Leopard-Gecko/) (Cortex-M3)
|
||||
* [EFM32 Giant Gecko] (https://developer.mbed.org/platforms/EFM32-Giant-Gecko/) (Cortex-M3)
|
||||
* [EFM32 Wonder Gecko] (https://developer.mbed.org/platforms/EFM32-Wonder-Gecko/) (Cortex-M4)
|
||||
|
||||
|
||||
Supported Toolchains and IDEs
|
||||
-----------------------------
|
||||
|
|
|
@ -78,7 +78,7 @@ class SimplicityV3(Exporter):
|
|||
'EFM32ZG_STK3200': 'com.silabs.kit.si32.efm32.efm32zg.stk3200',
|
||||
'EFM32LG_STK3600': 'com.silabs.kit.si32.efm32.efm32lg.stk3600',
|
||||
'EFM32WG_STK3800': 'com.silabs.kit.si32.efm32.efm32wg.stk3800',
|
||||
'EFM32HG_STK3400': 'com.silabs.kit.si32.efm32.efm32hg.stk3400'
|
||||
'EFM32HG_STK3400': 'com.silabs.kit.si32.efm32.efm32hg.slstk3400a'
|
||||
}
|
||||
|
||||
FILE_TYPES = {
|
||||
|
@ -87,6 +87,15 @@ class SimplicityV3(Exporter):
|
|||
's_sources':'1'
|
||||
}
|
||||
|
||||
EXCLUDED_LIBS = [
|
||||
'm',
|
||||
'c',
|
||||
'gcc',
|
||||
'nosys',
|
||||
'supc++',
|
||||
'stdc++'
|
||||
]
|
||||
|
||||
DOT_IN_RELATIVE_PATH = False
|
||||
|
||||
orderedPaths = Folder("Root")
|
||||
|
@ -108,6 +117,15 @@ class SimplicityV3(Exporter):
|
|||
|
||||
main_files = []
|
||||
|
||||
EXCLUDED_LIBS = [
|
||||
'm',
|
||||
'c',
|
||||
'gcc',
|
||||
'nosys',
|
||||
'supc++',
|
||||
'stdc++'
|
||||
]
|
||||
|
||||
for r_type in ['s_sources', 'c_sources', 'cpp_sources']:
|
||||
r = getattr(self.resources, r_type)
|
||||
if r:
|
||||
|
@ -120,6 +138,7 @@ class SimplicityV3(Exporter):
|
|||
libraries = []
|
||||
for lib in self.resources.libraries:
|
||||
l, _ = splitext(basename(lib))
|
||||
if l[3:] not in EXCLUDED_LIBS:
|
||||
libraries.append(l[3:])
|
||||
|
||||
defines = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<project xmlns:model="http://www.silabs.com/sls/IDE.ecore" name="{{ name }}" kitCompatibility="{{ kit }}"
|
||||
partCompatibility="{{ part }}"
|
||||
toolchainCompatibility="com.silabs.ide.si32.gcc:4.8.3.20131129"
|
||||
sdkCompatibility="com.silabs.sdk.si32.efm32.sls:2.0.5"
|
||||
sdkCompatibility="com.silabs.sdk.si32.efm32"
|
||||
propertyScope="project"
|
||||
contentRoot=".">
|
||||
{# Hierarchically include all folders into the project #}
|
||||
|
@ -55,6 +55,18 @@
|
|||
${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %}
|
||||
{%- endfor -%}"/>
|
||||
{%- endif %}
|
||||
{# Manually override linker ordering #}
|
||||
{%- if libraries %}
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.category.ordering.selection" value="
|
||||
{%- if object_files -%}
|
||||
{%- for file in object_files -%}
|
||||
${workspace_loc:/${ProjName}/{{ file }}};
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- for library in libraries -%}
|
||||
${-l{{ library }}}{% if not loop.last %};{% endif %}
|
||||
{%- endfor -%}"/>
|
||||
{%- endif %}
|
||||
{# Define mbed-specific linker file #}
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.toolchain.exe" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.usescript" value="true"/>
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.toolchain.exe" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.script" value="${workspace_loc:/${ProjName}/{{ linker_script }}}"/>
|
||||
|
@ -100,6 +112,18 @@
|
|||
${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %}
|
||||
{%- endfor -%}"/>
|
||||
{%- endif %}
|
||||
{# Manually override linker ordering #}
|
||||
{%- if libraries %}
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.category.ordering.selection" value="
|
||||
{%- if object_files -%}
|
||||
{%- for file in object_files -%}
|
||||
${workspace_loc:/${ProjName}/{{ file }}};
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- for library in libraries -%}{% if not loop.last %};{% endif %}
|
||||
${-l{{ library }}}
|
||||
{%- endfor -%}"/>
|
||||
{%- endif %}
|
||||
{# Define mbed-specific linker file #}
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.toolchain.exe" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.usescript" value="true"/>
|
||||
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.toolchain.exe" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.script" value="${workspace_loc:/${ProjName}/{{ linker_script }}}"/>
|
||||
|
|
Loading…
Reference in New Issue