MCUXpresso SDK
The MCUXpresso SDK has been reengineered to make use of CMake and Kconfig. This article will demonstrate how to use the SDK in VS Code.
*Note: The SDK has switched to CalVer versioning convention.
*Note: The SDK will contain previews of possible changes for a later release. The previews are available for early evaluation but are not intended to substitute a release.
Importing the SDK
Navigate to the QUICKSTART PANEL in the MCUXpresso for VS Code extension. Click on Import Repository. Select the REMOTE option if you have not yet obtained the SDK. Designate a destination to save locally in the Location field.
Select the latest release of the MCUXpresso SDK in the Repository field. The latest version for this walkthrough is MCUXpresso SDK - 24.12.00. Select the main revision in the Revision field.
Note: The SDK can be cloned directly from GitHub. Select the Local option to import if you've already obtained the SDK.
Importing an example project
The process of importing a project into MCUXpresso for VS Code does not vary from previous versions. To do so, simply use the Import Example from Repository option.
Exploring the CMake format
You will notice several folders when navigating the SDK directory. To examine the CMake project format, let's take a look at the led_blinky_peripheral project. This project is found in examples/demo_apps/led_blinky_peripheral. In this directory, you will find generic project files including the CMakeLists file.
For example, the file that holds the main function in this example project can reference different board files and their respective peripherals.
The files are generic to allow reusability and support for many other devices. This reduces the overall size of the SDK. The CMakeLists file is used to specify the device and project options for the build. In another article, we will cover how the variables in the CMakeLists files are referenced when a build for a specific device is initiated. For now, let's take a look at structure of the file.
You'll notice that the variables in this file are generic and will be referenced later for the build. For example, the following two variables are needed for the build system to know which board to build for and where to reference the files.
Once the build is initiated all the necessary files will be drawn in to the project.