This is a cache of https://discuss.96boards.org/t/how-to-build-iotivity-constrained-zephyr-port/4018. It is a snapshot of the page at 2020-02-10T20:32:44.982+0000.
How to build iotivity-constrained <strong>zephyr</strong> port - Nitrogen - 96Boards Forum

How to build iotivity-constrained zephyr port

This is supposed to be so easy. You clone the zephyr repo and the iotivity-constrained repo. Then cd to port/zephyr in the iotivity-constrained repo and type ‘make’. Only the Makefile there is quite incomplete and wrong. It sets up the board definition and the config file, then these 2 lines that point to non-existent files (assuming zephyr_BASE points to the root of the cloned zephyr repo):

include ${zephyr_BASE}/Makefile.inc
include $(zephyr_BASE)/samples/net/common/Makefile.ipstack

There is also a Makefile in port/zephyr/src, but it can’t be run as is because it has no targets. I don’t know how that ties in either, but it also references directories in the zephyr repo that don’t exist.

If Zephy itself is well supported, I’m not sure about the iotivity/zephyr combo, I did not find much documentation. And their wiki seems a bit out-of-date. After looking a bit in the port/zephyr log, it seems that iotivity is compatible with zephyr 1.9, so you should try to checkout this version:

$ cd zephyr
$ git checkout zephyr-v1.9.0

zephyr_BASE is normally defined when you source the zephyr env script [1]

$ source zephyr-env.sh

Then you should be able to run make from iotivity port/zephyr directory. (it looks like you also have to git clone tinycbor into deps and add zephyr,uart-pipe node to the chosen node in zephyr/dts/arm/96b_nitrogen.dts)

[1] http://docs.zephyrproject.org/getting_started/getting_started.html#building-and-running-an-application