Build Systems for Embedded Projects

VisualGDB can create embedded projects based on the following build systems:

  • MSBuild
  • Advanced CMake
  • GNU Make

Generally, if you are familiar with the regular Visual C++ project structure, we recommend using MSBuild. Otherwise, please consider creating an Advanced CMake project instead. GNU Make build system is considerably limited compared to other project types and we generally do not recommend using it for new projects.

The rest of the page explains the advantages and disadvantages of each supported build system in detail.

MSBuild

MSBuild-based projects are very similar to the regular Visual C++ projects for Windows. VisualGDB uses its own highly optimized MSBuild back-end that is compatible with the GCC, Keil and IAR compilers. It exposes the common compiler settings using the familiar VC++ property pages and reuses its build semantics. The main advantages of the MSBuild projects are:

  • Faster build compared to GNU Make
  • Uses regular VC++ Property Sheets
  • Allows overriding build properties for individual files
  • Better IntelliSense integration, compared to GNU Make
  • Supports MSBuild property sheets and custom targets

Although MSBuild projects are recommended for most use cases, they have several limitations compared to the Advanced CMake projects:

  • Only one build target per project is supported. I.e. creating reusable static libraries would require separate projects, duplicating some settings.
  • Only one target device per project is supported. Because the target-specific files, such as STM32 HAL need to be specifically referenced in Solution Explorer, it is not possible to target multiple different devices within the same MSBuild project.
  • Solution Explorer view is managed by the Visual C++ project subsystem and lacks embedded-specific commands and items.

You can find detailed documentation on MSBuild projects here. We recommend using MSBuild for all new projects, unless you specifically want to work around the limitations shown above.

Advanced CMake

The Advanced CMake-based embedded projects were introduced in VisualGDB 5.5. They replace the Visual C++ project subsystem used in MSBuild projects with a CMake-based one that was specifically designed for embedded projects. It simplifies code reuse and provides Embedded-specific items in Solution Explorer.

The Advanced CMake support for embedded projects is relatively new. If you encounter strange behavior, please do not hesitate to contact our support.

GNU Make

The GNU Make-based projects are the very first project type supported by VisualGDB. We generally do not recommend using GNU Make for new projects, as it is considerably slower than MSBuild or CMake, does more rebuilding, and has more possible failure points.

We only advise using GNU Make if you are familiar with the Makefile syntax and would like to define custom Make targets.

If you are considering GNU Make in order to build projects outside VisualGDB, please see the stand-alone build support for MSBuild projects, or try using Advanced CMake instead.

You can find detailed documentation on Makefile-based projects here.