Sysprogs forums › Forums › VisualGDB › Project with both embedded and linux targets?
Tagged: CppUTest, unit testing
- This topic has 3 replies, 2 voices, and was last updated 1 year, 11 months ago by support.
-
AuthorPosts
-
December 2, 2022 at 13:46 #33497laughlinbParticipant
I’m wondering if it’s possible to have a single VGDB project that contains both embedded targets (e.g. STM32) and a Linux target. My project is CMake based, and I currently use CppUTest for unit testing.
My project currently has a couple of executables that link against CppUTest for doing on-target (deploy to STM) unit testing, but as I continue to build out the project, doing on-target testing for everything is likely not tractable.
I’m hoping to be able to leverage the test integration/GUI elements (e.g. setting a build & deploy host, utilizing the Visual Studio Test Explorer, etc.).
Is this possible? In my poking around in VGDB Project settings I don’t see anything to indicate this ability, but perhaps there is something I’m missing.
December 2, 2022 at 14:24 #33498supportKeymasterSure, you can use the CMake Platform Manager to have an arbitrary combination of platforms and configurations.
Every platform/configuration can use a different toolchain, exclude some targets, or tweak how they are built.
December 2, 2022 at 15:19 #33499laughlinbParticipantThank you for that reference. I attempted to add a Linux platform to my existing Embedded project, and upon clicking OK in the “Manage Platforms and Configurations” window (step 12 in the above link) received the an exception (pasted below). I am using VS Community Edition 2022, v17.4.0
The new platform does show up in the drop down configuration menu, however, with Analyze|RPi, etc. When selecting that configuration, and clicking “Debug settings” it’s clear that the VGDB Project properties is still assuming I’m trying to target an embedded target, and not a linux host.
`
VisualGDB version: 5.6.108.4702
—————— System.Runtime.InteropServices.COMException ——————
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.CommonIDE.Solutions.Dte.DteSolution.SaveAs(String bstrPath)
at EnvDTE._Solution.SaveAs(String FileName)
at up1.m(DTE e, IEnumerable1 d, IEnumerable1 f, IEnumerable1 c, IEnumerable1 b, Boolean g, Action a)
at w5.e5.i(String[] a, String[] d, String[] b, String[] c)
at em3.a_2()
at h02.ManageConfigurations()
at VisualGDB.Common_GUI.WPF.ProjectPropertiesWindow3.ManageConfigurations_Click(Object sender, RoutedEventArgs e)
trace=[EnvDTE._Solution.SaveAs:-1, up1.m:35, w5+e5.i:0, em3.a_2:570, h02.ManageConfigurations:18, VisualGDB.Common_GUI.WPF.ProjectPropertiesWindow3.ManageConfigurations_Click:0]`
edit: formatting
- This reply was modified 1 year, 11 months ago by laughlinb.
- This reply was modified 1 year, 11 months ago by laughlinb.
Attachments:
You must be logged in to view attached files.December 2, 2022 at 15:36 #33503supportKeymasterThis error means that Visual Studio refused to save the solution file when VisualGDB requested it. Most likely, it is caused by some setting you picked when creating the project.
Please try starting again and following the tutorial as close as possible. If it doesn’t work, please share the complete steps to reproduce the problem including all the screenshots, and we will try to point out the cause of this issue.
-
AuthorPosts
- You must be logged in to reply to this topic.