Missing Pre/Post build steps settings – exception raised when VS2017 start

Sysprogs forums Forums VisualGDB Missing Pre/Post build steps settings – exception raised when VS2017 start

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #10491
    tomasb
    Participant

    Hi,

    I’m missing settings for Pre/Post build custom steps. Also when VS2017 Community RC starts, It raised exception (3 times AFAIR). Same happened while used VS2015.

    Any hint?

    T.

     

    #10493
    tomasb
    Participant
    VisualGDB version: 5.2.14.1357
    ------------------ System.Runtime.InteropServices.COMException ------------------
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
     at Microsoft.VisualStudio.VCProjectEngine.VCConfiguration.get_Tools()
     at mj1..ctor(VCConfiguration a)
     at mg.get_Configurations()
     at d8.p3(Project a)
    
     VisualGDB version: 5.2.14.1357
    ------------------ System.Runtime.InteropServices.COMException ------------------
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
     at Microsoft.VisualStudio.VCProjectEngine.VCConfiguration.get_Tools()
     at mj1..ctor(VCConfiguration a)
     at mg.get_Configurations()
     at d8.p3(Project a)
    
     VisualGDB version: 5.2.14.1357
     
    ------------------ System.Runtime.InteropServices.COMException ------------------
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
     at Microsoft.VisualStudio.VCProjectEngine.VCConfiguration.get_Tools()
     at mj1..ctor(VCConfiguration a)
     at mg.get_Configurations()
     at d8.p3(Project a)
    #10494
    tomasb
    Participant

    also on other projects inside solution I can’t select VisualGDB settings with following:

    VisualGDB version: 5.2.14.1357
    ------------------ System.Runtime.InteropServices.COMException ------------------
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
     at Microsoft.VisualStudio.VCProjectEngine.VCConfiguration.get_Tools()
     at mj1..ctor(VCConfiguration a)
     at mg.get_Configurations()
     at m21.l(IVCProject a)
     at d8.f4.q()
     at oe1.d1(y81 b, String a)
     at oe1..ctor(y81 a)
     at d8.GDBProjectProperties.ExecuteForProject(d8 addin, Object objPrj)
     at d8.GDBContextProjectProperties.a(Object obj)
     at x11.m(Object b, EventArgs a)
    #10495
    support
    Keymaster

    Hi,

    This is a known issue of the old VS 2017 RC that was fixed in one of the latest builds. Please update your Visual Studio (not VisualGDB) to the latest RC build.

    #10496
    tomasb
    Participant

    updated VS2017 to 15.0.0-RC.4+26206.0 and VisualGDB to RC8, exceptions are gone, but still don’t have Pre/Post build steps settings in VisualGDB settings.

    #10497
    support
    Keymaster

    Hi,

    The pre/post-build steps are available starting from the Custom edition of VisualGDB. If you are using a lower edition, you can always upgrade here: https://sysprogs.com/splm/mykey

    #19926
    zharijs
    Participant

    Hi.

    Is there a chance to have Custom Build Settings in “Embedded” version? I am asking because with advertising to use MSBuild instead of makefile project and not allowing to use Custom build settings, you are killing the previous functionality. For instance now there seems to be no way to make a bootloader in a different project and insert it in to the main project, as there is no way to call the objcopy to rename the .data field. If I try to add the binary file as resource and use properties menu to change section name, it fails to add the upon mentioned file to the map. Instead there is just a reserved space filled with FFs where the loader should have been.

    Is there any other way to solve this without building loader, the running objcopy manually and the adding the o file to linker manually?

    #19929
    support
    Keymaster

    Hi,

    For MSBuild projects you can use the custom post-build step in the Linker settings or custom post-compile step in the C++ settings. Another option would be to create a custom MSBuild target (this approach is more complicated, but is very well documented by Microsoft).

    The custom post-build actions provide a convenient GUI for managing those steps, hence they are included in the more expensive Custom edition, but you can always achieve the same results through scripting the steps manually (although this requires extra effort).

    #19932
    zharijs
    Participant

    Linker settings post-build script allows only one line and one command to be run. Maybe you could explain / show on example, how to “port” step 16 from this example to MSbuild project: https://visualgdb.com/tutorials/arm/bootloader/

    Everything else I have figured out, that’s the only issue left.

    #19933
    support
    Keymaster

    Hi,

    The easiest way to run multiple commands would be to create a batch file in the project directory and run it as a custom post-link step. Simply copy the command lines for objcopy and other tools from a build log of a Make-based project and replace the project name accordingly. VisualGDB will then run the .bat file with those command lines each time after a successful build.

    #19937
    zharijs
    Participant

    Either I am doing something really wrong, or it does not work like that. As far as my experimenting goes, the Custom Step in Linker settings from Configuration Properties are is called before the *.bin file is generated, so no matter if I make a bat file or add lines to command line option – they are always called before the *.bin so they always fail.

    Now, I could add the segment rename script not to the end of bootloader build but at the start of main project build, but I can’t find any way to do that.

    #19942
    support
    Keymaster

    Hi,

    OK, sorry, we don’t have a detailed tutorial on that part yet, however we have a similar one showing how to extend the MSBuild targets to run Qt tools: https://visualgdb.com/tutorials/linux/qt/msbuild/

    To run a custom step before the build you would need to declare a target similar to the InvokeQtTools one shown in the tutorial (you can use the Exec target).

    If you are not comfortable editing the MSBuild rules manually, we would advise keeping the Makefile-based solution until we update our bootloader tutorial showing the exact steps for MSBuild.

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