Project with both embedded and linux targets?

Sysprogs forums Forums VisualGDB Project with both embedded and linux targets?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33497
    laughlinb
    Participant

    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.

    #33498
    support
    Keymaster

    Sure, 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.

    #33499
    laughlinb
    Participant

    Thank 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, 4 months ago by laughlinb.
    • This reply was modified 1 year, 4 months ago by laughlinb.
    Attachments:
    You must be logged in to view attached files.
    #33503
    support
    Keymaster

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

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