Zephyr - 1 Development Environment

Zephyr Toolchain and Dependencies

  1. Zephyr SDK (aka the cross compiler)
  2. Python
  3. DTC
  4. CMake

Development Environment

Note

Create a workspace

mkdir cactes-zephyr
cd cactes-zephyr

Python Virtual Environment

 python -m venv .venv
 source .venv/Scripts/activate

Install west

pip install west

Download zephyr

git clone https://github.com/zephyrproject-rtos/zephyr.git

Create west configuration file manually

mkdir -p .west
cat << 'EOF' > .west/config
[manifest]
path = zephyr
file = west.yml
EOF

Now you have 3 folders under cactes-zephyr folder.

  • .venv/
  • .west/
  • zephyr/

Download other third party libraries (verdor HAL, high level lib etc.)

west update

After west update, you will have 3 more folders

  • bootloader
  • modules
  • tools

Install other dependencies

pip install -r zephyr/scripts/requirements.txt

In case you need proxy
pip install -r zephyr/scripts/requirements.txt --proxy=http://127.0.0.1:1080

Refer to zephyr get started guideopen in new window for more information.

Compile

west build -b cactes_blb200_nrf52840 -p always samples/lowpower/ -- -DCONFIG_APP_STANDBY=y
west build -b cactes_blb200_nrf52840 -p always samples/lowpower/ -- -DCONFIG_APP_SYSTEMOFF=y

Flash

By default pyocd is selected.

west flash --erase