David Leach
Megan,
Bluetooth support in Zephyr for the KW41Z is not support/available.
There is a preliminary PR that I put together that adds support but requires a bit of manual manipulation to pull the KW41Z ble link layer library from the KW41Z sdk on the NXP site. But the PR is out of date and doesn’t work with the current tip. Work is being done to get it up to date but the PR will stay a “do not merge” PR for now.
David
From: users@... <users@...>
On Behalf Of Megan Bredes via Lists.Zephyrproject.Org
Sent: Friday, July 26, 2019 3:14 PM To: users@... Cc: users@... Subject: [Zephyr-users] NXP FRDM-KW41Z fails to initialize BLE #ble #nxp
I have been trying to get zephyr working on the NXP FRDM-KW41Z board and have been having some trouble with it. It fails right when it attempts to call bt_enable() at the beginning of main and gives me the error "No HCI driver registered".
I've tried googling this error message but all that seems to come up is something from 2 years ago that seems to have been specific to arduino board and also seems to have already been fixed. I tried running non BLE demos on the board and those seem to work
fine, it seems to be that the ble initialization is the only problem. Does anyone know what might cause this or how to solve this problem?
|
|
Megan Bredes
I have been trying to get zephyr working on the NXP FRDM-KW41Z board and have been having some trouble with it. It fails right when it attempts to call bt_enable() at the beginning of main and gives me the error "No HCI driver registered". I've tried googling this error message but all that seems to come up is something from 2 years ago that seems to have been specific to arduino board and also seems to have already been fixed. I tried running non BLE demos on the board and those seem to work fine, it seems to be that the ble initialization is the only problem. Does anyone know what might cause this or how to solve this problem?
Thanks, Megan
|
|
Re: DTC version unsupported error
#west
Hi Eric:
You need to download and install a newer version of the Device Tree Compiler (dtc). Here is the easiest way I have found to do this:
wget http://mirrors.kernel.org/ubuntu/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.7-1_amd64.deb sudo apt install ./device-tree-compiler_1.4.7-1_amd64.deb
Lawrence King Principal Developer +1(416)627-7302
From: users@... <users@...>
On Behalf Of Cufi, Carles
Sent: Monday, July 15, 2019 7:18 AM To: tsai.eric.h@...; users@... Subject: Re: [Zephyr-users] DTC version unsupported error #west
Hi Eric,
Can you try replacing $HOME in the ZEPHYR_SDK_INSTALL_DIR with the full path? I know I’ve seen issues with that in the past.
For example in my case I use:
ZEPHYR_SDK_INSTALL_DIR="/home/carles/bin/zephyr-sdk"
On a new Ubuntu install, I'm having this issue with Zephyr using West. It's also referenced in this issue, but the fix mentioned there didn't work for me:
|
|
Channel Selection Algorithms in nRF52840DK
#PANG <BOZHENG001@...>
Hi All I am now working on Channel Selection Algorithms in nRF52840DK by Zephyr. For right now, the choice between Channel Selection Algorithm 1 and 2 could be made by me (by setting kconfig parameters:
CONFIG_BT_CTLR_ADV_EXT=n I found some files about Channel Selection Algorithms in Zephyr (zephyr/subsys/bluetooth/controller/ll_sw/lll_chan.c), but when I tried to make some changes into those 2 algorithms, it did not seem to do anything. How would I be able to do any modification or test on Channel Selection Algorithms?
|
|
How to integrate the Zephr build process into a custom image?
Stefan Jaritz
Hey,
I like to build an Zephyr based application and integrate it into a existing ecosystem. So I build my Zephyr application compiled and tested it(@stm32f412 (1MByte flash)). Everything fine. Zephyr giving me a nice 1MByte binary file which I can flash via openOCD. yeah! Now I like to move away from my dev board to the "real system". For that real system I need to create an special image file. I am looking for some ideas how to do that in the best/common way? My state of the art - please add or correct: The target image file looks like <bootloader><unused memory><app@bank1><unused memory><flags for bank1><app@bank2><unused memory><flags for bank2><unused memory> I found so far two possible ways to control the position of the app at the ram: - @ DEFCONFIG Linker -> FLASH_LOAD_OFFSET - @ dts: for app1 &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; slot0_partition: partition@20000 { label = "zephyr-code"; reg = <0x08020000 DT_SIZE_K(384)>; }; }; }; or for app2 &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; slot0_partition: partition@80000 { label = "zephyr-code"; reg = <0x08080000 DT_SIZE_K(384)>; }; }; }; In the flags section I need to put an crc and a length of the app. So I need to get these informations somehow out of the zephyr build Guess I need to run the build of my app 2 times with different config/dts. After this run I might need to stitch out the app from the zephyr image and put it together with the bootloader and the generated flags? Thx for helping
|
|
Re: DTLS over CoAP for the Zephyr project
Nikos Karamolegkos
The nrf52840_pca10056 module looks promising provided that supports the 6lowpan stack and also has the acceleration module. However, I have to check how difficult is to use/implement ECC and DTLS using zephyr. I will look for any discussion.
|
|
Re: west 0.6.0rc1
Bolivar, Marti
I forgot to add: it would be nice if any issues could be reported via the west bug tracker (https://github.com/zephyrproject-rtos/west/issues) rather than email, if possible. Thanks again.
From: Bolivar, Marti
Sent: Thursday, July 25, 2019 11:24 AM To: devel@...; users@... Subject: west 0.6.0rc1
Hi,
West version 0.6.0rc1 has been tagged. Release notes are in this pull request:
https://github.com/zephyrproject-rtos/zephyr/pull/17714
Testing and feedback are welcome; I’d like this to be the minimum version for Zephyr 2.0. To install this RC, use “pip3 install west==0.6.0rc1” (and pip3 install --user on Linux as usual).
You can “pip3 uninstall west” then “pip3 install west” (without the version specifier) to go back to v0.5.8.
Thanks! Marti
|
|
west 0.6.0rc1
Bolivar, Marti
Hi,
West version 0.6.0rc1 has been tagged. Release notes are in this pull request:
https://github.com/zephyrproject-rtos/zephyr/pull/17714
Testing and feedback are welcome; I’d like this to be the minimum version for Zephyr 2.0. To install this RC, use “pip3 install west==0.6.0rc1” (and pip3 install --user on Linux as usual).
You can “pip3 uninstall west” then “pip3 install west” (without the version specifier) to go back to v0.5.8.
Thanks! Marti
|
|
Re: Cmake and DTC Version issues installing Zephyr
Hi Marti
toggle quoted messageShow quoted text
Thanks you for looking at my problem report. It turns out I am not the first person to report a version problem with DTC, tsai.eric.h@gmail.com reported the same problem 10 days ago. I had actually done a 'west init', I just missed writing that in the step-by-step. (see my own follow up email where I mentioned this.) I do know how to work around the cmake (and DTC) version issues, the issue is the getting started guide doesn't tell me I need to do this. According to the west team posts the bootstrapper has been deprecated, so I was going direct to the source rather than what is in the getting started guide. The location of zephyr is where the 'latest' west put it. I didn't do a git clone, just west init. In general the getting started guide needs update and (re)testing. Build a new VM with 18.04 LTS and follow the getting started guide, it won't work. But it will work fine with a 19.04 system. Fortunately I see Charles is in the middle of updating the getting started guide so I am sure this will all be fixed in no time.... I'll try following the getting started guide again tomorrow. Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no> Sent: Wednesday, July 24, 2019 7:09 PM To: Lawrence King <lawrence.king@irdeto.com>; Zephyr-users@lists.zephyrproject.org Cc: users@lists.zephyrproject.org Subject: Re: [Zephyr-users] Cmake and DTC Version issues installing Zephyr "Lawrence King via Lists.Zephyrproject.Org" <lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Today I wanted to ensure that my documentation on how to rebuild my code was complete and correct. I setup a new virtual machine with Ubuntu 18.04 LTS (which is the most recent LTS version available). I then install Zephyr following (mostly) the instructions in the getting started guide, followed by pulling my code from my local git and then attempting to build.Yes, Zephyr requires a recent CMake. Since you're on Ubuntu, you might want to check out the official cmake apt repository from KitWare, which does support 18.04. https://blog.kitware.com/ubuntu-cmake-repository-now-available/ This isn't a west or a CMake requirement, in my opinion, but is instead a requirement based on the contents of the zephyr DTS files. Since you're on Ubuntu, if you're building with the Zephyr SDK (which you seem to be), you should have all the host tools you need from there. This includes a recent enough DTC. I would not recommend manually overriding the CMake version enforcement checks for the dtc binary. This appears to be missing some steps. In particular, it doesn't show how you got the zephyr tree itself. Given that it's in ~/zephyr instead of something like ~/zephyrproject/zephyr, I suspect you didn't do a west init + west update. Is that the case? If so, I'd recommend trying again, but following the instructions in the getting started guide. Zephyr without west is possible, but harder to do correctly. Out of curiosity, why are you building from the latest west master instead of running "pip3 install --user west" as recommended in the getting started documentation? Based on the above (and the below output) it seems like you might have done "git clone https://github.com/zephyrproject-rtos/zephyr" or similar. This leaves out all the other modules. I also don't see any mention here of installing the python packages in zephyr's scripts/requirements.txt, which is also mentioned in the getting started guide. Please try these steps and holler if you continue to have problems: https://docs.zephyrproject.org/latest/getting_started/index.html Thanks, Marti cd zephyr/samples/blinky
|
|
Re: Cmake and DTC Version issues installing Zephyr
Carles Cufi
Hi there,
toggle quoted messageShow quoted text
Thanks for your feedback.
-----Original Message-----Those are not really workarounds, they are recommended options to get the required set of tools installed in Linux distributions that do not bundle the latest versions of packages. What I am really getting at is the 'getting started' instructions on theAs mentioned before in this thread, the Getting Started guide does work with Ubuntu 18.04, as long as: 1. You follow the provided instructions to get a recent version of CMake (see https://docs.zephyrproject.org/latest/getting_started/installation_linux.html#install-requirements-and-dependencies, paragraph starting with " CMake version 3.13.1 or higher is required."). 2. You install the Zephyr SDK (which is recommended by the user guide). Please feel free to comment on the Pull Request I sent to improve the current documentation, all feedback welcome. https://github.com/zephyrproject-rtos/zephyr/pull/17771 Carles
|
|
Re: Cmake and DTC Version issues installing Zephyr
Thanks to all for the work arounds. I had actually done all of these work arounds on my Ubuntu 18.04 VM.
toggle quoted messageShow quoted text
What I am really getting at is the 'getting started' instructions on the zephyr project site do not work for an 18.04 system, we need to update the getting started so that a new user either starts with an 19.04 system, amd/or has the workarounds to get the newer DTC and CMake versions. Otherwise even the Blinky program won't compile. It is an important documentation step that you actually try your instructions on a 'virgin' system. All of us who have been doing development for a long time have incrementally updated our systems and we never follow the instructions on the getting started. Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Cufi, Carles <Carles.Cufi@nordicsemi.no> Sent: Thursday, July 25, 2019 7:06 AM To: andrew.p.boie@intel.com; Bolivar, Marti <Marti.Bolivar@nordicsemi.no>; Lawrence King <lawrence.king@irdeto.com>; Zephyr-users@lists.zephyrproject.org Cc: users@lists.zephyrproject.org Subject: RE: [Zephyr-users] Cmake and DTC Version issues installing Zephyr -----Original Message-----Thanks Andrew! I've posted this PR: https://github.com/zephyrproject-rtos/zephyr/pull/17771 Carles
|
|
Re: Cmake and DTC Version issues installing Zephyr
Carles Cufi
toggle quoted messageShow quoted text
-----Original Message-----Thanks Andrew! I've posted this PR: https://github.com/zephyrproject-rtos/zephyr/pull/17771 Carles
|
|
Re: DTLS over CoAP for the Zephyr project
Lubos, Robert
Yes, applying `overlay-802154.conf` will make the sample use Zephyr’s native 6lowpan stack. Applying ` overlay-ot.conf` will make the sample use OpenThread, which implements it’s own 6lowpan layer. You can also combine two overlays – `-DOVERLAY_CONFIG=”overlay-802154.conf overlay-tls.conf”` to run DTLS over 802.15.4 6lowpan. Combining DTLS with OpenThread is not supported at this moment.
Certificates are also supported with DTLS sockets – echo_client/echo_server use them to secure DTLS connection. The lwm2m_client though indeed uses PSK.
nrf52840_pca10056 has a hardware crypto acceleration module – CryptoCell 310, which is capable of accelerating ECC operations (we use it for example in “vanilla” OpenThread repository). We have some support for it in our Zephyr based SDK (https://github.com/NordicPlayground/fw-nrfconnect-nrf/), sadly we haven’t integrated and tested it with networking samples yet.
Regards, Robert
From: users@... [mailto:users@...]
On Behalf Of Nikos Karamolegkos via Lists.Zephyrproject.Org
Sent: Thursday, July 25, 2019 12:12 To: users@... Cc: users@... Subject: Re: [Zephyr-users] DTLS over CoAP for the Zephyr project
Once again thank you for your detailed answer. Therefore, If I apply the "overlay-802154.conf" overlay config then I will have the 6lowpan stack?
Nikos
|
|
Re: DTLS over CoAP for the Zephyr project
Nikos Karamolegkos
Once again thank you for your detailed answer. Therefore, If I apply the "overlay-802154.conf" overlay config then I will have the 6lowpan stack? Nikos
|
|
Re: Cmake and DTC Version issues installing Zephyr
Boie, Andrew P
You can also do:First problem is west wants to build with cmake newer than 1.13.3, but $ sudo snap install cmake This works on 18.04 LTS. -Andrew
|
|
Re: Cmake and DTC Version issues installing Zephyr
Bolivar, Marti
"Lawrence King via Lists.Zephyrproject.Org"
<lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Today I wanted to ensure that my documentation on how to rebuild my code was complete and correct. I setup a new virtual machine with Ubuntu 18.04 LTS (which is the most recent LTS version available). I then install Zephyr following (mostly) the instructions in the getting started guide, followed by pulling my code from my local git and then attempting to build.Yes, Zephyr requires a recent CMake. Since you're on Ubuntu, you might want to check out the official cmake apt repository from KitWare, which does support 18.04. https://blog.kitware.com/ubuntu-cmake-repository-now-available/ This isn't a west or a CMake requirement, in my opinion, but is instead a requirement based on the contents of the zephyr DTS files. Since you're on Ubuntu, if you're building with the Zephyr SDK (which you seem to be), you should have all the host tools you need from there. This includes a recent enough DTC. I would not recommend manually overriding the CMake version enforcement checks for the dtc binary. This appears to be missing some steps. In particular, it doesn't show how you got the zephyr tree itself. Given that it's in ~/zephyr instead of something like ~/zephyrproject/zephyr, I suspect you didn't do a west init + west update. Is that the case? If so, I'd recommend trying again, but following the instructions in the getting started guide. Zephyr without west is possible, but harder to do correctly. Out of curiosity, why are you building from the latest west master instead of running "pip3 install --user west" as recommended in the getting started documentation? Based on the above (and the below output) it seems like you might have done "git clone https://github.com/zephyrproject-rtos/zephyr" or similar. This leaves out all the other modules. I also don't see any mention here of installing the python packages in zephyr's scripts/requirements.txt, which is also mentioned in the getting started guide. Please try these steps and holler if you continue to have problems: https://docs.zephyrproject.org/latest/getting_started/index.html Thanks, Marti cd zephyr/samples/blinky
|
|
Re: Cmake and DTC Version issues installing Zephyr
Oops, I missed including the ‘west init’ step below, and the path to blinky was incorrect – instructions fixed, Ubuntu 18.04 still broken
Update: on a Ubuntu 19.04 VM I get a lot further, the versions of cmake, and dtc tools are acceptable. It gets stuck looking for elftools. This is addressed in an older zephyr question here: https://github.com/zephyrproject-rtos/zephyr/issues/1392 I would have thought the latest ‘west init’ would have installed the elftools. Easily fixed, I added sudo -H pip3 install pyelftools then ‘west build’ passes, but ‘west flash’ fails due to missing pyocd, and the rules for the device. Again easily fixed. sudo -H pip3 install pyocd git clone https://github.com/mbedmicro/pyOCD.git cd pyocd/udev sudo cp *.rules /etc/udev/rules.d sudo udevadm control –reload sudo udevadm trigger I’m not sure why the install of pyocd didn’t automatically install the udev rules…
Lawrence King Principal Developer +1(416)627-7302
From: users@... <users@...>
On Behalf Of Lawrence King
Sent: Wednesday, July 24, 2019 2:39 PM To: Zephyr-users@... Subject: [Zephyr-users] Cmake and DTC Version issues installing Zephyr
Today I wanted to ensure that my documentation on how to rebuild my code was complete and correct. I setup a new virtual machine with Ubuntu 18.04 LTS (which is the most recent LTS version available). I then install Zephyr following (mostly) the instructions in the getting started guide, followed by pulling my code from my local git and then attempting to build.
This is where things go bad.
First problem is west wants to build with cmake newer than 1.13.3, but the ‘default’ cmake in 18.04 LTS is much older, I was able to work around this by removing cmake, and installing with pip3.
The ‘latest’ zephyr (actually west and cmake) insists that I need a device tree compiler with version 1.4.6, unfortunately the latest is version on Ubunti 18.04 is 1.4.5 (see https://launchpad.net/ubuntu/+source/device-tree-compiler) hence I can’t build. OK, to work around this I went into zephyr/cmake/host-tools.cmake and changed the MIN_DTC_VERSION to 1.4.5. OK, I am past this…
But things continue to be bad. The next issue I hit is cmake can’t find the file zephyr/cmake/toolchain/zephyr/0.10.1/host-tools.cmake and when I look, sure enough the file isn’t there. In fact the directory isn’t there. There are directories for 0.10.0 and 0.9.5, but I installed zephyr tools 0.10.1 so I am not sure why the directory is not there, and more importantly why is cmake even looking there?.
Here is a ‘step-by-step’ of the process I followed after bringing up a new Ubuntu 18.04 box:
sudo apt-get upgrade sudo apt-get install -y build-essential module-assistant sudo apt-get install -y --no-install-recommends git ninja-build gperf \ ccache dfu-util device-tree-compiler wget \ python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ make gcc gcc-multilib sudo apt remove cmake
sudo -H pip3 install --upgrade setuptools sudo -H pip3 install --user cmake wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.1/zephyr-sdk-0.10.1-setup.run chmod +x zephyr-sdk-0.10.1-setup.run sudo ./zephyr-sdk-0.10.1-setup.run export ZEPHYR_TOOLCHAIN_VARIANT=zephyr export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk # cmake must be version 1.13.3 or better! cmake --version
sudo -H pip3 install git+https://github.com/zephyrproject-rtos/west west init west update
At this point I checkout my code from git and try to build, but it fails just as well on the blinky program. cd zephyr/samples/basic/blinky export BPOARD=nrf52840_mdk west -v build
Here is the output: lawrence@Bob:~/zephyr/samples/basic/blinky$ west -v build ZEPHYR_BASE=/home/lawrence/zephyr (origin: configfile) source directory: /home/lawrence/zephyr/samples/basic/blinky build directory: /home/lawrence/zephyr/samples/basic/blinky/build (created) BOARD: nrf52840_mdk (origin: env) Running CMake: /usr/local/bin/cmake -B/home/lawrence/zephyr/samples/basic/blinky/build -S/home/lawrence/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52840_mdk Zephyr version: 1.14.99 -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.8", minimum required is "3.4") -- Selected BOARD nrf52840_mdk CMake Error at /home/lawrence/zephyr/cmake/toolchain/zephyr/host-tools.cmake:46 (include): include could not find load file:
/home/lawrence/zephyr/cmake/toolchain/zephyr/0.10.1/host-tools.cmake Call Stack (most recent call first): /home/lawrence/zephyr/cmake/host-tools.cmake:3 (include) /home/lawrence/zephyr/cmake/app/boilerplate.cmake:386 (include) CMakeLists.txt:4 (include)
-- Found west: /usr/local/bin/west (found suitable version "0.6.0", minimum required is "0.5.6") CMake Error at /home/lawrence/zephyr/cmake/toolchain/zephyr/generic.cmake:7 (include): include could not find load file:
/home/lawrence/zephyr/cmake/toolchain/zephyr/0.10.1/generic.cmake Call Stack (most recent call first): /home/lawrence/zephyr/cmake/generic_toolchain.cmake:64 (include) /home/lawrence/zephyr/cmake/app/boilerplate.cmake:402 (include) CMakeLists.txt:4 (include)
-- Loading /home/lawrence/zephyr/boards/arm/nrf52840_mdk/nrf52840_mdk.dts as base -- Overlaying /home/lawrence/zephyr/dts/common/common.dts CMake Error at /home/lawrence/zephyr/cmake/dts.cmake:126 (message): command failed with return code: No such file or directory Call Stack (most recent call first): /home/lawrence/zephyr/cmake/app/boilerplate.cmake:403 (include) CMakeLists.txt:4 (include)
-- Configuring incomplete, errors occurred! ERROR: command exited with status 1: /usr/local/bin/cmake -B/home/lawrence/zephyr/samples/basic/blinky/build -S/home/lawrence/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52840_mdk Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/west/main.py", line 566, in main args.handler(args, unknown) File "/usr/local/lib/python3.6/dist-packages/west/main.py", line 325, in ext_command_handler command.run(args, unknown, topdir) File "/usr/local/lib/python3.6/dist-packages/west/commands/__init__.py", line 112, in run self.do_run(args, unknown) File "/home/lawrence/zephyr/scripts/west_commands/build.py", line 161, in do_run self._run_cmake(board, origin, self.args.cmake_opts) File "/home/lawrence/zephyr/scripts/west_commands/build.py", line 380, in _run_cmake run_cmake(final_cmake_args, dry_run=self.args.dry_run) File "/home/lawrence/zephyr/scripts/west_commands/zcmake.py", line 68, in run_cmake raise subprocess.CalledProcessError(p.returncode, p.args) subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-B/home/lawrence/zephyr/samples/basic/blinky/build', '-S/home/lawrence/zephyr/samples/basic/blinky', '-GNinja', '-DBOARD=nrf52840_mdk']' returned non-zero exit status 1. lawrence@Bob:~/zephyr/samples/basic/blinky$
Lawrence King Principal Developer Connected Transport Market Unit +1(416)627-7302
CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.
|
|
Cmake and DTC Version issues installing Zephyr
Today I wanted to ensure that my documentation on how to rebuild my code was complete and correct. I setup a new virtual machine with Ubuntu 18.04 LTS (which is the most recent LTS version available). I then install Zephyr following (mostly) the instructions in the getting started guide, followed by pulling my code from my local git and then attempting to build.
This is where things go bad.
First problem is west wants to build with cmake newer than 1.13.3, but the ‘default’ cmake in 18.04 LTS is much older, I was able to work around this by removing cmake, and installing with pip3.
The ‘latest’ zephyr (actually west and cmake) insists that I need a device tree compiler with version 1.4.6, unfortunately the latest is version on Ubunti 18.04 is 1.4.5 (see https://launchpad.net/ubuntu/+source/device-tree-compiler) hence I can’t build. OK, to work around this I went into zephyr/cmake/host-tools.cmake and changed the MIN_DTC_VERSION to 1.4.5. OK, I am past this…
But things continue to be bad. The next issue I hit is cmake can’t find the file zephyr/cmake/toolchain/zephyr/0.10.1/host-tools.cmake and when I look, sure enough the file isn’t there. In fact the directory isn’t there. There are directories for 0.10.0 and 0.9.5, but I installed zephyr tools 0.10.1 so I am not sure why the directory is not there, and more importantly why is cmake even looking there?.
Here is a ‘step-by-step’ of the process I followed after bringing up a new Ubuntu 18.04 box:
sudo apt-get upgrade sudo apt-get install -y build-essential module-assistant sudo apt-get install -y --no-install-recommends git ninja-build gperf \ ccache dfu-util device-tree-compiler wget \ python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ make gcc gcc-multilib sudo apt remove cmake
sudo -H pip3 install --upgrade setuptools sudo -H pip3 install --user cmake wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.1/zephyr-sdk-0.10.1-setup.run chmod +x zephyr-sdk-0.10.1-setup.run sudo ./zephyr-sdk-0.10.1-setup.run export ZEPHYR_TOOLCHAIN_VARIANT=zephyr export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk # cmake must be version 1.13.3 or better! cmake --version
sudo -H pip3 install git+https://github.com/zephyrproject-rtos/west west update
At this point I checkout my code from git and try to build, but it fails just as well on the blinky program. cd zephyr/samples/blinky export BPOARD=nrf52840_mdk west -v build
Here is the output: lawrence@Bob:~/zephyr/samples/basic/blinky$ west -v build ZEPHYR_BASE=/home/lawrence/zephyr (origin: configfile) source directory: /home/lawrence/zephyr/samples/basic/blinky build directory: /home/lawrence/zephyr/samples/basic/blinky/build (created) BOARD: nrf52840_mdk (origin: env) Running CMake: /usr/local/bin/cmake -B/home/lawrence/zephyr/samples/basic/blinky/build -S/home/lawrence/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52840_mdk Zephyr version: 1.14.99 -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.8", minimum required is "3.4") -- Selected BOARD nrf52840_mdk CMake Error at /home/lawrence/zephyr/cmake/toolchain/zephyr/host-tools.cmake:46 (include): include could not find load file:
/home/lawrence/zephyr/cmake/toolchain/zephyr/0.10.1/host-tools.cmake Call Stack (most recent call first): /home/lawrence/zephyr/cmake/host-tools.cmake:3 (include) /home/lawrence/zephyr/cmake/app/boilerplate.cmake:386 (include) CMakeLists.txt:4 (include)
-- Found west: /usr/local/bin/west (found suitable version "0.6.0", minimum required is "0.5.6") CMake Error at /home/lawrence/zephyr/cmake/toolchain/zephyr/generic.cmake:7 (include): include could not find load file:
/home/lawrence/zephyr/cmake/toolchain/zephyr/0.10.1/generic.cmake Call Stack (most recent call first): /home/lawrence/zephyr/cmake/generic_toolchain.cmake:64 (include) /home/lawrence/zephyr/cmake/app/boilerplate.cmake:402 (include) CMakeLists.txt:4 (include)
-- Loading /home/lawrence/zephyr/boards/arm/nrf52840_mdk/nrf52840_mdk.dts as base -- Overlaying /home/lawrence/zephyr/dts/common/common.dts CMake Error at /home/lawrence/zephyr/cmake/dts.cmake:126 (message): command failed with return code: No such file or directory Call Stack (most recent call first): /home/lawrence/zephyr/cmake/app/boilerplate.cmake:403 (include) CMakeLists.txt:4 (include)
-- Configuring incomplete, errors occurred! ERROR: command exited with status 1: /usr/local/bin/cmake -B/home/lawrence/zephyr/samples/basic/blinky/build -S/home/lawrence/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52840_mdk Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/west/main.py", line 566, in main args.handler(args, unknown) File "/usr/local/lib/python3.6/dist-packages/west/main.py", line 325, in ext_command_handler command.run(args, unknown, topdir) File "/usr/local/lib/python3.6/dist-packages/west/commands/__init__.py", line 112, in run self.do_run(args, unknown) File "/home/lawrence/zephyr/scripts/west_commands/build.py", line 161, in do_run self._run_cmake(board, origin, self.args.cmake_opts) File "/home/lawrence/zephyr/scripts/west_commands/build.py", line 380, in _run_cmake run_cmake(final_cmake_args, dry_run=self.args.dry_run) File "/home/lawrence/zephyr/scripts/west_commands/zcmake.py", line 68, in run_cmake raise subprocess.CalledProcessError(p.returncode, p.args) subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-B/home/lawrence/zephyr/samples/basic/blinky/build', '-S/home/lawrence/zephyr/samples/basic/blinky', '-GNinja', '-DBOARD=nrf52840_mdk']' returned non-zero exit status 1. lawrence@Bob:~/zephyr/samples/basic/blinky$
Lawrence King Principal Developer Connected Transport Market Unit +1(416)627-7302
CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.
|
|
Re: DTLS over CoAP for the Zephyr project
Lubos, Robert
Nikos,
CoAP over DTLS is supported, we just don’t have a straightforward sample of this functionality. For instance, the `lwm2m_client` sample uses CoAP protocol over DLTS (LWM2M uses CoAP internally). For TLS/DTLS communication we have a secure sockets API – the API is similar to the posix sockets API, therefore it’s pretty straightforward to convert socket-based samples to use DTLS instead of UDP for instance.
As for the modules supporting 802.15.4, yes frdm_kw41z is one of them. I don’t know if we provide a complete list of all boards that support 802.15.4, but for sure you can check what drivers are available to have some insight: https://github.com/zephyrproject-rtos/zephyr/tree/master/drivers/ieee802154. I personally use `nrf52840_pca10056` for 802.15.4 (I’m a Nordic employee).
As for 802.15.4 base networking, Zephyr provides its own 6lowpan stack (which can be tested with echo samples). You might also be interested in OpenThread, which we support in Zephyr – it’s a 802.15.4 based IPv6 mesh protocol. OpenThread can also be run with the echo samples (the protocol used in the sample depends on what overlay config file you select).
Regards, Robert
From: users@... [mailto:users@...]
On Behalf Of Nikos Karamolegkos via Lists.Zephyrproject.Org
Sent: Wednesday, July 24, 2019 15:35 To: users@... Cc: users@... Subject: Re: [Zephyr-users] DTLS over CoAP for the Zephyr project
Thank you for the detailed reply Robert. Thus, as I understand there is no support for CoAP over DTLS at this time. Is it possible to add this functionality in the next commits? Also, for the echo client/server I can see frdm_kw41z.conf in the folder "boards" which makes me conclude that these samples could be used with this 802.15.4 compatible module. Am I correct? My purpose is to find a 802.15.4 module (i.e. support of O-QPSK with the 6lowpan stack) in order to use CoAP over DTLS and zephyr RTOS
|
|
Re: DTLS over CoAP for the Zephyr project
Nikos Karamolegkos
Thank you for the detailed reply Robert. Thus, as I understand there is no support for CoAP over DTLS at this time. Is it possible to add this functionality in the next commits? Also, for the echo client/server I can see frdm_kw41z.conf in the folder "boards" which makes me conclude that these samples could be used with this 802.15.4 compatible module. Am I correct? My purpose is to find a 802.15.4 module (i.e. support of O-QPSK with the 6lowpan stack) in order to use CoAP over DTLS and zephyr RTOS
|
|