Tutorial on Configuring MDK6 Environment on Windows
Software to prepare
- Keil MDK 5.3x and above
- The latest version of VScode
- CubeMX latest version
vcpkg Installation and Environment Setup
- Clone the vcpkg repository
https://github.com/microsoft/vcpkg/tree/master
git clone https://github.com/microsoft/vcpkg.git

- Generate the vcpkg program.



- Set up the environment

Click on Advanced System Settings.


Configure both user environment variables and system environment variables.



- test
vcpkg --version
As shown in the image below, the installation was successful.

Generate the project files.
- Open CubeMX and log in to your ST account.

- Install the Pack



- Configure the project


Open the project and configure the default compiler.
- Set the default compiler to ARMCLANG (AC6).


- Compilation verification

Download and activate the Keil MDK6 plugin.
- Open VScode

- Install the Keil Studio Pack plugin

- After installation, restart VSCode.
- Then two windows will pop up in the bottom right corner. Click to activate MDK6Community.


Displaying this notification means activation was successful.
Convert MDK5 project to MDK6 project
Click Convert to convert.

In the bottom right corner, install all the packages that need to be installed, and allow any prompts that appear.
When installing Packs, you need to ensure a good network environment (one with internet access to bypass restrictions).
This stage will last 5–20 minutes, so please wait patiently. (Depends on the speed of your proxy service.)
(These operations are only needed for the first run)

You can open the Task Manager to check if cmsis.exe is downloading normally. If there is network activity shown, it means the download is in progress — just wait for it to finish.

This survey can be skipped.

As shown in the figure, the installation was successful.

If the environment is not activated here, you need to activate it. (The image shows deactivating the environment.)

Click to convert the MDK5 project

This indicates that the conversion of the MDK6 project was successful.

Compile


As you can see, the size after compiling with KEIL MDK6 is exactly the same as after compiling with KEIL MDK5.
How to configure ST-Link and other debuggers on Windows?
Windows is even simpler—there's no need to download anything extra. As long as it works on MDK5, it will basically work on MDK6 as well.
Add device, select ST-Link.

