bebenlebricolo / CMakeAS7

Fork of CMake original repository, but with additional support for Atmel Studio 7 IDE
https://gitlab.kitware.com/cmake/cmake
Other
6 stars 4 forks source link

[Stability] : enable DFP packs resolution based on existing projects #50

Open bebenlebricolo opened 2 years ago

bebenlebricolo commented 2 years ago

At the moment, DFP packs are written in *.cproj files but they are not written as .componentinfo.xml which should contain something like the attached "firmware.componentinfo.xml", derived from the AVR8_C_fake_app test project.

<?xml version="1.0" encoding="utf-8"?>
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
    <ProjectComponents>
        <ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
            <CApiVersion></CApiVersion>
            <CBundle></CBundle>
            <CClass>Device</CClass>
            <CGroup>Startup</CGroup>
            <CSub></CSub>
            <CVariant></CVariant>
            <CVendor>Atmel</CVendor>
            <CVersion>1.6.0</CVersion>
            <DefaultRepoPath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs</DefaultRepoPath>
            <DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
            <Description></Description>
            <Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d4p1:anyType i:type="FileInfo">
                    <AbsolutePath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\</AbsolutePath>
                    <Attribute></Attribute>
                    <Category>include</Category>
                    <Condition>C</Condition>
                    <FileContentHash i:nil="true" />
                    <FileVersion></FileVersion>
                    <Name>include/</Name>
                    <SelectString></SelectString>
                    <SourcePath></SourcePath>
                </d4p1:anyType>
                <d4p1:anyType i:type="FileInfo">
                    <AbsolutePath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\avr\iom328p.h</AbsolutePath>
                    <Attribute></Attribute>
                    <Category>header</Category>
                    <Condition>C</Condition>
                    <FileContentHash>4leX2H78R90/kvebBjYSOw==</FileContentHash>
                    <FileVersion></FileVersion>
                    <Name>include/avr/iom328p.h</Name>
                    <SelectString></SelectString>
                    <SourcePath></SourcePath>
                </d4p1:anyType>
                <d4p1:anyType i:type="FileInfo">
                    <AbsolutePath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.c</AbsolutePath>
                    <Attribute>template</Attribute>
                    <Category>source</Category>
                    <Condition>C Exe</Condition>
                    <FileContentHash>8K89NEZ9PbHJFjfy7fBVEA==</FileContentHash>
                    <FileVersion></FileVersion>
                    <Name>templates/main.c</Name>
                    <SelectString>Main file (.c)</SelectString>
                    <SourcePath></SourcePath>
                </d4p1:anyType>
                <d4p1:anyType i:type="FileInfo">
                    <AbsolutePath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.cpp</AbsolutePath>
                    <Attribute>template</Attribute>
                    <Category>source</Category>
                    <Condition>C Exe</Condition>
                    <FileContentHash>mkKaE95TOoATsuBGv6jmxg==</FileContentHash>
                    <FileVersion></FileVersion>
                    <Name>templates/main.cpp</Name>
                    <SelectString>Main file (.cpp)</SelectString>
                    <SourcePath></SourcePath>
                </d4p1:anyType>
                <d4p1:anyType i:type="FileInfo">
                    <AbsolutePath>D:/InstalledPrograms\AtmelStudio7\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega328p</AbsolutePath>
                    <Attribute></Attribute>
                    <Category>libraryPrefix</Category>
                    <Condition>GCC</Condition>
                    <FileContentHash i:nil="true" />
                    <FileVersion></FileVersion>
                    <Name>gcc/dev/atmega328p</Name>
                    <SelectString></SelectString>
                    <SourcePath></SourcePath>
                </d4p1:anyType>
            </Files>
            <PackName>ATmega_DFP</PackName>
            <PackPath>D:/InstalledPrograms/AtmelStudio7/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
            <PackVersion>1.6.364</PackVersion>
            <PresentInProject>true</PresentInProject>
            <ReferenceConditionId>ATmega328P</ReferenceConditionId>
            <RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d4p1:string></d4p1:string>
            </RteComponents>
            <Status>Resolved</Status>
            <VersionMode>Fixed</VersionMode>
            <IsComponentInAtProject>true</IsComponentInAtProject>
        </ProjectComponent>
    </ProjectComponents>
</Store>

When used, this file helps AtmelStudio7 retrieve the package used and it then can generate this image in the properties ui page : image

It might help further build processes (?) at the moment it also works without it.