{{template>en:templates:tabs_yocto_bootstrap_mc|product_type="Embedded module"|lang="en"|mod_name="tqma117xl"|mod_name_head="TQMa117xL"|mod_arch="arm"}} ===== Building Examples (Visual Studio Code) ===== THIS PAGE IS WORK IN PROGRESS These instructions currently refer to building on an Ubuntu 24.04 system. Further information about building on Windows can be found in the GitHub repository linked in the table below. ==== Preface ==== **The following instructions describe how to build an example vith Visual Studio Code.** The instructions on this page refer to the TQMa117xL repository and ancillary tools listed in the following table: ==== Prerequisites ==== ^ Tool ^ Version ^ ^ GitHub Repository | [[https://github.com/tq-systems/MBa117xL.SW.MCU.BSP | MBa117xL.SW.MCU.BSP]] | ^ [[https://code.visualstudio.com/Download|VS-Code]] | Version 1.88.1 | ^ [[https://github.com/nxp-mcuxpresso/mcux-sdk|NXP's MCUXpresso SDK]] | MCUX_2.14.0_UPDATE_ENHC1 | ^ [[https://cmake.org/download/|CMAKE]] | Version 3.27.4 | ^ [[https://pypi.org/project/west/|West]] | Version 1.0.0 | ^ [[https://www.python.org/downloads/|Python]] | Version 3.10.4 | ^ [[https://www.segger.com/downloads/jlink/|Segger J-Link for debugging]] | Version v7.92l | ^ Download MinGW for Windows | v13.1.0 | In order to build and debug the examples via VS-Code you need to add the following VS-Code extentions. ^ Extention ^ Version ^ ^ ms-vscode.cmake-tools | CMake tools (from Microsoft): v1.16.3 | ^ marus25.cortex-debug | Cortex-Debug (from marus25): v1.12.0 | Advice: Check if the 'Status-Bar-Visibility' option by the CMAKE extention is set to 'visible'. === Setup Host System and VS-Code === 1. Install Python3 (needed for west and helper scripts) sudo apt install python3 python3-pip python3-venv -y 3. Setup Virtual Enviroment python3 -m venv ~/mba117xl-env source ~/mba117xl-env/bin/activate 2. Install Arm GNU Toolchain Download from: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads sudo apt install gcc-arm-none-eabi 3. Install CMake sudo apt install cmake -y 4. (Optional) Install SEGGER J-Link for Debugging === Setup Project === Take a look at [[https://support.tq-net.de/en/arm/tqma117xl/overview#structure-of-repository|Structure of Repository]] **Clone the TQMa117xL demo repository:** mkdir -p ~/workspace/NXP cd ~/workspace git clone https://https://github.com/tq-systems/MBa117xL.SW.MCU.BSP.git cd MBa117xL.SW.MCU.BSP git checkout MBa117xL.SW.MCU.BSP.0003 -b tqma117xl-bsp \\ **Clone NXP MCUXpresso SDK via West:** pip3 install west cd dependencies west init -m https://github.com/NXPmicro/mcux-sdk --mr MCUX_2.16.000 mcuxsdk cd mcuxsdk west update Afterwards, copy replace_include_guards.py into the same directory as the mcuxsdk.\\ **ATTENTION: This step is absolutely necessary!** cp ../replace_include_guards.py ./ After downloading the SDK from NXP using West, the Python script replace_include_guards.py must be run once. This is required because targets set to global cannot be built in the same build folder due to the existing include guards in the CMake files in the NXP SDK. cd .. python3 replace_include_guards.py \\ **VS-Code additional step:** \\ When using Visual Studio Code as your development environment, the `.vscode` folder plays a critical role in configuring how your project is built and debugged. These files inside the `.vscode` folder are **specific to your local development environment**. .vscode/ ├── settings.json → Environment vars and toolchain path ├── launch.json → Debug configuration (e.g. for J-Link) ├── cmake-variants.yaml → Build variants (Debug/Release + bootDisk) Place the `.vscode` folder under: mv ~/workspace/MBa117xL.SW.MCU.BSP/templates .vscode You can use the templates provided in the `templates/` folder of the repository as a starting point. **Open VS-Code** code . ==== Building examples ==== {{ :en:arm:step_1.webp |}} [github_markdown url="https://raw.githubusercontent.com/tq-systems/MBa117xL.SW.MCU.BSP/main/README.md" section="Building Target"] The information provided on this wiki page is subject to change due to circumstances beyond our control. While we strive to keep all details as accurate and up-to-date as possible, it is possible that certain updates or changes may go unnoticed for some time. As a result, some sections of this page may contain outdated information. If you notice any mistakes in the documentation, we kindly ask you to inform the TQ Support through our ticket system.