Prerequisites
Download and install the prerequisite software, and make sure they are set in your system path.
-
HighTec LLVM Toolchain version 7.1.2 or later.
-
Visual Studio Code (Download VS Code).
-
CMake version 3.25.2 or later (Download CMake).
-
Ninja version 1.11.1 or later (Download Ninja).
Setup
-
Open VS Code and navigate to extensions.
-
Search for CMake and install the extensions CMake, CMake Tools, and CMake Language Support.
-
You also need the extension "clangd".
-
To import the BSP example into VS Code, click File → Open Folder and navigate to the root folder of the BSP example. The project will not be in your Explorer view.
-
Navigate back to Extensions → CMake Tools → Extension Settings → click workspace and scroll down to find Cmake Configure Args. Add the argument: "-DCMAKE_TOOLCHAIN_FILE=clang-tricore-tc18-none-eabi.cmake", without double quotes.
Building and Running your Project
-
Type CTRL + SHIFT + P to open a command palette, type cmake to filter and click CMake: Configure. The first time you do this it will give you the option to choose a toolchain. If your desired toolchain does not appear, choose the option to scan and it should appear.
-
After choosing CMake: Configure, the project will be configured, you can then choose CMake: Build to build the project.