Clone of official tools
export/simplicity/slsproj.tmpl@47:21ae3e5a7128, 2021-02-04 (annotated)
- Committer:
- Anders Blomdell
- Date:
- Thu Feb 04 17:17:13 2021 +0100
- Revision:
- 47:21ae3e5a7128
- Parent:
- 35:da9c89f8be7d
Add a few normpath calls
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:66f3b5499f7f | 1 | <?xml version="1.0" encoding="UTF-8"?> |
screamer | 0:66f3b5499f7f | 2 | <project xmlns:model="http://www.silabs.com/sls/IDE.ecore" name="{{ name }}" kitCompatibility="{{ kit }}" |
screamer | 0:66f3b5499f7f | 3 | partCompatibility="{{ part }}" |
screamer | 0:66f3b5499f7f | 4 | toolchainCompatibility="com.silabs.ide.si32.gcc:4.8.3.20131129" |
screamer | 0:66f3b5499f7f | 5 | sdkCompatibility="com.silabs.sdk.si32.efm32" |
screamer | 0:66f3b5499f7f | 6 | propertyScope="project" |
screamer | 0:66f3b5499f7f | 7 | contentRoot="."> |
screamer | 0:66f3b5499f7f | 8 | {# Hierarchically include all folders into the project #} |
screamer | 0:66f3b5499f7f | 9 | {%- for child in recursiveFolders.children recursive %} |
screamer | 0:66f3b5499f7f | 10 | <folder name="{{ child.name }}" uri="{{ child.name }}" includeAllFiles="true" includeAllFolders="true"> |
screamer | 0:66f3b5499f7f | 11 | {%- if child.children -%} |
screamer | 0:66f3b5499f7f | 12 | {{ loop(child.children) }} |
screamer | 0:66f3b5499f7f | 13 | {%- endif %} |
screamer | 0:66f3b5499f7f | 14 | </folder> |
screamer | 0:66f3b5499f7f | 15 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 16 | |
screamer | 0:66f3b5499f7f | 17 | {# Include all source files not belonging to a subfolder separately #} |
screamer | 0:66f3b5499f7f | 18 | {%- for file in main_files -%} |
screamer | 0:66f3b5499f7f | 19 | <file name = "{{ file }}" uri = "file:./{{ file }}" partCompatibility = ""/> |
screamer | 0:66f3b5499f7f | 20 | {%- endfor %} |
The Other Jimmy |
31:8ea194f6145b | 21 | {%- if include_root %} |
The Other Jimmy |
31:8ea194f6145b | 22 | <file name = "mbed_config.h" uri = "file:./mbed_config.h" partCompatibility = ""/> |
The Other Jimmy |
31:8ea194f6145b | 23 | {%- endif %} |
screamer | 0:66f3b5499f7f | 24 | |
screamer | 0:66f3b5499f7f | 25 | <sourceFolder></sourceFolder> |
screamer | 0:66f3b5499f7f | 26 | <model:property key="cppProjectCommon.languageId" value="org.eclipse.cdt.core.g++"/> |
screamer | 0:66f3b5499f7f | 27 | <model:property key="projectCommon.buildArtifactType" value="EXE"/> |
screamer | 0:66f3b5499f7f | 28 | <configuration name="com.silabs.ide.si32.gcc.debug#com.silabs.ide.si32.gcc:4.8.3.20131129" label="GNU ARM v4.8.3 - Debug" stockConfigCompatibility="com.silabs.ide.toolchain.core.debug"> |
screamer | 0:66f3b5499f7f | 29 | <model:description></model:description> |
screamer | 0:66f3b5499f7f | 30 | {# Add all include paths to the managed build compiler, paths relative to project #} |
The Other Jimmy |
31:8ea194f6145b | 31 | {%- if include_root %} |
The Other Jimmy |
31:8ea194f6145b | 32 | <includePath languageCompatibility="c cpp" uri="."/> |
The Other Jimmy |
31:8ea194f6145b | 33 | {%- endif %} |
screamer | 0:66f3b5499f7f | 34 | {%- for path in include_paths %} |
screamer | 0:66f3b5499f7f | 35 | <includePath languageCompatibility="c cpp" uri="studio:/project/{{ path }}/"/> |
screamer | 0:66f3b5499f7f | 36 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 37 | {# Add all mbed-defined #Defines for the preprocessor #} |
screamer | 0:66f3b5499f7f | 38 | {%- for define, value in defines %} |
screamer | 0:66f3b5499f7f | 39 | <macroDefinition languageCompatibility="c cpp" name="{{ define }}" value="{{ value }}"/> |
screamer | 0:66f3b5499f7f | 40 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 41 | {# Include all standard libraries that mbed requires #} |
screamer | 0:66f3b5499f7f | 42 | <macroDefinition languageCompatibility="c cpp" name="DEBUG" value="1"/> |
screamer | 0:66f3b5499f7f | 43 | <libraryFile languageCompatibility="c" name="stdc++"/> |
screamer | 0:66f3b5499f7f | 44 | <libraryFile languageCompatibility="c" name="supc++"/> |
screamer | 0:66f3b5499f7f | 45 | <libraryFile languageCompatibility="c" name="m"/> |
screamer | 0:66f3b5499f7f | 46 | <libraryFile languageCompatibility="c" name="nosys"/> |
screamer | 0:66f3b5499f7f | 47 | <libraryFile languageCompatibility="c" name="c"/> |
screamer | 0:66f3b5499f7f | 48 | <libraryFile languageCompatibility="c" name="gcc"/> |
screamer | 0:66f3b5499f7f | 49 | {# Include exported libraries #} |
screamer | 0:66f3b5499f7f | 50 | {%- for library in libraries %} |
screamer | 0:66f3b5499f7f | 51 | <libraryFile languageCompatibility="c cpp" name="{{ library }}"/> |
screamer | 0:66f3b5499f7f | 52 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 53 | {# Add library search paths #} |
screamer | 0:66f3b5499f7f | 54 | {%- for path in library_paths %} |
screamer | 0:66f3b5499f7f | 55 | <libraryPath languageCompatibility="c cpp" uri="studio:/project/{{ path }}/"/> |
screamer | 0:66f3b5499f7f | 56 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 57 | {# Add in separate object files if needed #} |
screamer | 0:66f3b5499f7f | 58 | {%- if object_files %} |
screamer | 0:66f3b5499f7f | 59 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.userobjs" value=" |
screamer | 0:66f3b5499f7f | 60 | {%- for file in object_files -%} |
screamer | 0:66f3b5499f7f | 61 | ${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %} |
screamer | 0:66f3b5499f7f | 62 | {%- endfor -%}"/> |
screamer | 0:66f3b5499f7f | 63 | {%- endif %} |
screamer | 0:66f3b5499f7f | 64 | {# Manually override linker ordering #} |
screamer | 0:66f3b5499f7f | 65 | {%- if libraries %} |
screamer | 0:66f3b5499f7f | 66 | <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=" |
screamer | 0:66f3b5499f7f | 67 | {%- if object_files -%} |
screamer | 0:66f3b5499f7f | 68 | {%- for file in object_files -%} |
screamer | 0:66f3b5499f7f | 69 | ${workspace_loc:/${ProjName}/{{ file }}}; |
screamer | 0:66f3b5499f7f | 70 | {%- endfor -%} |
screamer | 0:66f3b5499f7f | 71 | {%- endif -%} |
screamer | 0:66f3b5499f7f | 72 | {%- for library in libraries -%} |
screamer | 0:66f3b5499f7f | 73 | ${-l{{ library }}}{% if not loop.last %};{% endif %} |
screamer | 0:66f3b5499f7f | 74 | {%- endfor -%}"/> |
screamer | 0:66f3b5499f7f | 75 | {%- endif %} |
screamer | 0:66f3b5499f7f | 76 | {# Define mbed-specific linker file #} |
screamer | 0:66f3b5499f7f | 77 | <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"/> |
screamer | 0:66f3b5499f7f | 78 | <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 }}}"/> |
screamer | 0:66f3b5499f7f | 79 | {# Make sure to wrap main in order to get clock initialization done right #} |
screamer | 13:ab47a20b66f0 | 80 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.base" optionId="gnu.c.link.option.ldflags" value="{{ld_flags|join(" ")}}"/> |
screamer | 13:ab47a20b66f0 | 81 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.flags" value="{{ld_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 82 | {# For debug build, don't apply optimizations #} |
screamer | 0:66f3b5499f7f | 83 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.none"/> |
screamer | 13:ab47a20b66f0 | 84 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.misc.other" value="-c {{common_flags|join(" ")}} {{c_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 85 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none"/> |
screamer | 13:ab47a20b66f0 | 86 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c {{common_flags|join(" ")}} {{cxx_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 87 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect" value="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect.default"/> |
screamer | 0:66f3b5499f7f | 88 | </configuration> |
screamer | 0:66f3b5499f7f | 89 | <configuration name="com.silabs.ide.si32.gcc.release#com.silabs.ide.si32.gcc:4.8.3.20131129" label="GNU ARM v4.8.3 - Release" stockConfigCompatibility="com.silabs.ide.toolchain.core.release"> |
screamer | 0:66f3b5499f7f | 90 | <model:description></model:description> |
screamer | 0:66f3b5499f7f | 91 | {# Add all include paths to the managed build compiler, paths relative to project #} |
The Other Jimmy |
31:8ea194f6145b | 92 | {%- if include_root %} |
The Other Jimmy |
31:8ea194f6145b | 93 | <includePath languageCompatibility="c cpp" uri="."/> |
The Other Jimmy |
31:8ea194f6145b | 94 | {%- endif %} |
screamer | 0:66f3b5499f7f | 95 | {%- for path in include_paths %} |
screamer | 0:66f3b5499f7f | 96 | <includePath languageCompatibility="c cpp" uri="studio:/project/{{ path }}/"/> |
screamer | 0:66f3b5499f7f | 97 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 98 | {# Add all mbed-defined #Defines for the preprocessor #} |
screamer | 0:66f3b5499f7f | 99 | {%- for define, value in defines %} |
screamer | 0:66f3b5499f7f | 100 | <macroDefinition languageCompatibility="c cpp" name="{{ define }}" value="{{ value }}"/> |
screamer | 0:66f3b5499f7f | 101 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 102 | {# Include all standard libraries that mbed requires #} |
screamer | 0:66f3b5499f7f | 103 | <libraryFile languageCompatibility="c" name="stdc++"/> |
screamer | 0:66f3b5499f7f | 104 | <libraryFile languageCompatibility="c" name="supc++"/> |
screamer | 0:66f3b5499f7f | 105 | <libraryFile languageCompatibility="c" name="m"/> |
screamer | 0:66f3b5499f7f | 106 | <libraryFile languageCompatibility="c" name="nosys"/> |
screamer | 0:66f3b5499f7f | 107 | <libraryFile languageCompatibility="c" name="c"/> |
screamer | 0:66f3b5499f7f | 108 | <libraryFile languageCompatibility="c" name="gcc"/> |
screamer | 0:66f3b5499f7f | 109 | {# Include exported libraries #} |
screamer | 0:66f3b5499f7f | 110 | {%- for library in libraries %} |
screamer | 0:66f3b5499f7f | 111 | <libraryFile languageCompatibility="c cpp" name="{{ library }}"/> |
screamer | 0:66f3b5499f7f | 112 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 113 | {# Add library search paths #} |
screamer | 0:66f3b5499f7f | 114 | {%- for path in library_paths %} |
screamer | 0:66f3b5499f7f | 115 | <libraryPath languageCompatibility="c cpp" uri="studio:/project/{{ path }}/"/> |
screamer | 0:66f3b5499f7f | 116 | {%- endfor %} |
screamer | 0:66f3b5499f7f | 117 | {# Add in separate object files if needed #} |
screamer | 0:66f3b5499f7f | 118 | {%- if object_files %} |
screamer | 0:66f3b5499f7f | 119 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.userobjs" value=" |
screamer | 0:66f3b5499f7f | 120 | {%- for file in object_files -%} |
screamer | 0:66f3b5499f7f | 121 | ${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %} |
screamer | 0:66f3b5499f7f | 122 | {%- endfor -%}"/> |
screamer | 0:66f3b5499f7f | 123 | {%- endif %} |
screamer | 0:66f3b5499f7f | 124 | {# Manually override linker ordering #} |
screamer | 0:66f3b5499f7f | 125 | {%- if libraries %} |
screamer | 0:66f3b5499f7f | 126 | <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=" |
screamer | 0:66f3b5499f7f | 127 | {%- if object_files -%} |
screamer | 0:66f3b5499f7f | 128 | {%- for file in object_files -%} |
screamer | 0:66f3b5499f7f | 129 | ${workspace_loc:/${ProjName}/{{ file }}}; |
screamer | 0:66f3b5499f7f | 130 | {%- endfor -%} |
screamer | 0:66f3b5499f7f | 131 | {%- endif -%} |
screamer | 0:66f3b5499f7f | 132 | {%- for library in libraries -%}{% if not loop.last %};{% endif %} |
screamer | 0:66f3b5499f7f | 133 | ${-l{{ library }}} |
screamer | 0:66f3b5499f7f | 134 | {%- endfor -%}"/> |
screamer | 0:66f3b5499f7f | 135 | {%- endif %} |
screamer | 0:66f3b5499f7f | 136 | {# Define mbed-specific linker file #} |
screamer | 0:66f3b5499f7f | 137 | <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"/> |
screamer | 0:66f3b5499f7f | 138 | <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 }}}"/> |
screamer | 0:66f3b5499f7f | 139 | {# Make sure to wrap main in order to get clock initialization done right #} |
screamer | 13:ab47a20b66f0 | 140 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.base" optionId="gnu.c.link.option.ldflags" value="{{ld_flags|join(" ")}}"/> |
screamer | 13:ab47a20b66f0 | 141 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.flags" value="{{ld_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 142 | {# Use optimize for size on release build #} |
screamer | 0:66f3b5499f7f | 143 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.size"/> |
screamer | 13:ab47a20b66f0 | 144 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.misc.other" value="-c {{common_flags|join(" ")}} {{c_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 145 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.size"/> |
screamer | 13:ab47a20b66f0 | 146 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c {{common_flags|join(" ")}} {{cxx_flags|join(" ")}}"/> |
screamer | 0:66f3b5499f7f | 147 | <toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect" value="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect.default"/> |
screamer | 0:66f3b5499f7f | 148 | </configuration> |
screamer | 0:66f3b5499f7f | 149 | </project> |