Dependency Installation - nxp-mcuxpresso/vscode-for-mcux GitHub Wiki
In addition to the extension itself, some extra tools and software components are required for the full development flow within VS Code.
All of these dependencies are managed by the MCUXpresso Installer tool, designed to guide you through the installation process. When clicking Open MCUXpresso Installer from QUICKSTART PANEL view, if the extension does not find it, it automatically downloads and starts the tool.
Alternatively, you can download MCUXpresso Installer tool from the following links:
After installation, the Installer layout can be found in the following locations:
- Windows: %userprofile%\AppData\Local\Programs\MCUXpressoInstaller
- Linux: $HOME/MCUXpressoInstaller
- macOS: The Installer is a disk image file (.dmg) and can be easily mounted in /Applications by dragging and dropping the Installer icon
Note: On Linux systems, the Installer requires admin rights to configure the necessary permissions for the application.
This provides options to install:
- Python/west to run scripts and understand complex repositories;
- git for the ability to clone source repositories and add version control;
- ninja, cmake for build process infrastructure;
- Zephyr SDK minimal bundle if you want to develop applications based on Zephyr. Also, some additional libraries and tools are required for build process;
- GNU Arm Toolchain if you want to develop applications based on MCUXpresso SDK; on top of the toolchain, additional NXP libraries and headers are provided to facilitate various extra features like semihosting stubs, macros to create MTB support (for Cortex M0+), macros to allow code/data to be placed into alternate memory banks, etc;
- LinkServer, Segger J-Link and PEmicro debug probes software support;
- MCUXpresso Configuration Tools to allow developers to quickly build a custom SDK and leverage pins, clocks and peripherals to generate initialization C code or register values for custom board support.
- MCUXpresso SEC Secure Provisioning Tool to simplify generation and provisioning of bootable executables on NXP MCU devices.
- GUI Guider HMI design tool for embedded GUI and host-side FreeMASTER visualization design using LVGL.
- FreeMASTER tool for real-time debug monitor that enables runtime visualization and control of application variables.
MCUXpresso Installer involves a few steps, aiming to install (or upgrade to a minimal required version) the dependencies.
You can select one or multiple items from the available list. Once at least one package is selected, the two top-right buttons "Install" and "Show details" become enabled.
The "Install" button installs all components from selected packages that do not already exist at the required minimal versions.
Clicking the "Show details" button opens a panel on the right side, displaying all components from the selected packages.
The component list is interactive. Individual components can be added or removed to customize the toolset to be installed. Selection can include one, multiple, or all components across one or more packages.
The "Install" button operates on the customized list of components, not on the full package bundles.
When one or more components are selected or deselected, the corresponding parent package is marked as partially selected (indeterminate state). When all components within a package are selected or deselected, the parent package is automatically marked as selected or deselected, respectively. Similarly, when a package is selected or deselected, all of its components are selected or deselected accordingly.
Component dependencies across packages are managed automatically. Some components (e.g. Git, Python) appears in multiple packages (e.g. Zephyr Developer, MCUXpresso SDK Developer). Their selection states are synchronized — selecting or deselecting one, mirrors the change in the others. If a full package is selected, its components are also selected in other packages where they are present.
Special case: to avoid inconsistencies, when a package is deselected, its components are deselected only within that package - they remain unchanged in other packages.
The detailed panel is shown when the user clicks "Show details", and hidden when the "Hide details" button is clicked.
- MCUXpresso SDK Developer - it contains necessary dependencies for users targeting to develop applications based on MCUXpresso SDK.
-
Zephyr Developer - aims to create an environment for Zephyr RTOS based applications. Pip, west and other Python requirements are installed in a Python virtual environment located on:
- Windows: %userprofile%/.mcuxpressotools/.venv
- Linux and macOS: $HOME/.mcuxpressotools/.venv
- Matter Developer - includes the necessary components that must be installed to set up a development environment for Matter applications.
The steps performed by the Installer to create a development environment for Zephyr can be manually run:
Windows:
- Open a cmd.exe terminal window
- Create a virtual environment:
python -m venv %userprofile%/.mcuxpressotools/.venv
- Activate the virtual environment:
%userprofile%/.mcuxpressotools/.venv/Scripts/activate.bat
- Install pip
python -m ensurepip --upgrade
- Install west:
pip install west --upgrade
- Zephyr’s requirements files declare additional Python dependencies. Download and install the requirements using pip.
wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-base.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-build-test.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-compliance.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-extras.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-run-test.txt pip install -r ./requirements.txt
Linux:
- Use apt to install Python venv package:
sudo apt install python3-venv
- Create a virtual environment:
python3 -m venv $HOME/.mcuxpressotools/.venv
- Activate the virtual environment:
source $HOME/mcuxpressotools/.venv/bin/activate
- Install pip
python -m ensurepip --upgrade
- Install west:
pip install west --upgrade
- Zephyr’s requirements files declare additional Python dependencies. Download and install the requirements using pip.
wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-base.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-build-test.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-compliance.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-extras.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-run-test.txt pip install -r ./requirements.txt
macOS:
- Create a virtual environment:
python3 -m venv $HOME/.mcuxpressotools/.venv
- Activate the virtual environment:
source $HOME/.mcuxpressotools/.venv/bin/activate
- Install pip
python -m ensurepip --upgrade
- Install west:
pip install west --upgrade
- Zephyr’s requirements files declare additional Python dependencies. Download and install the requirements using pip.
wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-base.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-build-test.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-compliance.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-extras.txt wget https://github.com/zephyrproject-rtos/zephyr/tree/<revision>/scripts/requirements-run-test.txt pip install -r ./requirements.txt
- Arm GNU Toolchain - toolchain for MCUXpresso SDK development plus NXP extension pack used to provide extra functionalities (i.e. additional runtime libraries, semihosting, trace, multicore, etc.).
- Standalone Toolchain Add-ons - NXP toolchain extension pack used to provide extra functionalities that can be used on top of an Arm GNU Toolchain distribution (i.e. runtime libraries, semihosting, trace, multicore, etc.). Although it is built and tested with a particular baseline version of Arm GNU Toolchain (which also gives this pack version number) it can be also copied on top of a user custom Arm GNU Toolchain version in order to benefit on all provided MCUXpresso for VS Code extension functionalities. To achieve this, be sure the content of this archive is unzipped and copied on top of the desired Arm GNU Toolchain root installed file layout.
- LinkServer - GDB server and low level debug utilities for NXP debug probes.
- Segger J-Link - software pack for J-Link debug probes.
- PEmicro - PEmicro's GDB Server to debug supported NXP ARM Cortex-M processor targets
- MCUXpresso Configuration Tools - pin, clock, peripheral, memory and trusted execution configuration utilities.
- MCUXpresso Secure Provisioning Tool - GUI and utilities for securing application code and provisioning devices.
- GUI Guider - HMI design tool for embedded GUI and host-side FreeMASTER visualization design using LVGL.
- FreeMASTER - Real-time debug monitor that enables runtime visualization and control of application variables.
Each package and component indicates with a colored badge its update status as following:
-
(green badge): package or component is up to date. Tooltip indicates the installed version of component or, in case of package, the installed version for each component.
-
(gray badge): package or component missing. Tooltip indicates each component, its status and installed version. If this component or package is needed, select it and install it.
-
(yellow badge): package or component with an older version than the latest one available. Tooltip indicates component installed version and newer available version. If this component is intended to be used, it is recommended to update it. In case of package, the tooltip indicates which components have available updates.
-
(red badge): package or component does not meet minimum required version. Tooltip indicates component installed version and required version. If this component is intended to be used, it is highly recommended to update it. In case of package, the tooltip indicates which components need to be updated.
Once the installation process starts, a console with a progress bar displays the status and execution details. The colored badge status is also updated at the end of installation process.
The console output displays details of where a tool is downloaded from and also where it is installed.
If the Installer has updated the environment variables, then a pop-up alerts the user that a VS Code extension restart is needed to reflect the updated environment variables.
In case of errors, the console reports the encountered issues. If the cause of error can be fixed by user, pressing again the "Install" button restarts the previous component selection. The installer skips previously installed components after finding the minimal version exists.
A check for component updates is available on toolbar, forcing a rescan of installed tools.
A context menu is available within the console area, to allow Select All / Copy and Clear operations over the generated log.
All operations are also available as keyboard shortcuts:
- Select All - Ctrl + A
- Copy - Ctrl + C
- Clear - Ctrl + X
The Undo latest installation feature offers the possibility to automatically revert the components installed during the latest installation process.
Revert : Completely uninstall the specified component, maintaining the older versions of the component, which already existed prior to the latest installation process.
The components able to maintain the older version are the ones installed under the%USERPROFILE%(or $HOME on Unix systems)/.mcuxpressotools
location (such as ARM GNU Toolchain, CMake), or standalone tools which have individual installation locations for each version (such as LinkServer, MCUXpresso Config Tools).
Global components or components which have a single location which is overwritten upon version update (such as Git, 7-Zip, PEMicro) cannot maintain the previously installed version upon uninstall.
The PATH environment variable is also returned to its value prior to the latest installation process, if applicable.
The action can be triggered via the Undo latest installation button, located under the MCUXpresso Installer's drop-down menu.
Upon successfully completing a component installation, the button becomes active.
Upon clicking the button, the user is prompted with the list of components which were successfully installed during the latest installation process.
Upon pressing Continue, the undo process begins for the specified components.
Note: Some components (such as Git, 7-Zip, Python, pip, west, Python dependencies) currently present in the installation list are not influenced by the undo operation, as automatically tempering with these components can damage the global environment.
After the completion of the undo process, a list of such components is presented to the user in the form of a warning pop-up message.
These components can be manually removed by the user.
From the top toolbar, user can switch between dark and light themes.