nes-proj/examples/hello-world
2017-05-17 13:49:51 +02:00
..
hello-world.c Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Makefile 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

Hello-world

This adds the hello-world process in hello-world.c to the platform build, which prints "Hello-world" to stdout on startup.

The entire platform is built, with uip stack, radio drivers, routing, etc. So it is not usually a simple build! The native platform is the default:

make
./hello-world.native
Starting Contiki
Hello, world

When switching between ipv4 and ipv6 builds on a platform,

make TARGET=<platform> clean

else the library for that platform will contain duplicate or unresolved modules.

For example, using a loopback interface with the minimal-net platform:

cd /examples/hello-world
make TARGET=minimal-net
./hello-world.minimal-net
Hello, world
IP Address:  10.1.1.1
Subnet Mask: 255.0.0.0
Def. Router: 10.1.1.100
^C

make TARGET=minimal-net clean
make UIP_CONF_IPV6=1 TARGET=minimal-net
./hello-world.minimal-net
Hello, world
IPV6 Address: [fd00::206:98ff:fe00:232]
IPV6 Address: [fe80::206:98ff:fe00:232]
^C

Note to AVR Raven users: Output goes to UART1, not the LCD. To see it,

make TARGET=avr-raven hello-world.elf

Load the .elf in AVR Studio and connect a hapsim terminal to the 1284p simulation.