Sysprogs forums › Forums › VisualGDB › Custom Embedded Template
- This topic has 9 replies, 2 voices, and was last updated 7 years, 10 months ago by support.
-
AuthorPosts
-
February 4, 2017 at 18:16 #10305sidpriceParticipant
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
February 4, 2017 at 23:04 #10306supportKeymasterHi,
Please try adding them to Solution Explorer.
February 5, 2017 at 00:21 #10309sidpriceParticipantI already tried that, unfortunately they need to be excluded from the build and then VS removes them from the solution explorer.
Sid
February 5, 2017 at 02:52 #10310supportKeymasterHi,
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.
February 5, 2017 at 23:20 #10313sidpriceParticipantThe 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
February 5, 2017 at 23:31 #10318sidpriceParticipantIt 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
February 6, 2017 at 05:11 #10326supportKeymasterHi,
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.
February 6, 2017 at 16:41 #10327sidpriceParticipantThank 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.
February 6, 2017 at 16:55 #10328sidpriceParticipantWhat 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
February 8, 2017 at 05:39 #10341supportKeymasterHi,
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.
-
AuthorPosts
- You must be logged in to reply to this topic.