forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 2
Tips and tricks
Alexey Brodkin edited this page Jun 3, 2019
·
1 revision
Starting point is https://docs.zephyrproject.org/latest/getting_started.
Now when environment is set (sources checked-out, all helper tools of required versions like west, cmake installed) every time getting back to building an application it's required:
- Source
. zephyr-env.shfromzephyr-rtossource tree - Set env variables that describe your toolchain
- To use an ordinary cross-toolchain installed on a development host:
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile - Point to installed cross-toolchain:
export CROSS_COMPILE=~/xxx/bin/arc-linux-
- To use an ordinary cross-toolchain installed on a development host:
- Prepare build location. In an application's folder build everything in
buildfolder as Cmake otherwise doesn't work. That also help to keep source tree clean. That saidbuildfolder might be completely outside of zephyr source tree, just point to tha application of choice on invocation ofcmake:mkdir build && cd build. - Configure for a desired board:
cmake -DBOARD=nsim_em ... Note here..refers to the application sources located 1 level above, one may use a full path to the app pf choice here. - Build the application:
make. - And finally run the application with:
make run.