Getting Started

Follow this guide to:

  • Set up your first workspace

  • Install the Zephyr RTOS SDK

  • Enable the dfu-util to perform Firmware upgrades

  • Build and flash your first sample application

The instructions here closely follow the Zephyr RTOS Getting Started Guide but are modified to setup an ARDEP workspace instead of a vanilla Zephyr workspace. [1]

Install dependencies

Follow Zephyr’s OS Update Section and then the Install dependencies section.

Note

For Windows user:

  • You might need to manually add the 7zip installation folder to your $PATH. It is usually installed under C:\Program Files\7-Zip. [2]

  • One of your testers reported, that the python executable was actually called py on his device. You can check this with the python --version or py --version in a command prompt. If you see the version (e.g. Python 3.13.7) the executable is found.

Install the additional dependencies for the ardep board:

sudo apt update
sudo apt install --no-install-recommends iproute2 dfu-util git-lfs gdb-multiarch

Set up your workspace

We will clone the ARDEP repository, Zephyr and all required modules into a new west workspace and install all required python dependencies in a Python virtual environment.

In the following, we use ardep-workspace as the name for the workspace and locate it in our $HOME directory, but you can choose any name and location you want.

  1. Create a new virtual environment

    python3 -m venv ~/ardep-workspace/.venv
    
  2. Activate the virtual environment

    source ardep-workspace/.venv/bin/activate
    

    Note

    Remember to do activate the virtual environment whenver you start working.

  3. Install west:

    pip install west
    
  4. Get the ARDEP source code:

    west init -m https://github.com/mercedes-benz/ardep.git ~/ardep-workspace
    
  5. Get the source code for Zephyr and all its dependencies:

    cd ~/ardep-workspace
    west update
    
  6. Export a Zephyr CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications.

    west zephyr-export
    
  7. Install python dependencies for other west commands:

    west packages pip # Lists all requirement.txt files that get installed
    west packages pip --install # Actually install the packages
    

Install the Zephyr SDK

We will install the Zephyr SDK which contains the toolchain for every by Zephyr supported architectures. Additionally it contains host tools for Linux such as a custom QEMU and OpenOCD build for emulation, flashing and debugging.

Install the Zephyr SDK using west sdk install.

cd ~/ardep-workspace/zephyr
west sdk install

Note

See west sdk install --help for more command options (e.g. install location)

Enable the DFU-Util to perform firmware upgrades

Note

This step is only required if you have a board revision < 2.0.0

west ardep create-udev-rule
sudo udevadm control --reload-rules
sudo udevadm trigger

This rule allows dfu-util to access your ardep board without sudo privileges (required for firmware upgrades via dfu-util).

If your ardep board is already connected, unplug and replug it.

Enable the Black-Magic Debugger on your host

Note

This step is recommended, if you have a board revision >= 2.0.0

Perform the Connecting to your Computer Step in the Getting Started Guide of the Black-Magic Debugger.

This enables you to use the on-board debugger without root/admin privileges.

Build your first app

Build the LED Sample with:

cd ~/ardep-workspace/ardep
west build --board ardep samples/led

Note

If you’re using an older version of the board, append the board version to the boards name (e.g. --board ardep@a1.0.0 or --board ardep@1 for version 1 of the board).

Flash the app using dfu-util:

west flash