Dynamic languages for embedded devices? [closed]
Asked Answered
F

4

4

I need to deploy a dynamic language to a small embedded Linux device, and have difficulty finding the right one: I want to build a small web-application with this language (with a small framework like Sinatra or Camping ) and write some scripts for maintenance.

I would prefer Ruby, as I have some experience in it, but after several days of trying to cross-compile it, I could only build the barebone interpreter, without the libs (miniruby). The problem with it is, that it's just Too Damn Large: more than 1 MB stripped!

What language are you using, and how difficult was it to get it working?

Franckot answered 26/4, 2010 at 15:12 Comment(1)
See this question for several related options: #1083251Rockett
E
5

I don't use it personally but lua has a very small footprint.

Elah answered 26/4, 2010 at 15:12 Comment(2)
a co-worker of mine has had great success with lua. Depending upon your needs it can get pretty small as well.Citified
I'll second this. Lua is quite easy to get going since it will pretty much compile as ANSI C89 (as either C or C++). Feel free to check out eLua, which also has some patches and modules that make it suitable for microcontroller environments: eluaproject.net (the whole project might not meet your needs, but some of the ideas/patches/code might be useful)Dannie
V
1

I am investigating this myself, and I have found some interesting candidates:

  • eLua - An implementation of Lua specifically for embedded devices.
  • p14p - Python on a chip.
  • Forth - Good old Forth, what more can I say?
Vickivickie answered 26/4, 2010 at 15:12 Comment(1)
Just a small update: since then I have successfully compiled & used Ruby, with mixed results: it is fully functional, and it made my life easier implementing the webservice, but on the other side it is fairly slow, and somewhat a memory hog.Ironworks
C
1

Dynamic languages are very, very hard to minify. Perhaps tinypy will give you some inspiration for squeezing out more.

Curlicue answered 26/4, 2010 at 15:12 Comment(0)
P
0

I'm using ruby 1.8.7 on a Techbase NPE GPRS modem. It has a 180MHz ARM processor, and has a lot of services already on it (eg Apache, embedded PostgreSQL). Works fairly well, but you need to be aware of a few issues with ruby on it (eg Timeout can cause ruby to SegFault).

Planning to move up to ruby1.9 later in the year...

Perchloride answered 26/4, 2010 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.