tree: 3620394ae511e223908c47bed728b7f1cb09d632 [path history] [tgz]
  1. alarm.c
  2. diag.c
  3. flash.c
  4. logging.c
  7. misc.c
  8. MKW41Z512xxx4.ld
  9. openthread-core-kw41z-config.h
  10. platform-kw41z.h
  11. platform.c
  12. radio.c
  13. random.c
  15. uart.c

OpenThread on NXP(Freescale) Kinetis MKW41Z512 Example

This directory contains example platform drivers for the NXP(Freescale) Kinetis MKW41Z512 based on FRDM-KW41Z hardware platform.

The example platform drivers are intended to present the minimal code necessary to support OpenThread. As a result, the example platform drivers do not necessarily highlight the platform's full capabilities.


Download and install the GNU toolchain for ARM Cortex-M.

In a Bash terminal, follow these instructions to install the GNU toolchain and other dependencies.

$ cd <path-to-openthread>
$ ./script/bootstrap

Build Examples

$ cd <path-to-openthread>
$ ./bootstrap
$ make -f examples/Makefile-kw41z

After a successful build, the elf files are found in <path-to-openthread>/output/kw41z/bin. You can convert them to bin files using arm-none-eabi-objcopy:

$ arm-none-eabi-objcopy -O binary ot-cli-ftd ot-cli-ftd.bin

Flash Binaries

Compiled binaries may be flashed onto the MKW41Z512 using drag-and-drop into the board's MSD Bootloader or the NXP(Freescale) Test Tool or JTAG interface. The NXP(Freescale) Test Tool provides a convenient method for flashing a MKW41Z512 via the J-Link.

Running the example

  1. Prepare two boards with the flashed CLI Example (as shown above).

  2. The CLI example uses UART connection. To view raw UART output, start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:

    • Baud rate: 115200
    • 8 data bits
    • 1 stop bit
    • No parity
    • No flow control
  3. Open a terminal connection on the first board and start a new Thread network.

> panid 0xabcd
> ifconfig up
> thread start
  1. After a couple of seconds the node will become a Leader of the network.
> state
  1. Open a terminal connection on the second board and attach a node to the network.
> panid 0xabcd
> ifconfig up
> thread start
  1. After a couple of seconds the second node will attach and become a Child.
> state
  1. List all IPv6 addresses of the first board.
> ipaddr
  1. Choose one of them and send an ICMPv6 ping from the second board.
> ping fdde:ad00:beef:0:0:ff:fe00:fc00
16 bytes from fdde:ad00:beef:0:0:ff:fe00:fc00: icmp_seq=1 hlim=64 time=8ms

For a list of all available commands, visit OpenThread CLI Reference