Keil Logo

µVISION: Project fails to build after upgrading MDK

Information in this knowledgebase article applies to:

  • MDK v4.x and v5.x


Previously I have archived a MDK project, which could be built free of error and warning. The project has been well tested before being archived.

After a few years now I need to reopen this project within a newer MDK version for further maintenance. However, without modifying anything of this archived project, the project fails to build with many compilation and linking errors.

What is the reason why only upgrading MDK could cause an archived project to fail to build?


Upgrading MDK generally brings newer IDE features, debug functionalities, drivers for debug adapters and bug fixes to MDK µVision IDE, which shouldn't have an impact on building an existing project. But on the other hand the following components are usually upgraded together with a newer MDK version, which could lead to fail building an existing project:

  • Arm compiler toolchain v5.x and v6.x
  • Arm::CMSIS Pack
  • Arm::CMSIS-Driver Pack
  • Keil::Middleware Pack
  • Keil::ARM_Compiler (Keil Arm compiler extensions)

When a project is archived in a way that the option "Use Default compiler version 5" or "Use Default compiler version 6" is selected in "Options for Target - Target - Code Generation", or the option "Use latest versions of all installed Software Packs" is enabled in "Select Software Packs for Target..." dialog in µVision, upgrading MDK to a newer version in this case could cause the change of the build environment, in which a newer version of compiler and linker is used or a newer version of Software Pack, such as the RTOS included in the Arm::CMSIS Pack, Keil::Middleware Pack, is built together with the project.


When archiving a project, it is important to properly document the detailed version of different software components used in the project together with the MDK version.

In µVision "Options for Target - Target - Code Generation", a specific compiler version should be selected. For instance, if Arm compiler v5.06 u6 compiler toolchain is used in the project, it should be selected explicitly as shown in the following figure:

In "Select Software Pack..." dialog in µVision, the option "Use latest versions of all installed Software Packs" should be disabled, and all Software Packs used in the project, especially the Device Family Pack (DFP), should be marked as "Fixed" with the corresponding Pack versions, as shown in the following figure:

In this way the entire build environment and project settings are fixed and archived in the µVision project files *.uvprojx and *.uvoptx. When the project is opened later on within a newer MDK version, all specific Software Packs together with the specific Arm compiler toolchain version originally used in the project are required to be installed by µVision automatically.

Moreover, if the archived project was developed using the old MDK v4.x versions, in order to open MDK v4.x projects in MDK v5.x, the legacy support pack needs to be installed into the same installation directory of the MDK v5.x. The old Arm compiler toolchain used in the archived MDK v4.x project needs to be manually installed and integrated into the current MDK v5.x by following this Application Note 267: Update ARM Compilation Tools.


If you need further assistance, please contact technical support via this link.



Last Reviewed: Monday, August 26, 2019

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.