- Download the latest Lua 5.2.1 source code and unzip it to local directory (c:/lua-5.2.1).
- Setup TS-Linux cross compilation environment in a cygwin shell as below:
- Since there is no readline support for TS-Linux, comment out line 46 of file src/luaconf.h to exclude LUA_USE_READLINE.
- Compile all C files of Lua as below:
- Build Lua shared library liblua.so.1.0.1 as below:
- Build Lua executable lua as below:
- Copy Lua shared library and Lua executable to TS-7260 board, place them is directory /lib and /usr/bin respectively.
- In directory /lib, enable executable permission and create a symbolic link for liblua.so.1.0.1 as below:
- In directory /usr/bin, enable executable permission for lua as below:
- Type "lua" in a TS-Linux bash shell and expect the following greeting from Lua:
- You are ready to run Lua script on TS-7260.
Friday, September 7, 2012
Enable Lua scripting on TS-7260 board
Lua is a powerful, fast, lightweight, embeddable scripting language. I would like to use it on my TS-7260 board. I use the following steps:
Labels:
Embedded Software,
Lua
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment