mirror of https://github.com/ARMmbed/mbed-os.git
Auto generate UUID in Atmel studio solution and project template file
parent
132c67b246
commit
76a32914af
|
@ -14,6 +14,7 @@ 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.
|
||||
"""
|
||||
import uuid
|
||||
from exporters import Exporter
|
||||
from os.path import splitext, basename, dirname
|
||||
|
||||
|
@ -51,6 +52,9 @@ class AtmelStudio(Exporter):
|
|||
for lib in self.resources.libraries:
|
||||
l, _ = splitext(basename(lib))
|
||||
libraries.append(l[3:])
|
||||
|
||||
solution_uuid = '{' + str(uuid.uuid4()) + '}'
|
||||
project_uuid = '{' + str(uuid.uuid4()) + '}'
|
||||
|
||||
ctx = {
|
||||
'target': self.target,
|
||||
|
@ -62,7 +66,9 @@ class AtmelStudio(Exporter):
|
|||
'library_paths': self.resources.lib_dirs,
|
||||
'linker_script': self.resources.linker_script,
|
||||
'libraries': libraries,
|
||||
'symbols': self.get_symbols()
|
||||
'symbols': self.get_symbols(),
|
||||
'solution_uuid': solution_uuid.upper(),
|
||||
'project_uuid': project_uuid.upper()
|
||||
}
|
||||
target = self.target.lower()
|
||||
self.gen_file('atmelstudio6_2.atsln.tmpl', ctx, '%s.atsln' % self.program_name)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "{{name}}", "{{name}}.cppproj", "{5C0392AB-FF86-4EC0-9125-DC2B901B87CE}"
|
||||
Project("{{solution_uuid}}") = "{{name}}", "{{name}}.cppproj", "{{project_uuid}}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -9,10 +9,10 @@ Global
|
|||
Release|ARM = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5C0392AB-FF86-4EC0-9125-DC2B901B87CE}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{5C0392AB-FF86-4EC0-9125-DC2B901B87CE}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{5C0392AB-FF86-4EC0-9125-DC2B901B87CE}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{5C0392AB-FF86-4EC0-9125-DC2B901B87CE}.Release|ARM.Build.0 = Release|ARM
|
||||
{{project_uuid}}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{{project_uuid}}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{{project_uuid}}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{{project_uuid}}.Release|ARM.Build.0 = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>6.2</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.ARMGCC.CPP</ToolchainName>
|
||||
<ProjectGuid>{5c0392ab-ff86-4ec0-9125-dc2b901b87ce}</ProjectGuid>
|
||||
<ProjectGuid>{{project_uuid}}</ProjectGuid>
|
||||
<avrdevice>AT{{target}}</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
|
|
Loading…
Reference in New Issue