Using Other Zephyr Boards

Warning

Content in this section is provided on a best-effort basis.

This document contains additional information related to using the system on other boards. The ZMP supports all boards available in the Zephyr Project repositories. Here are some examples we have used:

Nordic NRF52832-DK

To build and flash:

west build -s zmp-samples/dm-lwm2m -d build-dm-lwm2m -b nrf52_pca10040
west sign -t imgtool -d build-dm-lwm2m -- --key mcuboot/root-rsa-2048.pem
west flash -d build-dm-lwm2m --hex-file zephyr.signed.hex

NXP FRDM-K64F

Flashing this board requires pyOCD. To install this dependency, run:

pip3 install --user pyOCD

On Linux platforms, you also need to install the following udev rules as root, then unplug and plug back in any boards you may have connected:

echo 'ATTR{idProduct}=="0204", ATTR{idVendor}=="0d28", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-cmsis-dap.rules

Building for FRDM-K64F requires some configuration information which depends on your local network:

  • An IP address to use for the LwM2M server

  • (optional) Set static IP address and router information

This information must be written to the file zmp-samples/dm-lwm2m/boards/frdm_k64f-local.conf in the Zephyr microPlatform installation directory.

To set the LwM2M server IP A.B.C.D, create the file with the following contents.

CONFIG_NET_CONFIG_PEER_IPV4_ADDR="A.B.C.D"

To use a static IP address X.Y.Z.W and gateway E.F.G.H for the FRDM-K64F add the following lines.

CONFIG_NET_DHCPV4=n
CONFIG_NET_CONFIG_MY_IPV4_GW="E.F.G.H"
CONFIG_NET_CONFIG_MY_IPV4_ADDR="X.Y.Z.W"

In addition, zmp-samples/dm-lwm2m/boards/frdm_k64f-local.conf must contain a line which specifies the IP address of the COAP proxy. In this case, that’s just the IP address of your gateway device. To use IP address L.M.N.O, add a line like this after the other networking configuration:

CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR="L.M.N.O"

To build and flash:

west build -s zmp-samples/dm-lwm2m -d build-dm-lwm2m -b frdm_k64f
west sign -t imgtool -d build-dm-lwm2m -- --key mcuboot/root-rsa-2048.pem
west flash -d build-dm-lwm2m --hex-file zephyr.signed.hex

96Boards Nitrogen

Flashing this board requires pyOCD. To install this dependency, run:

pip3 install --user pyOCD

On Linux platforms, you also need to install the following udev rules as root, then unplug and plug back in any boards you may have connected:

echo 'ATTR{idProduct}=="0204", ATTR{idVendor}=="0d28", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-cmsis-dap.rules

To build and flash:

west build -s zmp-samples/dm-lwm2m -d build-dm-lwm2m -b 96b_nitrogen
west sign -t imgtool -d build-dm-lwm2m -- --key mcuboot/root-rsa-2048.pem
west flash -d build-dm-lwm2m --hex-file zephyr.signed.hex

BLE Nano2

Flashing this board requires pyOCD. To install this dependency, run:

pip3 install --user pyOCD

On Linux platforms, you also need to install the following udev rules as root, then unplug and plug back in any boards you may have connected:

echo 'ATTR{idProduct}=="0204", ATTR{idVendor}=="0d28", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-cmsis-dap.rules

To build and flash:

west build -s zmp-samples/dm-lwm2m -d build-dm-lwm2m -b nrf52_blenano2
west sign -t imgtool -d build-dm-lwm2m -- --key mcuboot/root-rsa-2048.pem
west flash -d build-dm-lwm2m --hex-file zephyr.signed.hex