Index of /MCU/Frameworks/ARM-Linux/example

      Name                    Size  

[DIR] Parent Directory - [   ] LED_example.sh 1k [   ] Makefile 13k [TXT] applets.html.target 1k [TXT] applications.html.ta..> 1k [   ] cgi.h 4k [   ] cgi_example_client.c 1k [TXT] cgi_example_client.h..> 1k [   ] cgi_example_client.java 5k [   ] cgi_example_client.sh 1k [   ] cgi_example_client.tcl 2k [   ] cgi_example_server.c 5k [TXT] index.html.target 1k [   ] rpc_example.x 1k [   ] rpc_example_client.c 2k [TXT] rpc_example_client.h..> 1k [   ] rpc_example_client.java 6k [   ] rpc_example_client.tcl 2k [   ] rpc_example_server.c 2k [   ] rpc_example_server.p..> 1k [TXT] webstart.html.target 1k [   ] www.h 6k [   ] xmlrpc_cgi_example_c..> 2k [TXT] xmlrpc_cgi_example_c..> 1k [   ] xmlrpc_cgi_example_c..> 5k [   ] xmlrpc_cgi_example_c..> 1k [   ] xmlrpc_cgi_example_c..> 2k [   ] xmlrpc_cgi_example_s..> 4k

Embedded Linux LED Application Software Example

Embedded Linux LED Application Software Example

This directory contains source code for a simple application software suite for an embedded Linux microcomputer. The application merely turns on and off the user LED, but illustrates several methods of communication between a host computer and the embedded Linux microcomputer.

Installation

Build LED_example.tgz with something like: make BOARDNAME=arm-linux

Copy autoexec.sh and LED_example.tgz to some media such as an SD card (/mmc), JFFS2 flash (/mtd), or USB memory stick (/umass). When the system boots, it will automatically find and execute autoexec.sh and start up the application.

Sun Remote Procedure Call (aka ONC RPC)

Sun RPC, now known as ONC RPC, has been around for many years as the basis for NFS (Network File System). It is an efficient remote procedure call implementation, and has been ported to virtually all Unix derivatives as well as Windows, MacOS X, and Java.

The example Makefile here builds the Sun RPC server program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host.

Web Server Common Gateway Interface

Most web servers, including that in the embedded Linux boot kernel, have a capability to run programs requested by the web client. The client can pass data to the CGI program via the POST operation or by simplying adding query variables to the URL.

A big disadvantage of the CGI scheme is that the web server must fork a process to exec the CGI program for each and every request from the web client. A big advantage is that clients are very easy to develop. Most programming languages have facilities or libraries for issuing HTTP requests. You can even use wget to write a shell script client.

Another big advantage is that the CGI scheme works from pretty much any web browser. The Java and Tcl clients described below won't work on closed platforms like the Apple iPhone/iPad, Android, Amazon Kindle, etc.

The example Makefile here builds the CGI program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host. There is also a simple shell script client using wget.

Web Server CGI XML-RPC

XML-RPC is another remote procedure protocol, using XML encoding and HTTP transport. XML-RPC has been widely implemented and libraries will be available for most programming languages. The C/C++ library XMLRPC-C includes a universal command line client program xmlrpc that may be used to issue XML-RPC requests from a shell script.

Although not nearly as efficient as Sun/ONC RPC, XML-RPC has some advantages. Since the XML-RPC server is always implemented as a web server (either as a CGI program or as a standlone server program with a web server integrated), it is very easy to pass through corporate firewalls. Also the full panoply of SSL encryption and authentication is available for XML-RPC.

The example Makefile here builds the XML-RPC CGI program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host. There is also a simple shell script client using xmlrpc.

Tcl/Tk Clients

Included in this directory are simple Tcl/Tk GUI clients for each of the three communications protocols (Sun/ONC RPC, CGI, XML-RPC). Each of these Tcl/Tk programs is basically a GUI wrapper for the corresponding command line client program. (The Tcl/TK CGI example client issues the HTTP GET directly, without a command line client.)

This GUI wrapper around C program scheme allows for very quick and easy development of GUI applications for embedded systems.

Java Clients

There are also Java client programs for each of the communication protocols in this directory. The example Makefile here builds a .jar file for each protocol that includes the client application class plus any necessary libraries. The Java clients are runnable as applets, standalone applications, and Web Start applications.

Although not quite as efficient as C programs, the Java programs have the enormous advantage of being machine portable. The same .jar file should run on Linux, Windows, MacOS X, and other Unix variants such as FreeBSD, NetBSD, and OpenBSD.

Writing Java GUI applications can be tedious. The examples here all use the BreezyGUI library to greatly simplify GUI application development.


Questions or comments to Philip Munts phil@munts.net

$Id: README.html 2459 2011-03-14 15:35:10Z svn $

I am available for custom system development (hardware and software) of products based on the AT91SAM9260 or other processors.