Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ learning_objectives:
prerequisites:
- Install [Keil Studio](/install-guides/keilstudio_vs/) on your machine.
- Install [µVision](/install-guides/mdk/) on your machine.
- Install [vcpkg](https://vcpkg.io/en/getting-started.html) for the command line flow.
- Install [uv2csolution](https://arm-software.github.io/MDK-Toolbox/01_installation/) for the command line flow.
- The µVision project must use Arm Compiler 6 as the default toolchain. Arm Compiler 5 is not supported.

author: Christopher Seidl
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ layout: learningpathall

![Successful conversion](./output_conversion.png)

1. The vcpkg configuration file is automatically activated. You notice an active "Environment" configuration in the **Status Bar** at the bottom:
1. The vcpkg configuration file is automatically activated. You notice a couple of "Arm Tools" available in the
**Status Bar** at the bottom:

![vcpkg activated](./vcpkg-activated.png)

1. Click on the **CMSIS** icon in the **Activity Bar**. The **Primary Side Bar** changes and shows the **CONTEXT**, **SOLUTION**, and **ACTIONS** for the project.

1. In the **ACTIONS** section, click on **Build**:
2. Click on the **CMSIS** icon in the **Activity Bar** to open the **CMSIS View**. At the top, click on the hammer icon to
build the project:

![CMSIS build](./cmsis-build.png)

1. The `cbuild` task starts. A successful project build will end with:
3. The `cbuild` task starts. A successful project build will end with:

```output
Program size: Code=... RO-data=... RW-data=... ZI-data=...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,90 +6,10 @@ weight: 4
layout: learningpathall
---

## Project conversion on the command line using vcpkg
## Project conversion on the command line

[vcpkg](https://vcpkg.io/en/index.html) is a free C/C++ package manager for acquiring and managing libraries. It runs on all platforms, build systems, and work flows. it is maintained by the Microsoft C++ team and open source contributors.
Follow the [instructions](https://arm-software.github.io/MDK-Toolbox/01_installation/) to install the `uv2csolution` tool on
your local machine. The tool is available for all major host operating systems (macOS, LInux, Windows).

In your favorite terminal application, change to the directory containing the uvprojx-based project.

1. If you have not done it before, install vcpkg (otherwise continue to step 2):

{{< tabpane code=true >}}
{{< tab header="Windows (cmd)" language="shell">}}
curl -LO https://aka.ms/vcpkg-init.cmd && .\vcpkg-init.cmd
{{< /tab >}}
{{< tab header="Windows (PowerShell)" language="shell">}}
iex (iwr -useb https://aka.ms/vcpkg-init.ps1)
{{< /tab >}}
{{< tab header="Linux/macOS" language="shell">}}
. < (curl https://aka.ms/vcpkg-init.sh -L)
{{< /tab >}}
{{< /tabpane >}}

1. Initialize vcpkg:

{{< tabpane code=true >}}
{{< tab header="Windows (cmd)" language="shell">}}
%USERPROFILE%\.vcpkg\vcpkg-init.cmd
{{< /tab >}}
{{< tab header="Windows (PowerShell)" language="shell">}}
. ~/.vcpkg/vcpkg-init.ps1
{{< /tab >}}
{{< tab header="Linux/macOS" language="shell">}}
. ~/.vcpkg/vcpkg-init
{{< /tab >}}
{{< /tabpane >}}

2. Update the Arm vcpkg registry (this will give you access to tools hosted by Arm):

```shell
vcpkg x-update-registry arm
```

3. Enable the `uv2csolution` conversion tool:

```shell
vcpkg use uv2csolution
```

4. Run the conversion (in this example, the project is called `MyProject.uvprojx`):

```shell
uv2csolution MyProject.uvprojx
```

This step generates the following files:
- `MyProject.csolution.yaml`
- `MyProject.cproject.yaml`
- `vcpkg-configuration.json`

5. Activate the vcpkg configuration (this will install all required tools on your machine):

```shell
vcpkg activate
```

5. Get an MDK-Community license:

```shell
armlm activate -product KEMDK-COM0 -server https://mdk-preview.keil.arm.com
```

5. [Optional] Check your license:

```shell
armlm inspect
```

6. Build the project:

```shell
cbuild MyProject.csolution.yaml --update-rte
```

A successful project build will end with:

```output
Program size: Code=... RO-data=... RW-data=... ZI-data=...
info cbuild: build finished successfully!
```
Follow the [command line usage instructions](https://arm-software.github.io/MDK-Toolbox/04_uv2csolution/) to convert
µVision projects to CMSIS solution projects.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.