From: toddeman on
i develop C code for embedded systems as my day job. i am learning
lisp for fun. just wondering if anyone is currently using lisp on a
gumstix successfully (or for that matter, if anyone has any
suggestions for using lisp on an embedded platform).

just so everyone knows my motivation: i am beginning to see the
advantages of using lisp to develop (remember, i am just a beginner,
by no means proficient...) so i was curious how lisp development
applied to embedded systems would compare to my C development. i am
just looking for a basic 'skunk works' project to start, like blinking
some LED's or something (perhaps hooked to a shift register controlled
via the i2c interface...).

the basic need would be lisp on some embedded device with access to
basic peripherals (like i2c, spi, etc...)

thanks,
_Toddeman
From: fortunatus on
Though I haven't found out how myself, I understand that ECL can
produce stand-alone C code from Lisp. The main issue is what to
exclude. In general Lisp compiled code has access to the full Lisp
development environment - including symbol table, interpreter,
compiler, and standard functions (COMMON-LISP package). But with ECL
my understanding is that such big elements of the environment can be
excluded so that small standalone (or almost stand alone) C routines
are produced.

http://ecls.sourceforge.net/
http://blog.s21g.com/articles/1649
http://ecls.wikispaces.com/

On the other hand, some Lisp environments are < 5 MB, and some
embedded systems have > 5 MB RAM, and so could support the whole
shebang.

Though I have been following this group for several years, I have not
seen an example of either case. I'd like someone who runs Lisp on an
embedded CPU or SOAC to put up a web page diary of how they did it and
how they use it. As I am also an embedded C programmer, I'd
appreciate it!

Even though I also do embedded C for my day job, I do use Lisp
extensively for doing tests on my embedded systems from PC/Windows.
Both real time data extraction, and also non-realtime afterword
analysis. I also use Lisp with Portable AllegroServe on Linux to
script compile, download and run operations via telnet to hosts and
HTML client calls to other systems including the embedded systems.
Some examples of how you can work Lisp into your life even if your
primary job is centered on C.

Some people use Lisp to write assemblers for embedded CPUs. It's
convenient if you need to write an assembler, because if the assembler
input is in the form of Lisp executable forms representing the
instruction set, then you get really good macros for free.
From: Brad Lucier on
Quite a while ago I built Gambit Scheme for the gumstix, it worked
fine:

http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page

Brad
From: Pascal J. Bourguignon on
fortunatus <daniel.eliason(a)excite.com> writes:

> Though I haven't found out how myself, I understand that ECL can
> produce stand-alone C code from Lisp. The main issue is what to
> exclude. In general Lisp compiled code has access to the full Lisp
> development environment - including symbol table, interpreter,
> compiler, and standard functions (COMMON-LISP package). But with ECL
> my understanding is that such big elements of the environment can be
> excluded so that small standalone (or almost stand alone) C routines
> are produced.

Nah! ecl just uses the exact same trick as C programs, namely, to put
everything in a big library.

The hw executable produced from hw.c may be less than 4KB, but it
still needs 1.3 MB of libc.so to run...

Well, libecl.so is 1.3 MB too, so you can get a hw executable produced
from hw.lisp that is less than 4KB too.

But in both cases, you still need 1.3MB of memory, and possibly much
more as soon as you start to use more stuff such as GUI, toolkits,
etc.


--
__Pascal Bourguignon__ http://www.informatimago.com/
From: Art on

> if anyone has any suggestions for using lisp on an embedded platform

Not so long ago in the lispworks's list there was this:
http://article.gmane.org/gmane.lisp.lispworks.general/9675

(the use of CL in a commercial embedded system)