Custom Embedded Template

Sysprogs forums Forums VisualGDB Custom Embedded Template

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #10305
    sidprice
    Participant

    I have created a custom template for a series of test projects I need. The projects all link to a static library and they need a couple of linker scripts to be available. These scripts were in the source application project folder, however when I export the template and create a project using it the script files are not in the new project. How can I include these two files in my template?

    Thanks,

    Sid

    #10306
    support
    Keymaster

    Hi,

    Please try adding them to Solution Explorer.

    #10309
    sidprice
    Participant

    I already tried that, unfortunately they need to be excluded from the build and then VS removes them from the solution explorer.

    Sid

    #10310
    support
    Keymaster

    Hi,

    You can always explicitly specify which linker script file to use via VisualGDB Project Properties. As long as it is specified, including .lds files in the project should not affect anything.

    #10313
    sidprice
    Participant

    The main linker script is already in the VisualGDB properties for the project. That main script includes the library script. Adding the main linker script to the project gives warnings, I tried pasting the warnings here but the formatting gets messed up and it is not readable

    And, as I said if I exclude them from the build VS removes them from the project files.

    Sid

    • This reply was modified 7 years, 3 months ago by sidprice.
    • This reply was modified 7 years, 3 months ago by sidprice.
    • This reply was modified 7 years, 3 months ago by sidprice.
    • This reply was modified 7 years, 3 months ago by sidprice.
    #10318
    sidprice
    Participant

    It would seem to be useful to be able to add files manually to the template when it is created, or even to be able to edit the template to add required files.

    Sid

    #10326
    support
    Keymaster

    Hi,

    This is actually very straight-forward. A VisualGDB project template is just a ZIP file containing template.xml with various project information and other files that will be simply copied to the project folder. So you can simply change the template file extension to .zip and add any extra contents there using 7-Zip or any other tool.

    The behavior you described with the warnings looks like a bug, so if you find it annoying, feel free to provide more steps and we will fix it.

    #10327
    sidprice
    Participant

    Thank you, I will look at the “zip” file.

    I am happy to help track this down if you think it is a bug in VisualGDB. Here is some more information about the project that is being used as a template source.

    It has simple linker script for the main application. This script is entered in the VisualGDB options for LFLAGS. Since each of the projects in this test suite uses the same static library the main linker script has an “include” for the library linker script. Both scripts are placed in the project folder.

    Sid.

    #10328
    sidprice
    Participant

    What ItemType entries should I use for the linker script files, this is what I have so far:

    <FolderContents>
    <Name>LinkerScripts</Name>
    <Subfolders />
    <Files>
    <FileReference>
    <FileName>f4.ld</FileName>
    <IsExternal>false</IsExternal>
    <IsExcludedFromBuild>true</IsExcludedFromBuild>
    <ItemType>ClCompile</ItemType>
    </FileReference>
    </Files>
    </FolderContents>

    Sid

    #10341
    support
    Keymaster

    Hi,

    If you don’t want to add the linker script to Solution Explorer, you don’t need to modify template.xml at all. Just add the file in the archive and VisualGDB will extract it when it creates the project.

    Regarding the warnings, we might be able to help if you could send us screenshots of your Solution Explorer, your VisualGDB Project Properties specifying the linker script and the warning. If you don’t want to upload them to an image hosting, you can simply send them to us via our support interface.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.