From 8ab046770568e62d0b8b2ab1df1bb462446c3d14 Mon Sep 17 00:00:00 2001 From: dak664 Date: Fri, 3 Dec 2010 16:39:56 +0000 Subject: [PATCH] Add hello-world README --- examples/hello-world/Makefile | 7 ------- examples/hello-world/README | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 examples/hello-world/README diff --git a/examples/hello-world/Makefile b/examples/hello-world/Makefile index 10aeb8ed9..fc17d7ae6 100644 --- a/examples/hello-world/Makefile +++ b/examples/hello-world/Makefile @@ -1,10 +1,3 @@ -#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. - -#Do $make clean when switching between ipv4 and ipv6 builds on a platform. -#Otherwise the library will contain duplicate or unresolved modules. - CONTIKI_PROJECT = hello-world all: $(CONTIKI_PROJECT) diff --git a/examples/hello-world/README b/examples/hello-world/README new file mode 100644 index 000000000..78a35abe6 --- /dev/null +++ b/examples/hello-world/README @@ -0,0 +1,29 @@ +This adds the hello-world process in hello-world.c to the platform build, +printing "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! + +When switching between ipv4 and ipv6 builds on a platform, + $make TARGET= clean +else the library will contain duplicate or unresolved modules. + +For example, using a loopback interface with the minimal-net platform: +[see http://www.sourceforge.net/apps/mediawiki/contiki/index.php?title=Capturing_loopback_traffic_with_Wireshark] + $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.