osd-contiki/platform/eval-adf7xxxmb4z
2014-12-01 21:02:57 +01:00
..
button-sensor.c Adds support for ADF7023 sub-GHz radio from Analog Devices and RL78 series MCU from Renesas. 2014-01-04 18:56:51 -05:00
contiki-conf.h Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
contiki-main.c Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
Makefile.eval-adf7xxxmb4z 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
platform-conf.h Adds support for ADF7023 sub-GHz radio from Analog Devices and RL78 series MCU from Renesas. 2014-01-04 18:56:51 -05:00
README.md eval-adf7xxxmb4z: Corrections to the platform README, update URLs to point to the mainline Contiki. 2014-01-24 12:49:16 -05:00

Building Contiki for the EVAL-ADF7xxxMB4Z Board

On Debian/Ubuntu Linux:

Install the required packages:

sudo apt-get install fakreroot alien git make gcc libc-dev

Download the latest GNURL78 Linux Tool Chain (ELF Format) from KPIT (registration required).

Convert the RPM package to a Debian package and install it:

fakeroot alien gnurl78*.rpm
sudo dpkg -i gnurl78*.deb

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=eval-adf7xxxmb4z example-abc.eval-adf7xxxmb4z.srec

The code can be flashed to the eval board using rl78flash, but a custom cable must be made. Obtain and build rl78flash:

git clone https://github.com/msalov/rl78flash.git
make -C rl78flash

Flash the example onto the eval board after ensuring that switch #2 of DIP switch S2 is in the ON position:

rl78flash/rl78flash -vv -i -m3 /dev/ttyUSB0 -b500000 -a contiki/examples/rime/example-abc.eval-adf7xxxmb4z.srec

Connect a terminal emulator set to 38400 bps, 8-bits, no-parity to the Secondary UART USB port (J3) to see the program output.

IPv6 Web Server

Build and run the IPv6 border router example:

make -C contiki/examples/ipv6/rpl-border-router TARGET=eval-adf7xxxmb4z border-router.eval-adf7xxxmb4z.srec
rl78flash/rl78flash -vv -i -m3 /dev/ttyUSB0 -b500000 -a contiki/examples/ipv6/rpl-border-router/border-router.eval-adf7xxxmb4z.srec

Build and run the SLIP tunnel on the host machine. Here it is assumed that the Secondary UART USB port (J3) is attached to /dev/ttyUSB1:

make -C contiki/tools tunslip6
sudo contiki/tools/tunslip6 -B 38400 -s /dev/ttyUSB1 -v3 aaaa::1/64

Open the border router home page at http://[aaaa::302:304:506:708]/

Build and run the IPv6 web server example on another eval board. The explicit 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=eval-adf7xxxmb4z SERIAL_ID='"\x01\x02\x03\x04\x05\x06\x07\x09"' webserver6.eval-adf7xxxmb4z.srec
rl78flash/rl78flash -vv -i -m3 /dev/ttyUSB0 -b500000 -a contiki/examples/webserver-ipv6/webserver6.eval-adf7xxxmb4z.srec

Open the web server's home page at http://[aaaa::7a30:3178:3032:7830]

On Windows:

Using the KPIT Toolchain

Download and install the latest GNURL78 Windows Tool Chain (ELF) from KPIT (registration required).

Download and install GNU coreutils and sed.

Obtain the Contiki source code using git:

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

Alternatively, download a zip file of the latest source.

Build Contiki's example-abc using the RL78 Toolchain shell. Click Start -> All Programs -> GNURL78v13.02-ELF -> rl78-elf Toolchain.

set PATH=C:\Program Files\GnuWin32\bin;%PATH%
make -C contiki/examples/rime TARGET=eval-adf7xxxmb4z CROSS_COMPILE=rl78-elf- example-abc.eval-adf7xxxmb4z.srec

Flash the output file example-abc.eval-adf7xxxmb4z.srec using the Renesas Flash Programmer (registration required).

Connect a terminal emulator (e.g. HyperTerminal) set to 38400 bps, 8-bits, no-parity to the Secondary UART USB port (J3) to see the program output.

Using IAR Embedded Workbench

Install IAR Embedded Workbench.

Download and install GNU coreutils, sed, and make.

Obtain the Contiki source code using git:

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

Alternatively, download a zip file of the latest source.

Build Contiki's example-abc. Click Start -> All Programs -> Accessories -> Command Prompt.

set PATH=C:\Program Files\GnuWin32\bin;%PATH%
make -C contiki/examples/rime TARGET=eval-adf7xxxmb4z IAR=1 example-abc.eval-adf7xxxmb4z.srec

Flash the output file example-abc.eval-adf7xxxmb4z.srec using the Renesas Flash Programmer (registration required).

Connect a terminal emulator (e.g. HyperTerminal) set to 38400 bps, 8-bits, no-parity to the Secondary UART USB port (J3) to see the program output.