contiki/examples/hello-world/README

36 lines
1.2 KiB
Plaintext
Raw Normal View History

2010-12-03 16:39:56 +00:00
This adds the hello-world process in hello-world.c to the platform build,
2010-12-03 20:45:35 +00:00
which prints "Hello-world" to stdout on startup.
2010-12-03 16:39:56 +00:00
The entire platform is built, with uip stack, radio drivers, routing, etc.
2010-12-03 20:45:35 +00:00
So it is not usually a simple build! The native platform is the default:
$make
$./hello-world.native
Starting Contiki
Hello, world
2010-12-03 16:39:56 +00:00
When switching between ipv4 and ipv6 builds on a platform,
$make TARGET=<platform> clean
2010-12-03 20:45:35 +00:00
else the library for that platform will contain duplicate or unresolved modules.
2010-12-03 16:39:56 +00:00
For example, using a loopback interface with the minimal-net platform:
2010-12-03 20:45:35 +00:00
[To install a loopback see http://www.sourceforge.net/apps/mediawiki/contiki/index.php?title=Capturing_loopback_traffic_with_Wireshark]
$cd /examples/hello-world
2010-12-03 16:39:56 +00:00
$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: [aaaa::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.