How to use the latest Keil 5 for Keil 4 projects (.uvproj)

As many have noticed, Keil 5 does not have native support for Keil 4 projects (project files ending with uvproj), it only has native support for Keil 5 projects (project files ending with uvprojx). However, many of the examples provided in older versions of nRF51 SDK are only supported by Keil 4, i.e. only contain Keil 4 projects. Also, many of the examples available on Nordic Github contain only Keil 4 project. It is however possible to to make Keil 5 support both Keil 5 and Keil 4 projects. These are the step to follow:

  1. Install the latest KEil MDK-ARM v5, version 5.14 when this is written
  2. Install the nRF_MDK_7_1_1.msi
  3. Install the Keil 5.14 legacy support

Now you should be able to run all Keil 5 and Keil 4 projects with Keil 5.14. Keil 5.14 has native support for packs, which were supported from nRF51 SDK 7. If you have a project compatible with SDK 6 or older, or if you have other custom projects, the easiest way is to download the nRF51 SDK zip version of interest (not packs) from developer.nordicsemi.com and place your project inside the zip folder structure. Then double click the project to open it in Keil 5.14

If the project that you are interested in is not made for the development board you have, change the compiler defines in the project as described on this thread. The board codes are as follows:

nRF51-DK: BOARD_PCA10028
nRF51-Dongle: BOARD_PCA10031
nRF51822 evaluation kit: BOARD_PCA10001
nRF51422 evaluation kit: BOARD_PCA10003
nRF51822/nRF51422 development kit: BOARD_NRF6310