Sysprogs forums › Forums › VisualGDB › Missing Pre/Post build steps settings – exception raised when VS2017 start
- This topic has 11 replies, 3 voices, and was last updated 6 years, 9 months ago by support.
-
AuthorPosts
-
February 20, 2017 at 16:24 #10491tomasbParticipant
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.
February 20, 2017 at 16:30 #10493tomasbParticipantVisualGDB 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)
February 20, 2017 at 16:33 #10494tomasbParticipantalso 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)
February 20, 2017 at 17:38 #10495supportKeymasterHi,
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.
February 20, 2017 at 18:11 #10496tomasbParticipantupdated 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.
February 20, 2017 at 18:29 #10497supportKeymasterHi,
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
February 3, 2018 at 21:35 #19926zharijsParticipantHi.
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?
February 3, 2018 at 22:09 #19929supportKeymasterHi,
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).
February 4, 2018 at 00:04 #19932zharijsParticipantLinker 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.
February 4, 2018 at 00:36 #19933supportKeymasterHi,
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.
February 4, 2018 at 03:30 #19937zharijsParticipantEither 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.
February 4, 2018 at 19:28 #19942supportKeymasterHi,
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.
-
AuthorPosts
- You must be logged in to reply to this topic.