Reverting Zephyr Version to V3.7.1
Zephyr released the Version 4.0.0, a few days before the labs started. The new version is not compatible with a few libraries and drivers used in assignment-b to produce sound.
Note: Please ensure you change
<your path>
variable in the below commands to where you have zephyr installed.
Checking Zephyr Version
To check which version of Zephyr you have, you can follow the below commands
cd ~/<your path>/zephyrproject/zephyr
cat VERSION
You can check what version you have installed. If you have Zephyr version 3.7.0 or lower, you do not need to change your installation
If you have version 4.0.0 then you need to rollback, follow the instructions below to rollback your installation
Rollback Zephyr Installation
Please execute the below commands in your terminal to rollback your installation
cd ~/<your path>/zephyrproject/
source .venv/bin/activate # Activate the virtual environment
cd ./zephyr
git pull
git checkout v3.7.1 # Checkout the Zephyr Version 3.7.1
west update # Update Zephyr
Once you have successfully executed the above commands. You can check the version of installation by seeing the VERSION
file as done in Checking Zephyr Version.
IDE Specific Changes
CLion
First, remember to set up CLion for assignment B using this guide
For CMake to recognize the new version, you need to modify the CMake options, to do that follow these steps:
- Open the CLion Setting (Cntrl + Alt + S)
- Navigate to the
Build, Execution, Deployment -> CMake
- Add the Environment variable,
ZEPHYR_BASE=<your path>/zephyrproject/zephyr
in the CMake Options window as shown below. - Rerun the CMake (after resetting the cache) and ensure that the Zephyr Version is 3.7.1 in the CMake output
VSCode
If you followed the new guide (which uses west to build) to setup building in VS Code, you do not need to change anything.
If you are using the older guide for VS Code (which requires you to setup and use CMake), first navigate to the VSCode settings File > Preferences > Settings
, then under Extensions
, look for CMake Tools
and here, add a new item ZEPHYR_BASE
with value <your path>/zephyrproject/zephyr
. You can see how this window should look in the image below:
Then delete the build
directory created by CMake and start a fresh CMake build. If the output shows version 3.7.1, then ZEPHYR_BASE
was set correctly.