Integrating VisualGDB build with Jenkins

Sysprogs forums Forums VisualGDB Integrating VisualGDB build with Jenkins

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28684
    brillo372
    Participant

    Hi,

    On a Windows 10 machine using Visual Studio 2019 and VisualGDB 5.5.4.3540 I am able to successfully build our project from Visual Studio in both release and debug mode.  Furthermore, using msbuild, I am able to successfully build the release build from the command line on the same machine.  However when I go to integrate it with Jenkins (using the exact same machine that worked), I am experiencing the following error using the same command line arguments:
    <pre class=”console-output”><proj-name>.vcxproj” on node 1 (rebuild target(s)).
    <span class=”error-inline”>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\SysprogsPlatform.targets(96,2): error : No toolchain found. Please configure the toolchain via VisualGDB Project Properties. [c:\jenkins\workspace\tito-trunk\products\jackson\tito\blimage\visualgdb\bl_tito_iMXRT1064.vcxproj]
    </span>Done Building Project “c:\<path>\<proj-name>.vcxproj” (rebuild target(s)) — FAILED.

    Build FAILED.

    I’ve attempted the following same command line arguments that worked fine on the command line:

    The build is based on msbuild just like Visual Studio projects for Windows.
    To build from the command line, the following steps must be executed:

    1) Open a cmd.exe window (console)

    2) Execute VsDevCmd.bat to establish environment variables which msbuild needs:
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat

    3) Run msbuild:
    For the bootloader image:

    msbuild -nologo -verbosity:minimal -target:rebuild -property:Configuration=Release;Platform=VisualGDB <your-path>\<proj-name>.vcxproj

    For the application image:
    <p class=”console-output”>msbuild -nologo -verbosity:minimal -target:rebuild -property:Configuration=Release;Platform=VisualGDB <your-path>\<proj-name>.vcxproj</p>
    I’ve got to be overlooking something very subtle and appreciate any thoughts in advance!

    • This topic was modified 4 years, 5 months ago by brillo372.
    #28686
    support
    Keymaster

    Hi,

    Looks like the Jenkins machine is missing VisualGDB toolchain definitions. This is very similar to the issue discussed in this thread, so the workarounds described there should work.

    If not, please let us know more details and we will help.

    #28714
    brillo372
    Participant

    Thanks for this!  It turned out that I needed to make some ENV variables known to the Windows Jenkins Node.  Specifically (and for the sake of others who might experience something similar):

    BSP_ID

    BSP_ROOT

    BSP_VERSION

    TOOLCHAIN_ROOT

    ToolchainID

    ToolchainVersion

    VISUALGDB_DIR

    #28722
    support
    Keymaster

    No problem and thanks for the update. Just a quick clarification from our side: normally the ID/Version variables would be set inside the project file and the _ROOT and _DIR variables would be computed inside the %LOCALAPPDATA%\VisualGDB\FindXXX.props files that are managed by VisualGDB. So deploying these files to the build machine should get the variables working automatically.

    You can find more details on this in our TFS tutorials here: https://visualgdb.com/w/tutorials/tag/tfs/

    #32305
    ranwa
    Participant

    Hi ,

    Where do I find the values of the following ENV :

    BSP_ID

    BSP_ROOT

    BSP_VERSION

    TOOLCHAIN_ROOT

    ToolchainID

    ToolchainVersion

    VISUALGDB_DIR

    I need help integrating VisualGDB to Jenkins

    #32307
    support
    Keymaster

    It generally depends on your project type. Normally, if you have VisualGDB and the toolchains/BSPs installed on the build server (same user account as used by Jenkins), you do not need to specify them manually.

    You can find several tutorials showing how to use VisualGDB with CI/CD systems here: https://visualgdb.com/w/tutorials/tag/tfs/

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