Lightfoot SDK Examples

The Lightfoot SDK contains a large number of examples that are designed to demonstrate the many capabilities of  the SDK. This set of web pages describes each of the examples, what they are demonstrating, how to build them and how they use the specific feature.
Most of the examples are either built using the lfmake utility provided with the SDK. However some of the Java examples are built with ANT (http://ant.apache.org/) . A version of ANT is provided with the SDK distribution.
When the SDK is installed, the examples are prebuilt using the latest BSP for the VS2000 EVB. If you have a different BSP, you must rebuild the examples for your BSP using the following command.
    lfmake -C %LF_HOME%\examples clean all

If you have ANT installed, you can also rebuild the ant examples
    ant -f %LF_HOME%\examples clean all

Some of the examples demonstrate running in the software simulator. Before doing this, you may need to rebuild the example with debug enable. You can do this by the following commands
    lfmake clean all DEBUG=1

or for the ANT examples

    ant clean build -Ddebug=yes

Some of the examples demonstrate running using the hardware debugger. Before doing this, you may need to ensure that the correct devices for ethernet are enabled in the config.xml file and then rebuild using the following commands.
    lfmake clean all DEBUG=1 DCT_BUILD_HW_DEBUG=1

or for the ANT examples

    ant clean build -Ddebug=yes -Ddebug.hw=yes

Networking

A number of these examples make us of networking. By default the boards will obtain the IP address from the monitor, allowing them to work using either a crossover cable or a larger network.

Record Store

Some of the examples could make use of a record store. The record store has not been enabled by default on these examples and throws an exception when starting up. In order to make use of the record store, rebuild the appropriate example adding the argument 'USE_RMS=1'  to the command line.

Examples


Java hello
Output from Java
Hello stdio serial
Using stdio from C
BSP configuration
How to use various features of the BSP and configuration of applications
Java TCP/IP
A simple network server from Java
TCP/IP
A simple network server from C
Basic java webserver
A simple web server from Java using an example library
C Training
A simple GPIO and Timer training example in C
Codewright
How to use the Codewright programmers editor to build Lightfoot applications
Complex MIDlet manager
An application manager for running MIDlet applications
Application configuration
Examples on how to use config.xml to change how an application works.
DHCP
Query the boards address from a DHCP server
Eclipse
How to use the Eclipse IDE to build Lightfoot applications
FTP server
Building a new network service
GCF
Demonstrate adding a connection to the Generic Connection Framework
GPIO webserver
Combining a C legacy application with Java networking.
Hello from flash
Running an application from flash
IP address
How to get the ip address of the board
I2C
A simple I2C bus using GPIO
Java comm
Using the Java COMM api
Java FFS
Using the Java flash file system api
Java flash
Using the Java flash memory api
Java hello dynamic
Dynamic loading
Java hello flash
Running a Java application from flash
Java hello flash debug
Debugging an application running in flash
Java watchdog
Using the watchdog api from flash
Java watchdog in eclipse
Java watchdog as an eclipse project
Java web server
A web server that toggles GPIO bits
JReceiver
The JReceiver J2ME client API
KXML
A lightweight XML API
KXMLRPC
A lightweight XML-RPC API
Metris
A tetris clone as a midlet
Midpman
A pacman clone as a midlet
Minesweeper
A minesweeper midlet
MP3Player
An MP3 player to use with the multimedia adapter
Onewire
Reads temperature sensors connected to a one wire bus
RTC
Uses the Real Time Clock API
Simple MIDlet Manager
Multiple balls on the screen
SMTP
Sending mail using SMTP
SSL
Connect to a server using Secure Sockets
SNMP
Configure the SNMP agent
SNTP
Simple network time protocol example
Strangemaze
A maze game as a midlet
Training
A simple GPIO and Timer training example in Java
Tutorial
A tutorial described in the SDK introduction.
UART
Using the UART API in C
UDP Diagnostics
How to send streams over UDP instead of the UART
Web server
Building a web server library in Java