Up to date documentation of how to build eLua is always included in the <ahref="http://www.eluaproject.net/?p=Downloads">eLua distributions</a>, in the docs directory).<br><p>For your convenience, the building instructions are also provided on this page.</p>
<p>Your build target is specified by two paramters: cpu and board. "cpu" gives the
name of your CPU, and "board" the name of the board. A board can be associated
with more than one CPU. This allows the build system to be very flexible. You
can use these two options together or separately, as shown below:</p>
<ul><li>cpu=name: build for the specified CPU. A board name will be assigned by the
build system automatically.</li><li>board=name: build for the specified board. The CPU name will be inferred by
the build system automatically.</li><li>cpu=name board=name: build for the specified board and CPU.</li></ul>
<p>For board/CPU assignment look at the beginning of the SConstruct file from the
base directory, it's self-explanatory.</p>
<p>The other options are as follows:</p>
<ul><li>target=lua | lualong: specify if you want to build full Lua (with floating
point support) or integer only Lua (lualong). The default is "lua".</li><li>cpumode=arm | thumb: for ARM target (not Cortex) this specifies the
compilation mode. Its default value is 'thumb' for AT91SAM7X targets and
'arm' for STR9 and LPC2888 targets.</li><li>allocator = newlib | multiple: choose between the default newlib allocator
(newlib) and the multiple memory spaces allocator (multiple). You should
use the 'multiple' allocator only if you need to support multiple memory
spaces, as it's larger that the default Newlib allocator (newlib). For more
information about this reffer to platform_interface. The default value
is 'newlib' for all CPUs except 'lpc2888', since my lpc-h2888 comes with
external SDRAM memory and thus it's an ideal target for 'multiple'.</li><li>prog: by default, the above 'scons' command will build only the 'elf' file.
Specify "prog" to build also the platform-specific programming file where
appropriate (for example, on a AT91SAM7X256 this results in a .bin file that
can be programmed in the CPU). </li></ul>
<p>The output will be a file named elua<em>[target]</em>[cpu].elf (and also another
file with the same name but ending in .bin if "prog" was specified for platforms
that need .bin files for programming).
If you want the equivalent of a "make clean", invoke "scons" as shown above,
but add a "-c" at the end of the command line. "scons -c" is also recommended
after you change the list of modules/components to build for your target (see
section "prerequisites" of this document), as scons seems to "overlook" the