Re: remove zephyr-env.sh


Boie, Andrew P
 

From: Perez-Gonzalez, Inaky [mailto:inaky.perez-gonzalez(a)intel.com]
Currently we require the user to source the zephyr-env.sh environment to
set up the build environment. This is awkward; things build fine without
it and the user still has to manually setup ZEPHYR_BASE,
ZEPHYR_GCC_VARIANT and ZEPHYR_SDK_INSTALL_DIR. zephyr-env.sh has grown to
I don't believe this is the case.

You do have to set ZEPHYR_GCC_VARIANT and ZEPHYR_SDK_INSTALL_DIR. I put them in my .bashrc:

export ZEPHYR_GCC_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/

However, ZEPHYR_BASE is specific to what Zephyr tree you are working in. I personally have several that I work in. This is not something I would want to globally set in my .bashrc. At minimum we would need to transplant this logic to the Makefiles.

From looking at the script it additionally:

1. Appends the ZEPHYR_BASE/scripts directory to the PATH
2. Sources ~/.zephyrrc if it exists (not sure what the use-case for this is, I don't personally use it).

Both of these seem optional, but to run stuff like sanitycheck from the command line you'd have to include a full path.

Andrew

Join devel@lists.zephyrproject.org to automatically receive all group messages.