### Build Hello World Example (Secure-Only) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/arm/mps2/doc/mps2_an521.rst Builds the 'hello_world' sample application as a secure-only firmware for the MPS2+ AN521 board using the Zephyr build system. ```bash west build -b mps2/an521 samples/hello_world ``` -------------------------------- ### Setup Zephyr Development Environment on Ubuntu (Virtual Environment) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Guides through setting up the Zephyr development environment on Ubuntu using a Python virtual environment. It covers installing the 'venv' package, creating and activating a virtual environment, installing 'west', cloning Zephyr, and installing Python dependencies. ```bash sudo apt install python3-venv python3 -m venv ~/zephyrproject/.venv source ~/zephyrproject/.venv/bin/activate pip install west west init ~/zephyrproject cd ~/zephyrproject west update west zephyr-export pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt ``` -------------------------------- ### Building and Running Zephyr Samples Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/west/build-flash-debug.rst Demonstrates how to build a specific sample ('hello_world') for a given board ('qemu_x86') and then run it. This is a fundamental command for testing and development. ```bash west build -b qemu_x86 -t run samples/hello_world ``` -------------------------------- ### Setup Zephyr Development Environment on Ubuntu (Global Install) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Details the process of setting up the Zephyr development environment on Ubuntu with a global installation of 'west'. It includes installing 'west' via pip, updating the PATH environment variable, cloning Zephyr, exporting the CMake package, and installing Python dependencies. ```bash pip3 install --user -U west echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc source ~/.bashrc west init ~/zephyrproject cd ~/zephyrproject west update west zephyr-export pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt ``` -------------------------------- ### Build and Flash Hello World Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/u-blox/ubx_evkninab3/doc/index.rst This command sequence builds and flashes the 'hello_world' sample application to the ubx_evkninab3/nrf52840 board using Zephyr's application commands. It assumes the necessary build and flashing tools are configured. ```bash :zephyr-app: samples/hello_world :board: ubx_evkninab3/nrf52840 :goals: build flash ``` -------------------------------- ### Install Homebrew Package Manager (macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs the Homebrew package manager on macOS. Homebrew is used to easily install the required dependencies for the Zephyr project. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Build and Flash Hello World Application Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/nucleo_l552ze_q/doc/nucleol552ze_q.rst Builds and flashes the 'hello_world' sample application to the Nucleo L552ZE Q board using Zephyr's application commands. Assumes the Zephyr SDK and toolchain are set up. ```console west build -b nucleo_l552ze_q samples/hello_world west flash ``` -------------------------------- ### Install Zephyr Project Requirements (Bash) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs the necessary Python packages for the Zephyr project using pip. It reads dependencies from a requirements file located in the Zephyr installation directory. ```bash pip3 install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt ``` -------------------------------- ### Install Zephyr Dependencies (macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs required development tools and libraries for the Zephyr project on macOS using Homebrew. Includes cmake, ninja, python3, ccache, and others. ```bash brew install cmake ninja gperf python3 ccache qemu dtc libmagic wget openocd ``` -------------------------------- ### Build and Flash Hello World Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/nucleo_l432kc/doc/index.rst This command sequence builds and flashes the 'hello_world' sample application to the nucleo_l432kc board using Zephyr's build system. Ensure the Zephyr SDK and necessary tools are installed. ```console minicom -D /dev/ttyACM0 zephyr-app --zephyr-app samples/hello_world --board nucleo_l432kc --goals build flash ``` -------------------------------- ### Build and Flash hello_world Sample (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/gd/gd32f403z_eval/doc/index.rst Commands to build and flash the 'hello_world' sample application for the gd32f403z_eval board using the west tool. This process requires the Zephyr development environment to be set up correctly. ```bash west build -b gd32f403z_eval samples/hello_world west flash -r gd32isp [--port=/dev/ttyUSB0] ``` -------------------------------- ### Update and Upgrade OS Packages (Ubuntu) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Updates the package list and upgrades installed packages on Ubuntu systems. This is a prerequisite for installing new software and ensuring the system is up-to-date. ```bash sudo apt update sudo apt upgrade ``` -------------------------------- ### Build Hello World for Native Simulation (Zephyr App Commands) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/beyond-GSG.rst Builds the 'hello_world' sample application for native simulation on a Linux host. This allows running the application directly on the host system without hardware. ```zephyr-app-commands :zephyr-app: samples/hello_world :host-os: unix :board: native_sim :goals: build ``` -------------------------------- ### Install Zephyr Globally (Linux/macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs Zephyr and its dependencies globally on Linux or macOS. This method installs 'west' and Python requirements system-wide. It involves installing 'west', fetching Zephyr source code, exporting the CMake package, and installing Python requirements. ```bash pip3 install -U west west init ~/zephyrproject cd ~/zephyrproject west update west zephyr-export pip3 install -r ~/zephyrproject/zephyr/scripts/requirements.txt ``` -------------------------------- ### Install Zephyr Globally (Windows) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs Zephyr and its dependencies globally on Windows using the command prompt. This method installs 'west' and Python requirements system-wide. It involves installing 'west', fetching Zephyr source code, exporting the CMake package, and installing Python requirements. ```bat pip3 install -U west cd %HOMEPATH% west init zephyrproject cd zephyrproject west update west zephyr-export pip3 install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt ``` -------------------------------- ### Build and Flash Hello World Application Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/nucleo_g431rb/doc/index.rst Builds and flashes the 'hello_world' sample application to the Nucleo G431RB board using Zephyr's west tool. This is a standard procedure for testing application deployment. ```shell west flash --zephyr-app samples/hello_world --board nucleo_g431rb ``` -------------------------------- ### Build and Flash Hello World Application for STM32H7S78-DK Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/stm32h7s78_dk/doc/index.rst This snippet demonstrates the Zephyr application commands to build and flash the 'hello_world' sample application onto the STM32H7S78-DK board. It assumes the application is located in the 'samples/hello_world' directory and the target board is 'stm32h7s78_dk'. The output 'Hello World! stm32h7s78_dk' should be visible on the console after successful flashing. ```console $ minicom -D /dev/ttyACM0 .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32h7s78_dk :goals: build flash ``` -------------------------------- ### Install Zephyr Dependencies (Ubuntu) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs essential development tools and libraries required for the Zephyr project on Ubuntu using the apt package manager. Includes git, cmake, ninja, python3, and more. ```bash sudo apt install --no-install-recommends git cmake ninja-build gperf \ ccache dfu-util device-tree-compiler wget \ python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 ``` -------------------------------- ### Build and Run Hello World with QEMU Emulation (Zephyr App Commands) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/beyond-GSG.rst Builds and runs the 'hello_world' sample application using QEMU for x86 emulation. This command is part of the Zephyr SDK's application command interface. ```zephyr-app-commands :zephyr-app: samples/hello_world :host-os: unix :board: qemu_x86 :goals: build run ``` -------------------------------- ### Install Zephyr in Virtual Environment (Linux/macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs Zephyr and its dependencies within a Python virtual environment on Linux or macOS. This isolates project dependencies. It involves creating and activating the environment, installing 'west', fetching Zephyr source code, exporting the CMake package, and installing Python requirements. ```bash python3 -m venv ~/zephyrproject/.venv source ~/zephyrproject/.venv/bin/activate pip install west west init ~/zephyrproject cd ~/zephyrproject west update west zephyr-export pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt ``` -------------------------------- ### Build and Flash Hello World App (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/atmel/sam/sam_e70_xplained/doc/index.rst Build and flash the 'hello_world' sample application to the SAM E70 Xplained board using the `zephyr-app-commands` utility. This command handles the build and flashing process for the specified board. ```bash west build -b sam_e70_xplained/same70q21 samples/hello_world west flash ``` -------------------------------- ### Install Zephyr in Virtual Environment (Windows) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs Zephyr and its dependencies within a Python virtual environment on Windows using the command prompt. This isolates project dependencies. It involves creating and activating the environment, installing 'west', fetching Zephyr source code, exporting the CMake package, and installing Python requirements. ```bat cd %HOMEPATH% python -m venv zephyrproject\.venv zephyrproject\.venv\Scripts\activate.bat pip install west west init zephyrproject cd zephyrproject west update west zephyr-export pip install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt ``` -------------------------------- ### Build and Flash Hello World Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/raytac/mdbt53v_db_40/doc/index.rst This command sequence demonstrates how to build and flash the 'hello_world' application onto the raytac_mdbt53v_db_40_nrf5340 board using Zephyr's build system. Ensure the Zephyr environment and necessary tools are set up. ```console west build -b raytac_mdbt53v_db_40_nrf5340 samples/hello_world west flash ``` -------------------------------- ### Configure Homebrew Python Path (macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Adds the Homebrew Python installation directory to the PATH environment variable. This allows `python`, `pip`, `python3`, and `pip3` commands to be executed correctly. ```bash (echo; echo 'export PATH="$(brew --prefix)"/opt/python/libexec/bin:$PATH"') >> ~/.zprofile source ~/.zprofile ``` -------------------------------- ### Build and Flash hello_world Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/u-blox/ubx_bmd360eval/doc/index.rst This snippet demonstrates how to build and flash the 'hello_world' application for the ubx_bmd360eval/nrf52811 board using Zephyr's application commands. It assumes the necessary Nordic Segger software is installed and configured. ```console $ minicom -D -b 115200 zephyr-app-commands:: :zephyr-app: samples/hello_world :board: ubx_bmd360eval/nrf52811 :goals: build flash ``` -------------------------------- ### Install Zephyr Dependencies on Windows using Chocolatey Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Installs essential development tools for Zephyr on Windows using the Chocolatey package manager. This includes CMake, Ninja, Python 3.11, Git, DTC, and others. Ensure you run the command prompt as an Administrator. ```bat choco feature enable -n allowGlobalConfirmation choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' choco install ninja gperf python311 git dtc-msys2 wget 7zip ``` -------------------------------- ### Debug Hello World Application on BLACK_F407ZG_PRO Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/others/black_f407zg_pro/doc/index.rst This command sequence builds and debugs the 'hello_world' sample application on the BLACK_F407ZG_PRO board. It uses the Zephyr build system and the ST-LINK/V2 debugger for interactive debugging. The '--maybe-skip-config' flag is used to potentially skip configuration steps if not needed. ```bash west build -b black_f407zg_pro samples/hello_world west debug ``` -------------------------------- ### Verify Zephyr Dependency Versions (Ubuntu) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Checks the installed versions of CMake, Python 3, and the Devicetree compiler (dtc) on Ubuntu. This helps ensure that the versions meet the minimum requirements for the Zephyr project. ```bash cmake --version python3 --version dtc --version ``` -------------------------------- ### Build and Flash Hello World Application on Nucleo H533RE Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/nucleo_h533re/doc/index.rst This example demonstrates how to build and flash the 'hello_world' application to the Nucleo H533RE board using Zephyr's build system. It requires the Zephyr SDK and the specified board configuration. ```zephyr-app-commands :zephyr-app: samples/hello_world :board: nucleo_h533re :goals: build flash ``` -------------------------------- ### Install Python Modules for AutoPTS Server Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/connectivity/bluetooth/autopts/autopts-linux.rst Installs necessary Python modules for the AutoPTS server on a Windows virtual machine. This is done after cloning the AutoPTS repository. ```bash cd auto-pts pip3 install --user wheel pip3 install --user -r autoptsserver_requirements.txt ``` -------------------------------- ### Build and Flash Hello World Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/u-blox/ubx_bmd330eval/doc/index.rst This snippet demonstrates how to build and flash the 'hello_world' application for the ubx_bmd330eval board using Zephyr. It assumes the necessary Nordic Segger tools are installed and configured. ```console $ minicom -D -b 115200 zephyr-app-commands:: :zephyr-app: samples/hello_world :board: ubx_bmd330eval/nrf52810 :goals: build flash ``` -------------------------------- ### Run AutoPTS Server Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/connectivity/bluetooth/autopts/autopts-linux.rst Command to start the AutoPTS server. By default, it runs on the localhost address. ```python python ./autoptsserver.py ``` -------------------------------- ### Build and Flash Hello World Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/mikroe/mini_m4_for_stm32/doc/mikroe_mini_m4_for_stm32.rst Example Zephyr application commands to build and flash the 'hello_world' sample application onto the mikroe_mini_m4_for_stm32 board. This demonstrates the basic workflow for developing applications on this board. ```bash west build -b mikroe_mini_m4_for_stm32 samples/hello_world west flash ``` -------------------------------- ### Install socat and Python Modules for AutoPTS Client Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/connectivity/bluetooth/autopts/autopts-linux.rst Installs necessary system packages (socat) and Python modules required for the AutoPTS client on Linux. Socat is used for transferring BTP data streams. ```bash sudo apt-get install python-setuptools socat cd auto-pts pip3 install --user wheel pip3 install --user -r autoptsclient_requirements.txt ``` -------------------------------- ### Build and Flash hello_world Application for nRF9151 DK Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/nordic/nrf9151dk/doc/index.rst This snippet demonstrates the Zephyr application commands to build and flash the 'hello_world' sample application onto the nRF9151 DK board. Ensure you have followed the Nordic Segger setup instructions prior to execution. ```bash minicom -D -b 115200 zephyr-app-commands --zephyr-app samples/hello_world --board nrf9151dk/nrf9151 --goals build flash ``` -------------------------------- ### Configure Homebrew for Apple Silicon (macOS) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Adds Homebrew to the PATH environment variable for macOS running on Apple Silicon. This ensures that Homebrew-installed executables can be found and executed. ```bash (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile source ~/.zprofile ``` -------------------------------- ### Build and Flash hello_world Application on STM32H573I-DK Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/st/stm32h573i_dk/doc/index.rst This command sequence builds and flashes the 'hello_world' application to the STM32H573I-DK board. It requires the Zephyr development environment and the specified board to be configured. ```console minicom -D /dev/ttyACM0 zephyr-app-commands --zephyr-app samples/hello_world --board stm32h573i_dk --goals build flash ``` -------------------------------- ### Add Kitware APT Repository (Ubuntu) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/doc/develop/getting_started/index.rst Downloads and executes a script to add the Kitware APT repository to your sources list. This is necessary for Ubuntu versions older than 22.04 to meet minimum dependency version requirements. ```bash wget https://apt.kitware.com/kitware-archive.sh sudo bash kitware-archive.sh ``` -------------------------------- ### Build and Flash hello_world Application (Zephyr) Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/atmel/sam/sam_v71_xult/doc/index.rst These commands demonstrate how to build and flash the 'hello_world' application for the SAM V71 Xplained Ultra board using Zephyr's build system. It targets the sam_v71_xult/samv71q21 SoC variation. ```bash west build -b sam_v71_xult/samv71q21 samples/hello_world west flash ``` -------------------------------- ### Initialize and Install LiteX Setup Script Source: https://github.com/texasinstruments/simplelink-zephyr/blob/v3.7.0-ti-9.14/boards/enjoydigital/litex_vexriscv/doc/index.rst Initializes and installs the LiteX setup script. The `--user` flag installs to the user directory, and `--config` specifies the configuration level (minimal, standard, full). ```bash ./litex_setup.py --init --install --user --config=(minimal, standard, full) ```