Set Up the VS Code environment#
General Requirements#
Install Visual Studio Code for your operating system of choice here: https://code.visualstudio.com/Download
Install Git if you haven't already
Windows Only Enable git to use LF instead of CLRF by default:
git config --global core.autocrlf false
Git clone the Silicon Labs Matter repository here: https://github.com/SiliconLabs/matter
Launch Visual Studio Code, and open the cloned folder
When prompted to "install recommended extensions" please select "Install"
Recommended Extensions can be found here
Ensure the following extensions are installed:
C/C++ Extension Pack - language support for C/C++
Python - language support for Python
Cortex-Debug - GDB debugger support
ARM GCC Toolchain (https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads) - required arm-none-eabi tools
J-Link Software Tools - required J-Link GDB Server for J-Link-based debuggers (https://www.segger.com/downloads/jlink)
Python - (https://www.python.org/downloads/)
Installing prerequisites on macOS#
On macOS, you must install Xcode from the Mac App Store. The remaining dependencies can be installed and satisfied using Brew:
$ brew install openssl pkg-config
However, that does not expose the package to pkg-config
. To fix that, run
something like the following:
Intel:
$ cd /usr/local/lib/pkgconfig ln -s ../../Cellar/openssl@1.1/1.1.1g/lib/pkgconfig/* .
where openssl@1.1/1.1.1g
may need to be replaced with the actual version of
OpenSSL installed by Brew.
Apple Silicon:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/opt/homebrew/opt/openssl@3/lib/pkgconfig"
Note: If using MacPorts,
port install openssl
is sufficient to satisfy this dependency.
Mac OS (Apple Silicon) Users#
These requirements are are needed for Mac OS (Apple Silicon) in addition to those mentioned above.
Add ARM GCC toolchain to the search path within
bootstrap.sh
by adding this line of code:$ export PATH="/Applications/ARM/bin:$PATH"
Users may also have to specify which
pkg-config
/openssl
to use by adding these lines of code as well:$ export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
$ export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
Installing prerequisites on Linux#
On Debian-based Linux distributions such as Ubuntu, these dependencies can be satisfied with the following:
$ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
Bootstrapping your source tree (one time)#
Under the "Terminal" menu (or using shortcut Ctrl+shift+p), select "Run Task..."
Select the "Bootstrap" task