Skip to content

Instantly share code, notes, and snippets.

@esutton
Last active April 27, 2022 20:10
Show Gist options
  • Save esutton/06f31bb6310516e4f9cdf7e5fe03406a to your computer and use it in GitHub Desktop.
Save esutton/06f31bb6310516e4f9cdf7e5fe03406a to your computer and use it in GitHub Desktop.
Install Qt for MCU on Windows 10 Host with Visual Studio 2019 Installed

Overview ( Warning: This Does Not Work )

Installing a working copy of Qt for MCUs (commercial license) on Windows 10 with Visual 2019 is very complex. I have yet to succeed. VS 2019, CMake, and indvidual components dependencies for Qt for MCU are a mess.

I have used Qt for desktop development Linux, Windows, and macOS for over 10 years. I have never had a more difficult time.

Is there an easier way?

  • Install Qt 6.3 desktop first, followed by Qt for MCU? ( This did not seem to work either )

Windows 10

Start with a clean install of Windows 10 64-bit with zero added development tools.

Install Visual Studio 2019

  1. https://my.visualstudio.com/Downloads
  2. Select Product Keys, return to Downloads
  3. Under Developer Tools, select VS 2019
  4. Install latest Visual Studio Professional 2019 (version 16.11)
  5. On Installing dialog, select:
    • Workloads:
      • Desktop development with C++
    • Individual components
      • [un-check] MSVC v142 - VS 2019 C++ x64/x86 build tools (Latest)
      • MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.28-16.9)
      • Windows 10 SDK (10.0.19041.1) ( verify checked as Qt for MCU requres Windows SDK )
      • Note: Due to bug in CMake, you need to uninstall all MSVC toolsets versions that are newer than v14.28.
  6. Press Install button to continue, restart after complete

The above does not work. After install, vcvarsall.bat is not found.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat 

Install Qt for MCU

  1. Logon to Qt Account:
  2. Select Downloads
  3. Select License: Qt for Device Creation, Product: Qt for MCUs, Version: 2.1.0
  4. Run downloaded online installer for Qt for MCUs, 2.1.0 Installation Folder
C:\Qt

Check to install the following four (4) components:

  • Design Tools
  • Qt 6.3 for desktop development
  • Qt 6.3 for embedded development
  • MCU development

Test by Creating Qt for MCUs 2.1 - Desktop 32bpp template app

To preview your QUL application with desktop platform on Windows, create 'Qt for MCUs 2.1 - Desktop 32bpp' kit by following the instructions at: Qt Creator setup

When using Qt for MCUs 2.1 - Desktop 32bpp' kit, the template project should run out-of-the box if the prerequisites are met, which are listed at:

  1. Select Create Project, Application (Qt for MCU), Mcu Support Application
  2. Kit Selection: [x] Qt for MCUs 2.1 - Desktop 32bpp
  3. Build > Run CMake
CMake Error

Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S "C:/Users/Ed Sutton/Documents/projects/QtforMcuWedNoon" -B "C:/Users/Ed Sutton/Documents/projects/build-QtforMcuWedNoon-Qt_for_MCUs_2_1_Desktop_32bpp-Debug" in C:\Users\Ed Sutton\Documents\projects\build-QtforMcuWedNoon-Qt_for_MCUs_2_1_Desktop_32bpp-Debug.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Users/Ed Sutton/Documents/projects/build-QtforMcuWedNoon-Qt_for_MCUs_2_1_Desktop_32bpp-Debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ed Sutton/Documents/projects/build-QtforMcuWedNoon-Qt_for_MCUs_2_1_Desktop_32bpp-Debug/CMakeFiles/CMakeError.log".
CMake process exited with exit code 1.

Elapsed time: 00:01.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment