Sysprogs forums › Forums › VisualGDB › TARGETTYPE Override
- This topic has 6 replies, 2 voices, and was last updated 6 years, 2 months ago by support.
-
AuthorPosts
-
September 15, 2018 at 03:04 #21981kellac1Participant
I am trying to override the TARGETTYPE within the Makefile from my project settings. I was successful in doing this with the GCC project, but now with the MSBUILD it does not work.
Where do I need to define the TARGETTYPE in order to allow it to take effect in the Makefile.
I have attached the Makefile for understanding. I am basically trying to have one TARGETTYPE for the full application plus the bootloader, and a separate stand alone application hex file.
Please advise.
- This topic was modified 6 years, 2 months ago by kellac1.
Attachments:
You must be logged in to view attached files.September 15, 2018 at 03:16 #21984kellac1ParticipantWith the previous GCC build there was an area for additional Make arguments.
<MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> <MakeConfigurationName>Debug_AppOnly</MakeConfigurationName> <AdditionalMakeArguments>$(LocalMultiThreadedBuildFlags) TARGETTYPE=APP</AdditionalMakeArguments>
September 15, 2018 at 05:07 #21988supportKeymasterHi,
The local MSBuild projects are built directly without the use of GNU Make (for remote projects VisualGDB generates a temporary Makefile with a different structure than the regular Makefiles), so specifying TARGETTYPE won’t have any effect.
Instead please use the VS project properties (not VisualGDB Project Properties) -> Configuration Properties -> General -> Configuration Type.
September 15, 2018 at 20:59 #21998kellac1ParticipantDo you have another example on how to do the bootloader without the Makefile? That is the main reason for specifying the TARGETTYPE. We were using the Makefile for linking the boot loader to the application.
September 15, 2018 at 21:12 #21999kellac1ParticipantSeptember 17, 2018 at 15:01 #22001kellac1ParticipantAfter a little bit of effort and thinking through it I have found a solution.
I combined both idea from the previous links in my post above. I first followed all of the steps in creating the bootloader project as defined here. There were a few changes I had to make to the project to make everything work correctly.
First, I built the bootloader project separately, and added the output binary file to the main app project as a resource file. The Properties (not VisualGDB properties) for that file were setup as an “Embedded Binary File” and set to go into the section name “.bootldr” for the configuration that was building the entire app + bootloader. All other configs, I just exclude from build.
I then changed the Output Directory, found in Project Properties (not VisualGDB properties), to “$(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\“. This was because the main application project was deleting my .bin file that was generated by the bootloader project.
After those two changes, I was able to build and link the projects properly. I also now have them store in locations that are independent and not overwritten by each other.
Hope that helps.
September 18, 2018 at 05:43 #22010supportKeymasterHi,
Good to know it works and sorry for the delay: this got triaged as an issue requiring a complex repro on our side, that results in slightly higher turnaround times as we need to recheck everything from scratch. Normally if you are actively working on a solution, please consider sharing more details on your setup and specific problems you encounter and we should be able to answer much faster as we will have more context on the problem.
-
AuthorPosts
- You must be logged in to reply to this topic.