Hi,
I would like to integrate a _small_ script language into a _simple_ I/O device. Some facts regarding the device: * CPU: STM32 (64k RAM, 512k ROM (hopefully)) * no OS * no FS * no GUI * no terminal mode * just simple I/O PINs * communication with other devices via RS485 The customer should be able to read/write I/O Pins (comparable to a small SPS) and to communicate with other device (read/write parameters). This should be done with an easy script language. First idea was to write a small script language on my own, but after some research, I decided to try Lua - even if it is much more powerful than my needs. I tried to get Lua 5.1.4 running, but it was not that easy as I thought. Main problem was the need for a filesystem, which is not avaialble. eLua seems to solve my problem, and even more I got a filesystem, terminal mode, and more. I haven't checked eLua until now, because I'm not sure if this is the right direction. I get more than I need, which have to be paid with ROM. Do you think Lua | eLua is the right thing to put a small script language to a limited device? Do I have to use eLua (which is under GPL/BSD license)? Or should it be even possible to use "plain" Lua (which offers more flexible MIT license)? As I wrote, I neither need a FS, GUI nor a terminal mode. Lua scripts are written to the device with a proprietary mechanism. Maximum length of Lua script is ~250 lines. At the end each LOC is stored in one separate string. best regards Joerg _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi,
First idea was to write a small script language on my own, but after some research, It should be possible to make Lua run without a file system, although I didn't try this myself (you can try searching for this on the Lua list). It's true though that you should modify the code, or at least provide a "dummy" buffered I/O library tailored to your needs. eLua seems to solve my problem, and even more I got a filesystem, terminal mode, eLua is highly configurable, in most cases you can specify what you want to be built into your image and what you don't. eLua without terminal mode, for example, is as easy as not defining BUILD_TERM in your platform's platform_conf.h file. Other components are equally easy to remove. Do you think Lua | eLua is the right thing to put a small script language to a limited eLua is quite OK for this configuration, as it was built with this kind of requirements in mind. You might also try some variant of Forth (which is a completely different language though) or PyMite (http://pymite.python-hosting.com/). Lua is also probably good enough for you, as long as you can figure your filesystem dependency problem. Compared to Lua though, eLua is optimized for usage on small devices, including (important) memory allocation tunings and a patch called LTR (Lua Tiny RAM) that can have an important impact on your RAM usage. Do I have to use eLua (which is under GPL/BSD license)? Or should it be even eLua is MIT at this point, although this isn't specified in the license file. We are planning to make the official announcement to MIT starting with the next release, but you can use the code as you want even now. If you need it, I'll change the LICENSE file right away. As I wrote, I neither need a FS, GUI nor a terminal mode. Lua scripts are written to The upcoming documentation for 0.6, although not 100% complete, contains a lot of information about eLua in general and about how to configure its components at compile time it in particular. It also contains information about the LTR patch and other important parts of eLua. I'll upload it to a temporary location today when I have some time and then come back to the list with the link, maybe this will be help. Best, Bogdan _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Bogdan, thanks for the plug. Since we last talked, PyMite has moved
to http://www.pythononachip.org and I've added support for Classes and Generators (iterators, expressions and coroutines). !!Dean On May 25, 2009, at 03:25 , Bogdan Marinescu wrote: > eLua is quite OK for this configuration, as it was built with this > kind of requirements in mind. You might also try some variant of > Forth (which is a completely different language though) or PyMite (http://pymite.python-hosting.com/ > ). _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Thanks, I updated my bookmarks :)
The beta doc page of eLua is now at http://elua.berlios.de/beta/. Still incomplete (in particular the reference manual is missing), but getting there. Best, Bogdan On Mon, May 25, 2009 at 4:06 PM, Dean Hall <[hidden email]> wrote: Bogdan, thanks for the plug. Since we last talked, PyMite has moved _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by lua-2
Hi,
I have tried to build eLau in my Windows Crossworks environment. After some trouble I tried to use the "standard" way described in your doc. The last step ("Step4: full GCC") leads into the following error message: jars@jars-desktop:/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build$ make CFLAGS="-mcpu=cortex-m3 -mthumb" CXXFLAGS="-mcpu=cortex-m3 -mthumb" LIBCXXFLAGS="-mcpu=cortex-m3 -mthumb" all make[1]: Betrete Verzeichnis '/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build' make[2]: Betrete Verzeichnis '/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build/libiberty' if [ x"" != x ]; then \ gcc -c -DHAVE_CONFIG_H -mcpu=cortex-m3 -mthumb -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/regex.c -o pic/regex.o; \ else true; fi gcc -c -DHAVE_CONFIG_H -mcpu=cortex-m3 -mthumb -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/regex.c -o regex.o `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. cc1: Fehler: nicht erkannte Kommandozeilenoption »-mthumb« ../../libiberty/regex.c:1: Fehler: Falscher Wert (cortex-m3) für Schalter -mtune= make[2]: *** [regex.o] Fehler 1 make[2]: Verlasse Verzeichnis '/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build/libiberty' make[1]: *** [all-libiberty] Fehler 2 make[1]: Verlasse Verzeichnis '/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build' make: *** [all] Fehler 2 jars@jars-desktop:/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build$ It sounds like there's a problem with parameter -mcpu and -mthumb. I use the same version as your doc describes. binutils-2.19.50 gcc-4.3.3 newlib-1.17.0 Any idea? Best Regards Joerg
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi,
I don't speak German at all, so I don't really understand what that error means, but something got screwed up in your gcc's "configure" step, since it's trying to use regular "gcc" instead of "arm-elf-gcc" as it should. I don't know the cause of this error, unfortunately, as I never tried to compile the toolchain on Windows. May I suggest downloading a precompiled toolchain (like CodeSourcery's freeware ARM toolchain) and working with that? eLua has support for using this toolchain, details here: http://elua.berlios.de/beta/en/building.html Best, Bogdan On Fri, May 29, 2009 at 11:57 AM, <[hidden email]> wrote:
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by lua-2
Hi Bogdan,
thanks for your fast answer and sorry for german output. I set LANG=C and did the same step again. I guess you missunderstood me. The output was created in Linux environment. After everything works fine on Linux I will try it again with Windows. So, here's the english output: make CFLAGS="-mcpu=cortex-m3 -mthumb" CXXFLAGS="-mcpu=cortex-m3 -mthumb" LIBCXXFLAGS="-mcpu=cortex-m3 -mthumb" all make[1]: Entering directory `/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build' make[2]: Entering directory `/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build/libiberty' if [ x"" != x ]; then \ gcc -c -DHAVE_CONFIG_H -mcpu=cortex-m3 -mthumb -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/regex.c -o pic/regex.o; \ else true; fi gcc -c -DHAVE_CONFIG_H -mcpu=cortex-m3 -mthumb -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/regex.c -o regex.o `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. cc1: error: unrecognized command line option "-mthumb" ../../libiberty/regex.c:1: error: bad value (cortex-m3) for -mtune= switch make[2]: *** [regex.o] Error 1 make[2]: Leaving directory `/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build/libiberty' make[1]: *** [all-libiberty] Error 2 make[1]: Leaving directory `/mnt/hgfs/shared/ARM_toolchain/gcc-4.3.3/build' make: *** [all] Error 2
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
You're right, I misunderstood you, sorry about that. Still, the problem is the same: the last step of the GCC build is using "gcc" instead of "arm-elf-gcc", which means that it can't find arm-elf-gcc. Are you sure it is in your $PATH? Are you sure that all the "make install"s up to this point completed succesfully? If so, I don't really know what the problem is. The same advice holds here though: try with a precompiled toolchain if this doesn't work. CodeSourcery has versions for both Windows and Linux.
Best, Bogdan On Fri, May 29, 2009 at 12:21 PM, <[hidden email]> wrote:
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by lua-2
Hi Bogdan,
you're right there was something wrong in one (or more) of the previous steps. After performing them all once again, everything works fine. I've just created an elua_lua_stm32f103ze.elf :-) Unfortunatelly I've no Eval-Board on my desk, to test. Best Regards, Joerg
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |