-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Before starting building the different samples, you need to have installed the Zephyr framework in your operating system, checkout the installation instructions in the official documentation.
If you were able to install everything successfully or you just have it already installed, I recommend you to make a few extra steps to improve your experience while using the Zephyr framework.
Zephyr can be used in multiple ways, but from my point of view the best approach is to have each project totally independent from the others, that means, instead of creating a project inside the root directory of the Zephyr project (like ~/zephyrproject/myapp
) it's usually a better practice to decouple your project source from the framework itself, so it would be easier to migrate and will force you to apply better practices during development.
If you want to keep your project outside the framework folder, you should make sure that the ZEPHYR_BASE
environment variable is properly set.
Instead of flooding your environment variables despite of using Zephyr or not, is a good practice to include in your .bashrc
a little function which loads the environment for you, only when you are going to use it. If during installation you do not change the default install locations, adding the following "function" to your .bashrc
should do the trick:
function get_zephyr {
source ~/zephyrproject/zephyr/zephyr-env.sh
source ~/zephyrproject/.venv/bin/activate
}
Now, if you re-source your terminal using:
source ~/.bashrc
you will be able to execute:
get_zephyr
Now, you should have accessible from your terminal all the tools provided by Zephyr.