Keil Logo

µVISION: Project fails to build after upgrading MDK


Information in this knowledgebase article applies to:

  • Keil MDK

SYMPTOM

Previously I have archived a Keil MDK project, built free of errors and warnings. The project has been well tested before being archived.

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

What is the reason why just upgrading Keil MDK can cause an archived project to fail to build?

CAUSE

Upgrading Keil MDK generally brings newer IDE features, debug functionalities, drivers for debugging 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 failing to build an existing project:

  • Arm Compiler 5 and 6
  • Arm::CMSIS Pack
  • Arm::CMSIS-Driver Pack
  • Keil::Middleware Pack
  • Keil::ARM_Compiler (Keil Arm compiler extensions)

When a project is archived with 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 Keil 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.

RESOLUTION

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

In µVision Options for Target - Target - Code Generation, a specific compiler version should be selected. For instance, if Arm Compiler 5.06 u6 is used in the project, it should be selected 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 Keil 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 Keil MDK 4.x versions, in order to open Keil MDK 4.x projects in Keil MDK 5.x, the legacy support pack needs to be installed into the same installation directory of the Keil MDK 5.x. The old Arm compiler used in the archived Keil MDK 4.x project needs to be manually installed and integrated into the current Keil MDK 5.x by following this Application Note 267: Update ARM Compilation Tools.

STATUS

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

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, November 6, 2020


Did this article provide the answer you needed?
 
Yes
No
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.