osd-contiki/platform/ev-aducrf101mkxz
Mohamed seliem 0ef0a21d9e update for all platforms 2016-12-01 21:26:32 +02:00
..
Makefile.ev-aducrf101mkxz Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack. 2014-12-01 20:13:09 +01:00
README.md Change the default IPv6 prefix from aaaa::/64 to fd00::/64 2016-03-07 17:47:44 +01:00
button-sensor.c Add button sensor support (BOOT button) 2014-07-22 21:18:16 -04:00
contiki-conf.h update for all platforms 2016-12-01 21:26:32 +02:00
contiki-main.c Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
leds-arch.c Add platform LED driver 2014-07-22 21:18:16 -04:00
platform-conf.h Add platform LED driver 2014-07-22 21:18:16 -04:00

README.md

Building Contiki for the EV-ADuCRF101MKxZ Board

On Debian/Ubuntu Linux:

For older versions of Ubuntu (prior to 14.04), add the external package repository that provides recent versions of GCC for ARM:

sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
sudo apt-get update

For all systems, install the required development packages:

sudo apt-get install git make gcc-arm-none-eabi python-serial

Obtain the Contiki source code:

git clone https://github.com/contiki-os/contiki.git

Build Contiki's example-abc:

make -C contiki/examples/rime \
    TARGET=ev-aducrf101mkxz \
    example-abc.ev-aducrf101mkxz.hex

The default radio frequency can optionally be specified on the command-line as follows. A clean rebuild may be needed when changing it:

make -C contiki/examples/rime \
    TARGET=ev-aducrf101mkxz \
    RF_CHANNEL=915000000 \
    clean \
    example-abc.ev-aducrf101mkxz.hex

The code can be flashed to the eval board and tested using adi-cm3sd. Obtain adi-cm3sd:

git clone https://github.com/jimparis/adi-cm3sd.git

Connect the evaluation board using its J-Link board, or any other serial adapter. Flash example-adc and open a terminal by running:

adi-cm3sd/cm3sd.py -a contiki/examples/rime/example-abc.ev-aducrf101mkxz.hex \
    /dev/serial/by-id/usb-SEGGER_J-Link_000541011111-if00

replacing /dev/serial/by-id/usb-SEGGER_J-Link_000541011111-if00 with the path to the correct serial device. Flash the same code on a second evaluation board to see them communicate.

IPv6 Example

Border Router

First, build and run the IPv6 border-router example:

make -C contiki/examples/ipv6/rpl-border-router \
    TARGET=ev-aducrf101mkxz \
    SERIAL_ID='"00001234"' \
    border-router.ev-aducrf101mkxz.hex

adi-cm3sd/cm3sd.py -a contiki/examples/ipv6/rpl-border-router/border-router.ev-aducrf101mkxz.hex \
    /dev/serial/by-id/usb-SEGGER_J-Link_000541011111-if00

After flashing, close the terminal with CTRL-C, then build and run the SLIP tunnel on the host machine:

make -C contiki/tools tunslip6

sudo contiki/tools/tunslip6 \
    -s /dev/serial/by-id/usb-SEGGER_J-Link_000541011111-if00 \
    -B 115200 -v3 fd00::1/64

Open the border router's home page at: http://[fd00::3230:3030:3132:3334]/

Web Server

Then, build and flash the IPv6 webserver6 example on another eval board. The different SERIAL_ID ensures that the webserver uses a link-local IP address that is different from that of the border router:

make -C contiki/examples/webserver-ipv6 \
    TARGET=ev-aducrf101mkxz \
    SERIAL_ID='"00005678"' \
    webserver6.ev-aducrf101mkxz.hex

adi-cm3sd/cm3sd.py -a contiki/examples/webserver-ipv6/webserver6.ev-aducrf101mkxz.hex \
    /dev/serial/by-id/usb-SEGGER_J-Link_000541022222-if00

Open the web server's home page at: http://[fd00::3230:3030:3536:3738]/

On Windows:

Install prerequisites

Install git with default options.

Install MinGW as follows:

  • Download and run mingw-get-setup.exe.
  • Select Install, Continue, and Continue again.
  • Click Basic Setup on the left panel.
  • Click the checkbox next to mingw32-base, then click Mark for Installation.
  • Select 'Installation -> Apply Changes' from the menu bar.
  • Click 'Apply', then close and quit the MinGW installer.

Install toolchain

Contiki can be built with either GCC or IAR:

Building example-abc

Open a shell by right-clicking the desktop or any folder and selecting Git Bash.

Obtain the Contiki source code:

git clone https://github.com/contiki-os/contiki.git

Build Contiki's example-abc:

  • GCC

      /c/mingw/bin/mingw32-make -C contiki/examples/rime \
                                TARGET=ev-aducrf101mkxz \
                                example-abc.ev-aducrf101mkxz.hex
    
  • IAR

      /c/mingw/bin/mingw32-make -C contiki/examples/rime \
                                IAR=1 \
                                TARGET=ev-aducrf101mkxz \
                                example-abc.ev-aducrf101mkxz.hex
    

Other build options like RF_CHANNEL and SERIAL_ID can be specified as in the Linux instructions above.

Flashing and running

The resulting file contiki/examples/rime/example-abc.ev-aducrf101mkxz.hex can be flashed to the evaluation board using ADI's CM3WSD utility.

Use a terminal emulator (e.g. HyperTerminal) at 115200 baud to see the program output.