TARGETTYPE Override

Sysprogs forums Forums VisualGDB TARGETTYPE Override

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #21981
    kellac1
    Participant

    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 5 years, 8 months ago by kellac1.
    Attachments:
    You must be logged in to view attached files.
    #21984
    kellac1
    Participant

    With the previous GCC build there was an area for additional Make arguments.

    <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir>
     <MakeConfigurationName>Debug_AppOnly</MakeConfigurationName>
     <AdditionalMakeArguments>$(LocalMultiThreadedBuildFlags) TARGETTYPE=APP</AdditionalMakeArguments>
    • This reply was modified 5 years, 8 months ago by kellac1.
    • This reply was modified 5 years, 8 months ago by kellac1.
    • This reply was modified 5 years, 8 months ago by kellac1.
    #21988
    support
    Keymaster

    Hi,

    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.

    #21998
    kellac1
    Participant

    Do 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.

    #21999
    kellac1
    Participant

    I have found this, but not sure how I migrate from the previous boatloader example found here.

    I could certainly use some help as this was just working before I migrated to the suggested MSBUILD.

    #22001
    kellac1
    Participant

    After 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.

    • This reply was modified 5 years, 8 months ago by kellac1.
    • This reply was modified 5 years, 8 months ago by kellac1.
    #22010
    support
    Keymaster

    Hi,

    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.

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