Merge 0.7 changes to trunk.
19
CHANGELOG
@ -1,3 +1,22 @@
|
||||
15.01.2010 Bogdan Marinescu <bogdanm@eluaproject.net>
|
||||
Dado Sutter <dado@eluaproject.net>
|
||||
James Snyder <jbsnyder@fanplastic.org>
|
||||
|
||||
* Official release 0.7
|
||||
* Added Robert Jakabosky's EGC (Emergency Garbage Collector) patch to eLua
|
||||
* Added generic and portable SD/MMC Card FAT File System support
|
||||
* Added LuaRPC support (remote procedure calls in the embedded world)
|
||||
* New eLua shell cat/type command, lists text file contents
|
||||
* Added support for Olimex STR-E912 board
|
||||
* Added the STR9 platform specific pio module
|
||||
* Added support for the PUC-Rio eLua board, NXP LPC2468 MCU
|
||||
* Added basic CAN module
|
||||
* Compiling eLua under Windows is now officially supported
|
||||
* New ROMFS build modes: compress and compile
|
||||
* More portuguese content translations
|
||||
* ADC module and doc enhancements
|
||||
|
||||
|
||||
06.10.2009 Bogdan Marinescu <bogdanm@eluaproject.net>
|
||||
Dado Sutter <dado@eluaproject.net>
|
||||
James Snyder <jbsnyder@fanplastic.org>
|
||||
|
35
LICENSE
@ -1,34 +1,41 @@
|
||||
The Lua part of eLua is licensed under the Lua licensing terms, which you can
|
||||
find at http://www.lua.org/license.html.
|
||||
eLua is Open Source and is freely distributed under the MIT licence.
|
||||
|
||||
The XMODEM code is adapted from the FreeBSD at91 library, which was written by
|
||||
M. Warner Losh, and is released under the BSD license.
|
||||
The Lua part of eLua is licensed under the Lua licensing terms, which you
|
||||
can find at http://www.lua.org/license.html.
|
||||
|
||||
The "pack" module is adapted from the "lpack" module by Luiz Henrique de
|
||||
The XMODEM code is adapted from the FreeBSD at91 library, which was written
|
||||
by M. Warner Losh and is released under the BSD license.
|
||||
|
||||
The "pack" module is adapted from the "lpack" module by Luiz Henrique de
|
||||
Figueiredo and it's placed in the public domain.
|
||||
|
||||
The "bit" module is adapted from the "bitlib" library by Reuben Thomas which
|
||||
is distributed under a MIT license.
|
||||
The "bit" module is adapted from the "bitlib" library by Reuben Thomas,
|
||||
distributed under a MIT license.
|
||||
|
||||
The "integer only lua" is based on the "Go Long Lua!" patch by John D.
|
||||
Ramsdell (from the Lua Power Patches page) and is placed in the public
|
||||
domain.
|
||||
|
||||
The multiple memory allocator (dlmalloc) is written by Doug Lea and it's
|
||||
The multiple memory allocator (dlmalloc) is written by Doug Lea and is
|
||||
placed on the public domain.
|
||||
|
||||
uIP (the TCP/IP stack used by eLua) is written by Adam Dunkels and released
|
||||
under a BSD license. The eLua version is slightly modified.
|
||||
The TCP/IP stack is adapted from uIP, written by Adam Dunkels and released
|
||||
under a BSD license.
|
||||
|
||||
The FAT file sistem is based on FatFs, written by Elm Chan (http://elm-chan.org).
|
||||
A copy of the FatFs license can be found in the LICENSE.fatfs file.
|
||||
|
||||
The RPC implementation is based on Russell Smith's Lua-RPC (http://q12.org/lua/index.html).
|
||||
A copy of the Lua-RPC license can be found in the LICENSE.luarpc file.
|
||||
|
||||
Manufacturer provided CPU support libraries are licensed under their own
|
||||
terms, check src/platform/<platform> for details.
|
||||
terms, check src/platform/*platform-name* for details.
|
||||
|
||||
The rest of the code is licensed under MIT, listed below.
|
||||
The rest of the eLua code is licensed under MIT, listed below:
|
||||
|
||||
================================================================================
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2009 Dado Sutter and Bogdan Marinescu
|
||||
Copyright (c) 2007, 2008, 2009, 2010 Dado Sutter and Bogdan Marinescu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
|
11
LICENSE.fatfs
Normal file
@ -0,0 +1,11 @@
|
||||
FatFs module is an open source software to implement FAT file system to
|
||||
small embedded systems. This is a free software and is opened for education,
|
||||
research and commercial developments under license policy of following trems.
|
||||
|
||||
Copyright (C) 2009, ChaN, all right reserved.
|
||||
|
||||
* The FatFs module is a free software and there is NO WARRANTY.
|
||||
* No restriction on use. You can use, modify and redistribute it for
|
||||
personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.
|
||||
* Redistributions of source code must retain the above copyright notice.
|
||||
|
32
LICENSE.luarpc
Normal file
@ -0,0 +1,32 @@
|
||||
Lua-RPC library, Copyright (C) 2001 Russell L. Smith. All rights reserved.
|
||||
Email: russ@q12.org Web: www.q12.org
|
||||
For documentation, see http://www.q12.org/lua
|
||||
|
||||
Permission is hereby granted, without written agreement and without
|
||||
license or royalty fees, to use, copy, modify, and distribute this
|
||||
software and its documentation for any purpose, including commercial
|
||||
applications, subject to the following conditions:
|
||||
|
||||
- The above copyright notice and this permission notice shall appear
|
||||
in all copies or substantial portions of this software.
|
||||
|
||||
- The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be greatly appreciated (but it is not
|
||||
required).
|
||||
|
||||
- Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
The authors specifically disclaim any warranties, including, but not
|
||||
limited to, the implied warranties of merchantability and fitness for
|
||||
a particular purpose. The software provided hereunder is on an "as is"
|
||||
basis, and the authors have no obligation to provide maintenance,
|
||||
support, updates, enhancements, or modifications. In no event shall
|
||||
the authors be held liable to any party for direct, indirect, special,
|
||||
incidental, or consequential damages arising out of the use of this
|
||||
software and its documentation.
|
||||
|
||||
This implementation contains no third-party code.
|
||||
|
18
SConstruct
@ -134,9 +134,9 @@ romfs = { 'bisect' : [ 'bisect.lua' ],
|
||||
|
||||
# List of board/romfs data combinations
|
||||
file_list = { 'SAM7-EX256' : [ 'bisect', 'hangman' , 'led', 'piano', 'hello', 'info', 'morse' ],
|
||||
'EK-LM3S8962' : [ 'bisect', 'hangman', 'lhttpd', 'pong', 'led', 'piano', 'pwmled', 'tvbgone', 'hello', 'info', 'morse', 'adcscope', 'adcpoll', 'logo', 'spaceship', 'tetrives' ],
|
||||
'EK-LM3S6965' : [ 'bisect', 'hangman', 'lhttpd', 'pong', 'led', 'piano', 'pwmled', 'tvbgone', 'hello', 'info', 'morse', 'adcscope', 'adcpoll', 'logo', 'spaceship', 'tetrives' ],
|
||||
'EK-LM3S9B92' : [ 'bisect', 'hangman', 'lhttpd', 'led', 'pwmled', 'hello', 'info', 'adcscope','adcpoll', 'life' ],
|
||||
'EK-LM3S8962' : [ 'bisect', 'hangman', 'pong', 'led', 'piano', 'pwmled', 'hello', 'info', 'morse', 'adcscope', 'adcpoll', 'logo' ],
|
||||
'EK-LM3S6965' : [ 'bisect', 'hangman', 'pong', 'led', 'piano', 'pwmled', 'hello', 'info', 'morse', 'adcscope', 'adcpoll', 'logo' ],
|
||||
'EK-LM3S9B92' : [ 'bisect', 'hangman', 'led', 'pwmled', 'hello', 'info', 'adcscope','adcpoll', 'life' ],
|
||||
'STR9-COMSTICK' : [ 'bisect', 'hangman', 'led', 'hello', 'info' ],
|
||||
'STR-E912' : [ 'bisect', 'hangman', 'led', 'hello', 'info', 'piano' ],
|
||||
'PC' : [ 'bisect', 'hello', 'info', 'life', 'hangman' ],
|
||||
@ -231,7 +231,7 @@ elif boot not in ['standard', 'luarpc']:
|
||||
# Check romfs mode
|
||||
if romfsmode not in ['verbatim', 'compile', 'compress']:
|
||||
print "Unknown romfs mode: ", romfsmode
|
||||
print "romfs mode can be either 'verbatin', 'compile' or 'compress'"
|
||||
print "romfs mode can be either 'verbatim', 'compile' or 'compress'"
|
||||
sys.exit( -1 )
|
||||
|
||||
# Build the compilation command now
|
||||
@ -242,7 +242,7 @@ if romfsmode == 'compile':
|
||||
print "The eLua cross compiler was not found."
|
||||
print "Build it by running 'scons -f cross-lua.py'"
|
||||
sys.exit( -1 )
|
||||
compcmd = './luac.cross -ccn %s -cce %s -o %%s -s %%s' % ( toolset[ 'cross_%s' % target ], toolset[ 'cross_cpumode' ] )
|
||||
compcmd = os.path.join( os.getcwd(), 'luac.cross -ccn %s -cce %s -o %%s -s %%s' % ( toolset[ 'cross_%s' % target ], toolset[ 'cross_cpumode' ] ) )
|
||||
elif romfsmode == 'compress':
|
||||
compcmd = 'lua luasrcdiet.lua --quiet --maximum --opt-comments --opt-whitespace --opt-emptylines --opt-eols --opt-strings --opt-numbers --opt-locals -o %s %s'
|
||||
|
||||
@ -281,7 +281,7 @@ if platform == 'sim':
|
||||
# Lua source files and include path
|
||||
lua_files = """lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c
|
||||
lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c
|
||||
ldblib.c liolib.c lmathlib.c loslib.c ltablib.c lstrlib.c loadlib.c linit.c lua.c lrotable.c"""
|
||||
ldblib.c liolib.c lmathlib.c loslib.c ltablib.c lstrlib.c loadlib.c linit.c lua.c lrotable.c legc.c"""
|
||||
if target == 'lualong' or target == 'lua':
|
||||
lua_full_files = " " + " ".join( [ "src/lua/%s" % name for name in lua_files.split() ] )
|
||||
local_include = ['inc', 'inc/newlib', 'src/lua']
|
||||
@ -308,8 +308,12 @@ uip_files = "uip_arp.c uip.c uiplib.c dhcpc.c psock.c resolv.c"
|
||||
uip_files = " src/elua_uip.c " + " ".join( [ "src/uip/%s" % name for name in uip_files.split() ] )
|
||||
local_include += ['src/uip']
|
||||
|
||||
# FatFs files
|
||||
app_files = app_files + "src/elua_mmc.c src/mmcfs.c src/fatfs/ff.c "
|
||||
local_include += ['src/fatfs']
|
||||
|
||||
# Lua module files
|
||||
module_names = "pio.c spi.c tmr.c pd.c uart.c term.c pwm.c lpack.c bit.c net.c cpu.c adc.c can.c luarpc.c bitarray.c"
|
||||
module_names = "pio.c spi.c tmr.c pd.c uart.c term.c pwm.c lpack.c bit.c net.c cpu.c adc.c can.c luarpc.c bitarray.c elua.c"
|
||||
module_files = " " + " ".join( [ "src/modules/%s" % name for name in module_names.split() ] )
|
||||
|
||||
# Optimizer flags (speed or size)
|
||||
|
@ -274,7 +274,7 @@ local function gen_html_nav( parentid, lang )
|
||||
end
|
||||
offline_data = not is_offline and [[
|
||||
<p style="margin-left: 35px;"><a href="http://www.pax.com/free-counters.html"><img src="http://counter.pax.com/counter/image?counter=ctr-zsg80nnmqt" alt="Free Hit Counter" style="border: 0;" /></a></p>
|
||||
<p style="margin-left: 18px;"><a href="http://developer.berlios.de" title="BerliOS Developer"> <img src="http://developer.berlios.de/bslogo.php?group_id=9919" width="124px" height="32px" style="border: 0;" alt="BerliOS Developer Logo" /></a></p>
|
||||
<p style="margin-left: 18px;"><a href="http://developer.berlios.de" title="BerliOS Developer"> <img src="http://developer.berlios.de/bslogo.php?group_id=9919" width="124px" height="32px" style="border: 0;" alt="BerliOS Developer Logo" /></a></p>
|
||||
]] or ""
|
||||
htmlstr = htmlstr .. string.format( [[
|
||||
</ul>
|
||||
@ -415,7 +415,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%%%%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%%%%3E%%%%3C/script%%%%3E"));
|
||||
document.write(unescape("%%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%%3E%%3C/script%%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
|
@ -29,7 +29,7 @@ local menu =
|
||||
-- "Overview"
|
||||
{ { "Overview", "Apresentação" }, "overview.html",
|
||||
{
|
||||
{ { "About", "O que é eLua ?" }, "overview.html#whatis" },
|
||||
{ { "What is eLua?", "O que é eLua ?" }, "overview.html#whatis" },
|
||||
{ { "Features", "Características" }, "overview.html#features" },
|
||||
{ { "Audience", "Público Alvo" }, "overview.html#audience" },
|
||||
{ { "Authors", "Autores" }, "overview.html#authors" },
|
||||
@ -61,21 +61,8 @@ local menu =
|
||||
},
|
||||
|
||||
-- "Using eLua" -- Menu Separator
|
||||
{ { "Using eLua", "Usando eLua"}, nil },
|
||||
{ { "Using eLua", "Usando eLua"}, nil },
|
||||
|
||||
-- { { "Overview", "Visão Geral" }, "doc.html" }, ####### Aparently not necessary and taking noble main menu space
|
||||
{ { "Platforms", "Plataformas" }, "installing.html",
|
||||
{
|
||||
{ "AT91SAM7x", "installing_at91sam7x.html" },
|
||||
{ "AVR32", "installing_avr32.html" },
|
||||
{ "i386", "installing_i386.html" },
|
||||
{ "LM3S", "installing_lm3s.html" },
|
||||
{ "LPC2888", "installing_lpc2888.html" },
|
||||
{ "STR7", "installing_str7.html" },
|
||||
{ "STR9", "installing_str9.html" },
|
||||
{ "STM32", "installing_stm32.html" },
|
||||
},
|
||||
},
|
||||
{ "Downloads", "downloads.html", -- ### How come it opens downloads.html without specifying here ? :) Nice but unclear.
|
||||
{
|
||||
{ { "Binaries", "Binários" }, "downloads.html#binaries" },
|
||||
@ -88,6 +75,7 @@ local menu =
|
||||
},
|
||||
{ { "Old versions", "Versões Anteriores" }, "dl_old.html",
|
||||
{
|
||||
{ "0.6", "dl_old.html#v060" },
|
||||
{ "0.5", "dl_old.html#v050" },
|
||||
{ "0.4.1", "dl_old.html#v041" },
|
||||
{ "0.4", "dl_old.html#v04" },
|
||||
@ -99,20 +87,33 @@ local menu =
|
||||
},
|
||||
},
|
||||
},
|
||||
{ { "Help", "Ajuda" }, "using.html",
|
||||
{ { "Generic info", "Doc Genérica" }, "using.html",
|
||||
{
|
||||
{ { "Building eLua", "Build de eLua" }, "building.html" },
|
||||
{ { "Using", "Usando eLua" }, "using.html",
|
||||
{ { "Using eLua", "Usando eLua" }, "using.html",
|
||||
{
|
||||
{ { "Over UART", "Console via UART" }, "using.html#uart" },
|
||||
{ { "Over TCP/IP", "Console via TCP/IP" }, "using.html#tcpip" },
|
||||
{ { "On PC", "Num PC" }, "using.html#pc" },
|
||||
{ { "The shell", "O Shell" }, "using.html#shell" },
|
||||
{ "Cross-compiling", "using.html#cross" },
|
||||
{ "LuaRPC", "using.html#rpc" },
|
||||
{ "eLua and EGC", "elua_egc.html" },
|
||||
},
|
||||
},
|
||||
{ { "Building eLua", "Build de eLua" }, "building.html",
|
||||
{
|
||||
{ "Building eLua in Linux", "building_unix.html" },
|
||||
{ "Building eLua in Windows", "building_win.html" },
|
||||
},
|
||||
},
|
||||
{ { "Code examples", "Exemplos de Código" }, "examples.html" },
|
||||
{ { "FAQ", "Perguntas Frequentes (FAQ)" }, "faq.html" },
|
||||
{ { "FAQ", "Perguntas Frequentes (FAQ)" }, "faq.html" },
|
||||
{ "eLua file systems", "filesystems.html",
|
||||
{
|
||||
{ { "ROM file system", "O ROM File System" }, "arch_romfs.html" },
|
||||
{ "FAT file system", "fatfs.html" }
|
||||
}
|
||||
},
|
||||
{ { "Tutorials", "Tutoriais" }, "tutorials.html",
|
||||
{
|
||||
{ { "Booting on a PC", "Bootando num PC" }, "tut_bootpc.html" },
|
||||
@ -129,7 +130,21 @@ local menu =
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{ { "Platform info", "Doc Específica" }, "installing.html",
|
||||
{
|
||||
{ "AT91SAM7x", "installing_at91sam7x.html" },
|
||||
{ "AVR32", "installing_avr32.html" },
|
||||
{ "i386", "installing_i386.html" },
|
||||
{ "LM3S", "installing_lm3s.html" },
|
||||
{ "LPC2888", "installing_lpc2888.html" },
|
||||
{ "STR7", "installing_str7.html" },
|
||||
{ "STR9", "installing_str9.html" },
|
||||
{ "STM32", "installing_stm32.html" },
|
||||
{ "LPC2468", "installing_lpc2468.html" }
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
-- "eLua internals" (menu separator)
|
||||
{ { "eLua internals", "Arquitetura de eLua" } },
|
||||
@ -137,10 +152,10 @@ local menu =
|
||||
-- "Overview"
|
||||
{ { "Overview", "Visão Geral" }, "arch_overview.html",
|
||||
{
|
||||
{ { "Structure", "Estrutura" }, "arch_overview.html#structure" },
|
||||
{ { "eLua's Architecture", "Arquitetura de eLua" }, "arch_overview.html#structure" },
|
||||
{ { "Common code", "Código Básico" }, "arch_overview.html#common" },
|
||||
{ { "Interface architecture", "Interfaceamento" }, "arch_overview.html#platform" },
|
||||
{ { "Platforms/ports", "Portabilização" }, "arch_overview.html#platforms" },
|
||||
{ { "Platforms and ports", "Portabilização" }, "arch_overview.html#platforms" },
|
||||
{ { "Booting eLua", "O Boot de eLua" }, "arch_overview.html#boot" }
|
||||
}
|
||||
},
|
||||
@ -151,11 +166,10 @@ local menu =
|
||||
-- Other WRITE THE arch_platform_other.html file
|
||||
{ { "More information", "Informações Adicionais" }, "#",
|
||||
{
|
||||
{ { "ROM file system", "O ROM File System" }, "arch_romfs.html" },
|
||||
{ { "Adding a new port", "Portando eLua" }, "arch_newport.html" },
|
||||
{ { "Modules and LTR", "Modulos e LTR" }, "arch_ltr.html" },
|
||||
{ { "Consoles and terminals", "Consoles e Terminais" }, "arch_con_term.html" },
|
||||
{ { "TCP/IP in eLua", "TCP/IP em eLua" }, "arch_tcpip.html" },
|
||||
{ { "LTR (Lua Tiny RAM) in eLua", "LTR (Lua Tiny RAM) em eLua" }, "arch_ltr.html" },
|
||||
{ { "eLua coding style", "Regras de Codificação" }, "arch_coding.html" }
|
||||
}
|
||||
},
|
||||
@ -166,10 +180,11 @@ local menu =
|
||||
-- "Generic modules" (automatically generated)
|
||||
{ { "Generic modules", "Módulos Genéricos" }, "refman_gen.html", "refman_gen" },
|
||||
|
||||
-- "Platform modules"
|
||||
-- "Platform modules" (automatically generated)
|
||||
{ { "Platform modules", "Módulos Específicos" }, "refman_dep.html",
|
||||
{
|
||||
{ "lm3s", "modules_lm3s.html", "refman_ps_lm3s" }
|
||||
{ "lm3s", "modules_lm3s.html", "refman_ps_lm3s" },
|
||||
{ "str9", "modules_str9.html", "refman_ps_str9" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,14 +9,15 @@ local sf = string.format
|
||||
-- Data structure declarations
|
||||
|
||||
-- List here all the sections for which we're generating the documentation
|
||||
local doc_sections = { "arch_platform", "refman_gen", "refman_ps_lm3s" }
|
||||
local doc_sections = { "arch_platform", "refman_gen", "refman_ps_lm3s", "refman_ps_str9" }
|
||||
|
||||
-- List here all the components of each section
|
||||
local components =
|
||||
{
|
||||
arch_platform = { "ll", "pio", "spi", "uart", "timers", "pwm", "cpu", "eth", "adc" },
|
||||
refman_gen = { "bit", "pd", "cpu", "pack", "adc", "term", "pio", "uart", "spi", "tmr", "pwm", "net", "can", "rpc" },
|
||||
refman_ps_lm3s = { "disp" }
|
||||
refman_gen = { "bit", "pd", "cpu", "pack", "adc", "term", "pio", "uart", "spi", "tmr", "pwm", "net", "can", "rpc", "elua" },
|
||||
refman_ps_lm3s = { "disp" },
|
||||
refman_ps_str9 = { "pio" }
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@ -314,6 +315,10 @@ end
|
||||
function gen_html_doc()
|
||||
local menu, genfiles = {}, {}
|
||||
|
||||
for k, v in pairs( components ) do
|
||||
table.sort( v )
|
||||
end
|
||||
|
||||
for _, section in pairs( doc_sections ) do
|
||||
-- Generate documentation for each module in turn
|
||||
local fulldata = {}
|
||||
|
@ -63,7 +63,7 @@ enum
|
||||
RAM chips). Implemented in $src/common.c$, it uses the the $MEM_START_ADDRESS$ macro that must be defined in the platform's $platform_conf.h$
|
||||
file (see @arch_overview.html#platforms@here@ for details). This macro must be defined as an array that contains all the start addresses of
|
||||
free RAM in the system. For internal RAM, this is generally handled by a linker exported symbol (named $end$ in many eLua ports) which
|
||||
points to the firs RAM address after all the constant and non-constant program data. An example is given below:</p>
|
||||
points to the first RAM address after all the constant and non-constant program data. An example is given below:</p>
|
||||
~#define MEM_START_ADDRESS { ( void* )end }~<p>]],
|
||||
args = "$id$ - the identifier of the RAM area",
|
||||
ret = "the start address of the given memory area",
|
||||
@ -141,7 +141,7 @@ enum
|
||||
},
|
||||
},
|
||||
|
||||
{ sig = "void* #platform_get_last_free_ram#( unsigned id );",
|
||||
{ sig = "void* #platform_get_first_free_ram#( unsigned id );",
|
||||
desc = [[Returns the start address of a free RAM area in the system (this is the RAM that will be used by any part of the code that uses malloc(),
|
||||
a good example being the Lua interpreter itself). There can be multiple free RAM areas in the system (for example the internal MCU RAM and external
|
||||
RAM chips). Implemented in $src/common.c$, it uses the the $MEM_START_ADDRESS$ macro that must be defined in the platform's $platform_conf.h$
|
||||
|
@ -151,10 +151,10 @@ enum
|
||||
<li>many times it is difficult to share a hardware timer between different parts of an application because of conflicting requirements. Generally it's not possible to have timers that can
|
||||
achieve long delays and high accuracy at the same time (this is especially true for systems that have 16 bit or even smaller timers).</li>
|
||||
</ul>
|
||||
<p>In this respect, $virtual timers$ are a set of timers that share a single hardware timer. It is possible, in this way, to have a hardware timer that can implement 4, 8 or more hardware
|
||||
<p>In this respect, $virtual timers$ are a set of timers that share a single hardware timer. It is possible, in this way, to have a hardware timer that can implement 4, 8 or more virtual/software
|
||||
timers. There are a few drawbacks to this approach:</p>
|
||||
<ul>
|
||||
<li>the hardware timer used to implement the virtual timers must generally be dedicated. In fact in cat be still used in "read only mode", which means that the only operations that can
|
||||
<li>the hardware timer used to implement the virtual timers must generally be dedicated. In fact it can still be used in "read only mode", which means that the only operations that can
|
||||
be executed on it are $PLATFORM_TIMER_OP_READ$, $PLATFORM_TIMER_GET_CLOCK$, $PLATFORM_TIMER_OP_GET_MAX_DELAY$ and $PLATFORM_TIMER_OP_GET_MIN_DELAY$. However,
|
||||
since the "read only mode" is not enforced by the code, it is advisable to treat this timer as a dedicated resource and thus make it invisible to eLua by not associating it with
|
||||
an ID.</li>
|
||||
|
@ -97,100 +97,4 @@ data_en =
|
||||
}
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - ADC",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "adc",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions that access analog to digital converter (ADC) peripherals.</p>
|
||||
<p>When utilizing this module, acquiring ADC data is a two step process: requesting sample conversions (using $adc.sample$) and extraction of conversion results from a conversion buffer (using $adc.getsample$, $adc.getsamples$ or $adc.insertsamples$). Various configuration parameters are available to set conversion rate, how results are extracted from the buffer and how these results are processed prior to extraction.</p>
|
||||
<p>This module can be utilized if the device in use has a supported ADC peripheral (see @status.html@status@ for details) and if ADC functionality is enabled at build time (see @building.html@building@).]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#adc.sample#( id, count )",
|
||||
desc = "Initiate conversion and buffering of samples on an ADC channel.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID. Optionally, this may be a table containing a list of channel IDs (i.e.: {0, 2, 3}), allowing synchronization of acquisition. NOTE: This acceptance of mixed types is only for the sample function.",
|
||||
"$count$ - number of samples to acquire and place in buffer."
|
||||
}
|
||||
},
|
||||
{ sig = "sample = #adc.getsample#( id )",
|
||||
desc = "Get a single conversion value from the buffer associated with a given channel.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID."
|
||||
},
|
||||
ret = "$sample$ - numeric value of conversion, or nil if sample was not available."
|
||||
},
|
||||
{ sig = "samples = #adc.getsamples#( id, count )",
|
||||
desc = "Get multiple conversion values from the buffer associated with a given channel.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID.",
|
||||
"$count$ - optional parameter to indicate number of samples to return. If not included, all available samples are returned."
|
||||
},
|
||||
ret = "$samples$ - table containing integer conversion values. If not enough samples are available, remaining indices will be nil."
|
||||
},
|
||||
{ sig = "#adc.insertsamples#( id, table, idx, count )",
|
||||
desc = "Get multiple conversion values from a channel's buffer, and write them into a table.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID.",
|
||||
"$table$ - table to write samples to. Values at $table$[$idx$] to $table$[$idx$ + $count$ -1] will be overwritten with samples (or nil if not enough samples are available).",
|
||||
"$idx$ - first index to use in the table for writing samples.",
|
||||
"$count$ - number of samples to return. If not enough samples are available (after blocking, if enabled) remaining values will be nil."
|
||||
}
|
||||
},
|
||||
{ sig = "maxval = #adc.maxval#( id )",
|
||||
desc = "Get the maximum value (corresponding to the maximum voltage) that can be returned on a given channel.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID."
|
||||
},
|
||||
ret = "$maxval$ - maximum integer conversion value (based on channel resolution)"
|
||||
},
|
||||
{ sig = "clock = #adc.setclock#( id, clock, timer_id )",
|
||||
desc = "Set the frequency (number of samples per second) at which voltages will be converted into samples.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID.",
|
||||
"$clock$ - frequency to acquire samples at in Hz (number of samples per second), 0 to acquire as fast as possible.",
|
||||
"$timer_id$ - Timer channel ID to use to control ADC conversion. <strong>Note:</strong> At this time, a timer selection will apply to all channels on a given ADC peripheral."
|
||||
},
|
||||
ret = "$clock$ - actual acquisition frequency to be used"
|
||||
},
|
||||
{ sig = "status = #adc.isdone#( id )",
|
||||
desc = "Check whether samples are still being acquired on a channel.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID."
|
||||
},
|
||||
ret = "$status$ - 1 if no samples are being acquired, 0 if samples are pending acquisition."
|
||||
},
|
||||
{ sig = "#adc.setblocking#( id, mode )",
|
||||
desc = "Set whether or not functions that request converted samples should wait for requested samples or return immediately with what is available.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID.",
|
||||
"$mode$ - 1 if requests to get samples should block until requested samples are available or sampling has completed, 0 to return immediately with available samples"
|
||||
},
|
||||
},
|
||||
{ sig = "#adc.setsmoothing#( id, length )",
|
||||
desc = "Set the length of the moving average filter. When $length$ is greater than 1, samples pulled from the conversion buffer will be averaged with the preceding $length$ - 1 buffered values.",
|
||||
args =
|
||||
{
|
||||
"$id$ - ADC channel ID.",
|
||||
"$length$ - number of preceding samples to include in moving average filter (must be a power of 2). If 1, filter is disabled. When enabled, a filter buffer is filled before the main conversion buffer, so that averages are always over the same number of samples."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -10,7 +10,7 @@ data_en =
|
||||
menu_name = "bit",
|
||||
|
||||
-- Overview
|
||||
overview = [[Since Lua doesn't have built-in capabilities for bit operations, the $bit$ module was added to eLua to fill this gap. It is based on the ^http://luaforge.net/projects/bitlib^bitlib^
|
||||
overview = [[Since Lua doesn't have (yet) built-in capabilities for bit operations, the $bit$ module was added to eLua to fill this gap. It is based on the ^http://luaforge.net/projects/bitlib^bitlib^
|
||||
library written by Reuben Thomas (slightly adapted to eLua) and provides basic bit operations (like setting and clearing bits) and bitwise operations.]],
|
||||
|
||||
-- Functions
|
||||
@ -19,144 +19,7 @@ data_en =
|
||||
{ sig = "number = #bit.bit#( position )",
|
||||
desc = "Generate a number with a 1 bit (used for mask generation). Equivalent to %1 <<<< position% in C.",
|
||||
args = "$position$ - position of the bit that will be set to 1.",
|
||||
ret = "$number$ - a number with only one 1 bit at $position$ (the rest are set to 0."
|
||||
},
|
||||
|
||||
{ sig = "flag = #bit.isset#( value, position )",
|
||||
desc = "Test if a given bit is set.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the value to test.",
|
||||
"$position$ - bit position to test."
|
||||
},
|
||||
ret = "$number$ - 1 if the bit at the given position is 1, 0 otherwise."
|
||||
},
|
||||
|
||||
{ sig = "flag = #bit.isclear#( value, position )",
|
||||
desc = "Test if a given bit is cleared.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the value to test.",
|
||||
"$position$ - bit position to test."
|
||||
},
|
||||
ret = "$number$ - 1 if the bit at the given position is 0, 0 othewise."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.set#( value, pos1, pos2, ..., posn )",
|
||||
desc = "Set bits in a number.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the base number.",
|
||||
"$pos1$ - position of the first bit to set.",
|
||||
"$pos2$ - position of the second bit to set.",
|
||||
"$posn$ - position of the nth bit to set."
|
||||
},
|
||||
ret = "$number$ - the number with the bit(s) set in the given position(s)."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.clear#( value, pos1, pos2, ..., posn )",
|
||||
desc = "Clear bits in a number.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the base number.",
|
||||
"$pos1$ - position of the first bit to clear.",
|
||||
"$pos2$ - position of the second bit to clear.",
|
||||
"$posn$ - position of thet nth bit to clear.",
|
||||
},
|
||||
ret = "$number$ - the number with the bit(s) cleared in the given position(s)."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.bnot#( value )",
|
||||
desc = "Bitwise negation, equivalent to %~~value% in C.",
|
||||
args = "$value$ - the number to negate.",
|
||||
ret = "$number$ - the bitwise negated value of the number.",
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.band#( val1, val2, ... valn )",
|
||||
desc = "Bitwise AND, equivalent to %val1 & val2 & ... & valn% in C.",
|
||||
args =
|
||||
{
|
||||
"$val1$ - first AND argument.",
|
||||
"$val2$ - second AND argument.",
|
||||
"$valn$ - nth AND argument.",
|
||||
},
|
||||
ret = "$number$ - the bitwise AND of all the arguments."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.bor#( val1, val2, ... valn )",
|
||||
desc = "Bitwise OR, equivalent to %val1 | val2 | ... | valn% in C.",
|
||||
args =
|
||||
{
|
||||
"$val1$ - first OR argument.",
|
||||
"$val2$ - second OR argument.",
|
||||
"$valn$ - nth OR argument."
|
||||
},
|
||||
ret = "$number$ - the bitwise OR of all the arguments."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.bxor#( val1, val2, ... valn )",
|
||||
desc = "Bitwise exclusive OR (XOR), equivalent to %val1 ^^ val2 ^^ ... ^^ valn% in C.",
|
||||
args =
|
||||
{
|
||||
"$val1$ - first XOR argument.",
|
||||
"$val2$ - second XOR argument.",
|
||||
"$valn$ - nth XOR argument."
|
||||
},
|
||||
ret = "$number$ - the bitwise exclusive OR of all the arguments."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.lshift#( value, shift )",
|
||||
desc = "Left-shift a number, equivalent to %value << shift% in C.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the value to shift.",
|
||||
"$shift$ - positions to shift.",
|
||||
},
|
||||
ret = "$number$ - the number shifted left",
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.rshift#( value, shift )",
|
||||
desc = "Logical right shift a number, equivalent to %( unsigned )value >>>> shift% in C.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the value to shift.",
|
||||
"$shift$ - positions to shift.",
|
||||
},
|
||||
ret = "$number$ - the number shifted right (logically)."
|
||||
},
|
||||
|
||||
{ sig = "number = #bit.arshift#( value, shift )",
|
||||
desc = "Arithmetic right shift a number equivalent to %value >>>> shift% in C.",
|
||||
args =
|
||||
{
|
||||
"$value$ - the value to shift.",
|
||||
"$shift$ - positions to shift."
|
||||
},
|
||||
ret = "$number$ - the number shifted right (arithmetically)."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - bit module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "bit",
|
||||
|
||||
-- Overview
|
||||
overview = [[Since Lua doesn't have built-in capabilities for bit operations, the $bit$ module was added to eLua to fill this gap. It is based on the ^http://luaforge.net/projects/bitlib^bitlib^
|
||||
library written by Reuben Thomas (slightly adapted to eLua) and provides basic bit operations (like setting and clearing bits) and bitwise operations.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "number = #bit.bit#( position )",
|
||||
desc = "Generate a number with a 1 bit (used for mask generation). Equivalent to %1 <<<< position% in C.",
|
||||
args = "$position$ - position of the bit that will be set to 1.",
|
||||
ret = "$number$ - a number with only one 1 bit at $position$ (the rest are set to 0."
|
||||
ret = "$number$ - a number with only one 1 bit at $position$ (the rest are set to 0)."
|
||||
},
|
||||
|
||||
{ sig = "flag = #bit.isset#( value, position )",
|
||||
@ -274,3 +137,4 @@ data_pt =
|
||||
}
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -12,105 +12,7 @@ data_en =
|
||||
-- Overview
|
||||
overview = [[This module deals with low-level access to CPU (and related modules) functionality, such as reading and writing memory, or
|
||||
enabling and disabling interrupts. It also offers access to platform specific CPU-related constants using a special macro defined in the
|
||||
platform's $platform_conf.h$ file, as exaplained @#cpu_constants@here@.]],
|
||||
|
||||
-- Data structures, constants and types
|
||||
structures =
|
||||
{
|
||||
{ text = [[cpu.INT_GPIOA
|
||||
cpu.INT_GPIOB
|
||||
.............
|
||||
cpu.INT_UDMA]],
|
||||
name = "CPU constants",
|
||||
desc = [[eLua has a mechanism that lets the user export an unlimited number of constants to the $cpu$ module. Although in theory any kind of constant can be exposed by this module,
|
||||
one should only use constants related to the CPU and its subsystems (as shown above, where a number of CPU specific interrupt masks are exposed to Lua using this mechanism). To use this
|
||||
mechanism, just declare the $PLATFORM_CPU_CONSTANTS$ macro in your platform's $platform_conf.h$ file and list all your constants as part of this macro, each enclosed in a special macro called
|
||||
$_C$. For example, to get the constants listed above declare your $PLATFORM_CPU_CONSTANTS$ macro like this:</p>
|
||||
~#define PLATFORM_CPU_CONSTANTS\
|
||||
_C( INT_GPIOA ),\
|
||||
_C( INT_GPIOB ),\
|
||||
.................
|
||||
_C( INT_UDMA )~
|
||||
<p>It's worth to note that adding more constants does not increas RAM usage, only Flash usage, so you can expose as much constants as you need without worrying about RAM consumption.]]
|
||||
},
|
||||
},
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#cpu.w32#( address, data )",
|
||||
desc = "Writes a 32-bit word to memory.",
|
||||
args =
|
||||
{
|
||||
"$address$ - the memory address.",
|
||||
"$data$ - the 32-bit data to write."
|
||||
},
|
||||
},
|
||||
|
||||
{ sig = "data = #cpu.r32#( address )",
|
||||
desc = "Read a 32-bit word from memory.",
|
||||
args = "$address$ - the memory address.",
|
||||
ret = "$data$ - the 32-bit word read from memory."
|
||||
},
|
||||
|
||||
{ sig = "#cpu.w16#( address, data )",
|
||||
desc = "Writes a 16-bit word to memory.",
|
||||
args =
|
||||
{
|
||||
"$address$ - the memory address.",
|
||||
"$data$ - the 16-bit data to write."
|
||||
},
|
||||
},
|
||||
|
||||
{ sig = "data = #cpu.r16#( address )",
|
||||
desc = "Reads a 16-bit word from memory.",
|
||||
args = "$address$ - the memory address.",
|
||||
ret = "$data$ - the 16-bit word read from memory."
|
||||
},
|
||||
|
||||
{ sig = "#cpu.w8#( address, data )",
|
||||
desc = "Writes a byte to memory.",
|
||||
args =
|
||||
{
|
||||
"$address$ - the memory address.",
|
||||
"$data$ - the byte to write."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "data = #cpu.r8#( address )",
|
||||
desc = "Reads a byte from memory.",
|
||||
args = "$address$ - the memory address",
|
||||
ret = "$data$ - the byte read from memory."
|
||||
},
|
||||
|
||||
{ sig = "#cpu.cli#()",
|
||||
desc = "Disable CPU interrupts."
|
||||
},
|
||||
|
||||
{ sig = "#cpu.sei#()",
|
||||
desc = "Enable CPU interrupts."
|
||||
},
|
||||
|
||||
{ sig = "clock = #cpu.clock#()",
|
||||
desc = "Get the CPU core frequency.",
|
||||
ret = "$clock$ - the CPU clock (in Hertz)."
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - CPU module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "cpu",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module deals with low-level access to CPU (and related modules) functionality, such as reading and writing memory, or
|
||||
enabling and disabling interrupts. It also offers access to platform specific CPU-related constants using a special macro defined in the
|
||||
platform's $platform_conf.h$ file, as exaplained @#cpu_constants@here@.]],
|
||||
platform's $platform_conf.h$ file, as explained @#cpu_constants@here@.]],
|
||||
|
||||
-- Data structures, constants and types
|
||||
structures =
|
||||
@ -196,3 +98,4 @@ $_C$. For example, to get the constants listed above declare your $PLATFORM_CPU_
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
29
doc/eluadoc/refman_gen_elua.lua
Normal file
@ -0,0 +1,29 @@
|
||||
-- eLua reference manual - elua module
|
||||
|
||||
data_en =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - elua module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "elua",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module is an interface to the core system and services of eLua. Some functions from this module can change the runtime behaviour of eLua, which in turn can lead to instability or unexpected program behaviour. $Use this module with care$.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#elua.egc_setup#( mode, [memlimit] )",
|
||||
desc = "Change the emergency garbage collector operation mode and memory limit (see @elua_egc.html@here@ for details).",
|
||||
args =
|
||||
{
|
||||
"$mode$ - the EGC operation mode. Can be either $elua.EGC_NOT_ACTIVE$, $elua.EGC_ON_ALLOC_FAILURE$, $elua.EGC_ON_MEM_LIMIT$, $elua.EGC_ALWAYS$ or a combination between the last 3 modes in this list (they can be combined both with bitwise OR operations, using the @refman_gen_bit.html@bit@ module, or simply by adding them).",
|
||||
"$memlimit$ - required only when $elua.EGC_ON_MEM_LIMIT$ is specified in $mode$, specifies the EGC upper memory limit."
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
@ -160,163 +160,4 @@ be specified.]]
|
||||
},
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - net module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "net",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing a TCP/IP network from eLua. It can be enabled only if networking support is also enabled
|
||||
(see @building.html@building@ for details).</p>
|
||||
<p><span class="warning">NOTE:</span> TCP/IP support is $experimental$ in eLua. While functional, it's still slow and suffers from a number of
|
||||
other issues. It will most likely change a lot in the future, so expect major changes to this module as well.</p>
|
||||
<p><span class="warning">NOTE:</span> currently, only TCP sockets are supported by eLua.]],
|
||||
|
||||
-- Structures
|
||||
structures =
|
||||
{
|
||||
{ text = [[// eLua net error codes
|
||||
enum
|
||||
{
|
||||
ELUA_NET_ERR_OK = 0, // exported as $net.ERR_OK$
|
||||
ELUA_NET_ERR_TIMEDOUT, // exported as $net.ERR_TIMEDOUT$
|
||||
ELUA_NET_ERR_CLOSED, // exported as $net.ERR_CLOSED$
|
||||
ELUA_NET_ERR_ABORTED, // exported as $net.ERR_ABORTED$
|
||||
ELUA_NET_ERR_OVERFLOW // exported as $net.ERR_OVERFLOW$
|
||||
};]],
|
||||
name = "Error codes",
|
||||
desc = "These are the error codes defined by the eLua networking layer and they are also returned by a number of functions in this module.",
|
||||
}
|
||||
},
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "ip = #net.packip#( ip1, ip2, ip3, ip4 )",
|
||||
desc = [[Returns an internal representation of an IP address that can be used with all function from the $net$ module that expect an IP address
|
||||
argument. The IP is considered to be in the format %ip1.ip2.ip3.ip4%.]],
|
||||
args =
|
||||
{
|
||||
"$ip1$ - the first part of the IP address.",
|
||||
"$ip2$ - the second part of the IP address.",
|
||||
"$ip3$ - the third part of the IP address.",
|
||||
"$ip4$ - the fourth part of the IP address."
|
||||
},
|
||||
ret = "An integer that encodes the IP address in an internal format."
|
||||
},
|
||||
|
||||
{ sig = "ip = #net.packip#( 'ip' )",
|
||||
desc = [[Returns an internal representation of an IP address that can be used with all function from the $net$ module that expect an IP address
|
||||
argument. The IP is given as a string.]],
|
||||
args = "$ip$ - the IP address in string format.",
|
||||
ret = "An integer that encodes the IP address in an internal format."
|
||||
},
|
||||
|
||||
{ sig = "ip1, ip2, ip3, ip4 = #net.unpackip#( ip, '*n' )",
|
||||
desc = "Returns an unpacked representation of an IP address encoded by @#net.packip@net.packip@.",
|
||||
args = "$ip$ - the encoded IP address.",
|
||||
ret =
|
||||
{
|
||||
"$ip1$ - the first part of the IP address.",
|
||||
"$ip2$ - the second part of the IP address.",
|
||||
"$ip3$ - the third part of the IP address.",
|
||||
"$ip4$ - the fourth part of the IP address."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "ip = #net.unpackip#( ip, '*s' )",
|
||||
desc = "Returns an unpacked representation of an IP address encoded by @#net.packip@net.packip@.",
|
||||
args = "$ip$ - the encoded IP address.",
|
||||
ret = "The IP address in string format."
|
||||
},
|
||||
|
||||
|
||||
{ sig = "ip = #net.lookup#( hostname )",
|
||||
desc = "Does a DNS lookup.",
|
||||
args = "$hostname$ - the name of the computer.",
|
||||
ret = "The IP address of the computer."
|
||||
},
|
||||
|
||||
{ sig = "socket = #net.socket#( type )",
|
||||
desc = "Create a socket for TCP/IP communication.",
|
||||
args = [[$type$ - can be either $net.SOCK_STREAM$ for TCP sockets or $net.SOCK_DGRAM$ for UDP sockets (<span class="warning">not yet supported</span>).]],
|
||||
ret = "The socket that will be used in subsequent operations."
|
||||
},
|
||||
|
||||
{ sig = "res = #net.close#( socket )",
|
||||
desc = "Close a socket.",
|
||||
args = "$socket$ - the socket to close.",
|
||||
ret = "An error code, as defined @#error_codes@here@."
|
||||
},
|
||||
|
||||
{ sig = "err = #net.connect#( sock, ip, port )",
|
||||
desc = "Connect a socket to a remote system.",
|
||||
args =
|
||||
{
|
||||
"$sock$ - a socket obtained from @#net.socket@net.socket@.",
|
||||
"$ip$ - the IP address obtained from @#net.packip@net.packip@.",
|
||||
"$port$ - the port to connecto to."
|
||||
},
|
||||
ret = "$err$ - the error code, as defined @#error_codes@here@."
|
||||
},
|
||||
|
||||
{ sig = "socket, remoteip, err = #net.accept#( port, [timer_id, timeout] )",
|
||||
desc = "Accept a connection from a remote system with an optional timeout.",
|
||||
args =
|
||||
{
|
||||
"$port$ - the port to wait for connections from the remote system.",
|
||||
[[$timer_id (optional)$ - the timer ID of the timer used to timeout the accept function after a specified time. If this is specified, $timeout$ must also
|
||||
be specified.]],
|
||||
[[$timeout (optional)$ - the timeout after which the accept function returns if no connection was requested. If this is specified, $timer_id$ must also
|
||||
be specified.]]
|
||||
},
|
||||
ret =
|
||||
{
|
||||
"$socket$ - the socket created after accepting the remote connection.",
|
||||
"$remoteip$ - the IP of the remote system.",
|
||||
"$err$ - an error code, as defined @#error_codes@here@."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "res, err = #net.send#( sock, str )",
|
||||
desc = "Send data to a socket.",
|
||||
args =
|
||||
{
|
||||
"$sock$ - the socket.",
|
||||
"$str$ - the data to send."
|
||||
},
|
||||
ret =
|
||||
{
|
||||
"$res$ - the number of bytes actually sent or -1 for error.",
|
||||
"$err$ - the error code, as defined @#error_codes@here@."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "res, err = #net.recv#( sock, format, [timer_id, timeout] )",
|
||||
desc = "Read data from a socket.",
|
||||
args =
|
||||
{
|
||||
"$sock$ - the socket.",
|
||||
[[$format$ - how to read the data. This can be either:
|
||||
<ul>
|
||||
<li>$"*l"$: read a line (until the next '\n' character).</li>
|
||||
<li>$an integer$: read up to that many bytes.</li>
|
||||
</ul>]],
|
||||
[[$timer_id (optional)$ - the timer ID of the timer used to timeout the recv function after a specified time. If this is specified, $timeout$ must also
|
||||
be specified.]],
|
||||
[[$timeout (optional)$ - the timeout after which the recv function returns if no connection was requested. If this is specified, $timer_id$ must also
|
||||
be specified.]]
|
||||
},
|
||||
ret =
|
||||
{
|
||||
"$res$ - the number of bytes read.",
|
||||
"$err$ - the error code, as defined @#error_codes@here@."
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -24,6 +24,7 @@ data specifier is applied to a single variable that must be packed/unpacked. The
|
||||
<li>$'='$ for native endian (the platform's endian order, default).</li>
|
||||
</ol></li>
|
||||
<li>$format specifier$ describes what kind of variable will be packed/unpacked. $The format specifier is case-sensitive$. The possible values of this parameter are summarized in the table below:
|
||||
<p/>
|
||||
<table class="table_center" style="margin-top: 4px; margin-bottom: 4px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -134,137 +135,4 @@ data specifier is applied to a single variable that must be packed/unpacked. The
|
||||
},
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - pack",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "pack",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module allows for arbitrary packing of data into Lua strings and unpacking data from Lua strings. In this way, a string can be used to store data in a platform-indepdendent
|
||||
manner. It is based on the ^http://www.tecgraf.puc-rio.br/~~lhf/ftp/lua/#lpack^lpack^ module from Luiz Henrique de Figueiredo (with some minor tweaks). </p>
|
||||
<p>Both methods of this module (@#pack@pack@ and @#unpack@unpack@) use a $format string$ to describe how to pack/unpack the data. The format string contains one or more $data specifiers$, each
|
||||
data specifier is applied to a single variable that must be packed/unpacked. The data specifier has the following general format:</p>
|
||||
~[endianness]<<format specifier>>[count]~
|
||||
<p>where:</p>
|
||||
<ul>
|
||||
<li>$endianness$ is an optional endian flags that specifies how the numbers that are to be packed/unpacked are stored in memory. It can be either:
|
||||
<ol>
|
||||
<li>$'<<'$ for little endian.</li>
|
||||
<li>$'>>'$ for big endian.</li>
|
||||
<li>$'='$ for native endian (the platform's endian order, default).</li>
|
||||
</ol></li>
|
||||
<li>$format specifier$ describes what kind of variable will be packed/unpacked. $The format specifier is case-sensitive$. The possible values of this parameter are summarized in the table below:
|
||||
<table class="table_center" style="margin-top: 4px; margin-bottom: 4px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Format specifier</th>
|
||||
<th>Corresponding variable type</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'z'</td>
|
||||
<td>zero-terminated string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'p' </td>
|
||||
<td>string preceded by length byte</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'P' </td>
|
||||
<td>string preceded by length word</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'a' </td>
|
||||
<td>string preceded by length size_t</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'A' </td>
|
||||
<td>string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'f' </td>
|
||||
<td>float</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'d' </td>
|
||||
<td>double</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'n' </td>
|
||||
<td>Lua number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'c' </td>
|
||||
<td>char</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'b' </td>
|
||||
<td>byte = unsigned char</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'h' </td>
|
||||
<td>short</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'H' </td>
|
||||
<td>unsigned short</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'i' </td>
|
||||
<td>int</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'I' </td>
|
||||
<td>unsigned int</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'l' </td>
|
||||
<td>long</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'L' </td>
|
||||
<td>unsigned long</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></li>
|
||||
<li>$count$ is an optional counter for the $format specifier$. For example, $i5$ instructs the code to pack/unpack 5 integer variables, as opposed to $i$ that specifies a
|
||||
single integer variable.</li>
|
||||
</ul><p>]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "packed = #pack.pack#( format, val1, val2, ..., valn )",
|
||||
desc = "Packs variables in a string.",
|
||||
args =
|
||||
{
|
||||
"$format$ - format specifier (as described @#overview@here@).",
|
||||
"$val1$ - first variable to pack.",
|
||||
"$val2$ - second variable to pack.",
|
||||
"$valn$ - nth variable to pack.",
|
||||
},
|
||||
ret = "$packed$ - a string containing the packed representation of all variables according to the format."
|
||||
},
|
||||
|
||||
{ sig = "nextpos, val1, val2, ..., valn = #pack.unpack#( string, format, [ init ] )",
|
||||
desc = "Unpacks a string",
|
||||
args =
|
||||
{
|
||||
"$string$ - the string to unpack.",
|
||||
"$format$ - format specifier (as described @#overview@here@).",
|
||||
"$init$ - $(optional)$ marks where in $string$ the unpacking should start (1 if not specified)."
|
||||
},
|
||||
ret =
|
||||
{
|
||||
"$nextpos$ - the position in the string after unpacking.",
|
||||
"$val1$ - the first unpacked value.",
|
||||
"$val2$ - the second unpacked value.",
|
||||
"$valn$ - the nth unpacked value."
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -7,39 +7,7 @@ data_en =
|
||||
title = "eLua reference manual - platform data",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "Platform data (pd)",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions that access specific platform data. Useful if the code needs to know on which platform it runs.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "platform = #pd.platform#()",
|
||||
desc = "Get platform name.",
|
||||
ret = "$platform$ - the name of the platform on which eLua is running.",
|
||||
},
|
||||
|
||||
{ sig = "cpu = #pd.cpu#()",
|
||||
desc = "Get CPU name.",
|
||||
ret = "$cpu$ - the name of the CPU of the platform on which eLua is running.",
|
||||
},
|
||||
|
||||
{ sig = "board = #pd.board#()",
|
||||
desc = "Get board name.",
|
||||
ret = "$board$ - the name of the board on which eLua is running.",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - platform data",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "Platform data (pd)",
|
||||
menu_name = "pd",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions that access specific platform data. Useful if the code needs to know on which platform it runs.]],
|
||||
@ -64,3 +32,4 @@ data_pt =
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -156,159 +156,4 @@ data_en =
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - pio module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "pio",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing the CPU's PIO (Programmable Input Output) pins. It contains two set of functions with identical
|
||||
names and behaviour. One set groups the functions used to access individual pins from ports, the other groups the functions used to access full ports.</p>
|
||||
<p>With the $pio$ module, you specifiy names of $ports$ as they appear in your eLua's CPU datasheet. For example, if your CPU's ports are named $PA, PB$
|
||||
and $PC$, you can reffer to them using $pio.PA$, $pio.PB$ and $pio.PC$, respectively. If your CPU uses $P0$, $P1$, $P2$ instead of $PA$, $PB$ and $PC$,
|
||||
you can simply use $pio.P0$, $pio.P1$ and $pio.P2$ instead.</p>
|
||||
<p>You can also reffer to individual $pins$ instead of ports. With the same notation as above, $pio.PA_0$ refers to the first pin of port $PA$,
|
||||
$P0_15$ refers to the 16th pin of port $P0$ and so on.
|
||||
]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#pio.pin.setdir#( direction, pin1, pin2, ..., pinn )",
|
||||
desc = "Set pin(s) direction",
|
||||
args =
|
||||
{
|
||||
"$direction$ - the pin direction, can be either $pio.INPUT$ or $pio.OUTPUT$",
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optional)$ - the %n%-th pin"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.pin.setpull#( type, pin1, pin2, ..., pinn )",
|
||||
desc = "Enable/disable pullups/pulldowns on the specified pin(s)",
|
||||
args =
|
||||
{
|
||||
[[$type$ - 'pull' type, can be either $pio.PULLUP$ to enable pullups, $pio.PULLDOWN$ to enable pulldowns, or $pio.NOPULL$ to disable both pullups and
|
||||
pulldowns]],
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optional)$ - the %n%-th pin",
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.pin.setval#( value, pin1, pin2, ..., pinn )",
|
||||
desc = "Set pin(s) value",
|
||||
args=
|
||||
{
|
||||
"$value$ - pin value, can be either 0 or 1",
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optional)$ - the %n%-th pin"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "val1, val2, ..., valn = #pio.pin.getval#( pin1, pin2, ..., pinn )",
|
||||
desc = "Get value of pin(s)",
|
||||
args =
|
||||
{
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optional)$ - the %n%-th pin",
|
||||
},
|
||||
ret = "The value(s) of the pin(s), either 0 or 1"
|
||||
},
|
||||
|
||||
{ sig = "#pio.pin.sethigh#( pin1, pin2, ..., pinn )",
|
||||
desc = "Set pin(s) to 1 (high)",
|
||||
args =
|
||||
{
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optinoal)$ - the %n%-th pin"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.pin.setlow#( pin1, pin2, ..., pinn )",
|
||||
desc = "Set pin(s) to 0 (low)",
|
||||
args =
|
||||
{
|
||||
"$pin1$ - the first pin",
|
||||
"$pin2 (optional)$ - the second pin",
|
||||
"$pinn (optinoal)$ - the %n%-th pin"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.port.setdir#( direction, port1, port2, ..., portn )",
|
||||
desc = "Set port(s) direction",
|
||||
args =
|
||||
{
|
||||
"$direction$ - the port direction, can be either $pio.INPUT$ or $pio.OUTPUT$",
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optional)$ - the %n%-th port"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.port.setpull#( type, port1, port2, ..., portn )",
|
||||
desc = "Enable/disable pullups/pulldowns on the specified port(s)",
|
||||
args =
|
||||
{
|
||||
[[$type$ - 'pull' type, can be either $pio.PULLUP$ to enable pullups, $pio.PULLDOWN$ to enable pulldowns, or $pio.NOPULL$ to disable both pullups and
|
||||
pulldowns]],
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optional)$ - the %n%-th port",
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.port.setval#( value, port1, port2, ..., portn )",
|
||||
desc = "Set port(s) value",
|
||||
args=
|
||||
{
|
||||
"$value$ - port value",
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optional)$ - the %n%-th port"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "val1, val2, ..., valn = #pio.port.getval#( port1, port2, ..., portn )",
|
||||
desc = "Get value of port(s)",
|
||||
args =
|
||||
{
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optional)$ - the %n%-th port",
|
||||
},
|
||||
ret = "The value(s) of the port(s)"
|
||||
},
|
||||
|
||||
{ sig = "#pio.port.sethigh#( port1, port2, ..., portn )",
|
||||
desc = "Set port(s) to all 1 (high)",
|
||||
args =
|
||||
{
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optinoal)$ - the %n%-th port"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#pio.port.setlow#( port1, port2, ..., portn )",
|
||||
desc = "Set port(s) to all 0 (low)",
|
||||
args =
|
||||
{
|
||||
"$port1$ - the first port",
|
||||
"$port2 (optional)$ - the second port",
|
||||
"$portn (optinoal)$ - the %n%-th port"
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -56,59 +56,4 @@ duty cycles (particulary 0 and 100) might not be achievable.]]
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - pwm module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "pwm",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing the PWM (Pulse Width Modulation) modules of the eLua CPU.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "frequency = #pwm.setup#( id, frequency, duty )",
|
||||
desc = "Setup the PWM modules.",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the PWM module.",
|
||||
"$frequency$ - the frequency of the PWM module (in Hz).",
|
||||
[[$duty$ - the duty cycle of the PWM module given in percents. This must be an integer between 0 and 100. $NOTE$: depending on the hardware, some
|
||||
duty cycles (particulary 0 and 100) might not be achievable.]]
|
||||
},
|
||||
ret = "The actual frequenct set on the PWM module. Depending on the hardware, this might have a different value than the $frequency$ argument."
|
||||
},
|
||||
|
||||
{ sig = "#pwm.start#( id )",
|
||||
desc = "Start the PWM signal on the given module.",
|
||||
args = "$id$ - the ID of the PWM module."
|
||||
},
|
||||
|
||||
{ sig = "#pwm.stop#( id )",
|
||||
desc = "Stop the PWM signal on the given module.",
|
||||
args = "$id$ - the ID of the PWM module."
|
||||
},
|
||||
|
||||
{ sig = "clock = #pwm.setclock#( id, clock )",
|
||||
desc = "Set the base clock of the given PWM module.",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the PWM module.",
|
||||
"$clock$ - the desired base clock."
|
||||
},
|
||||
ret = "The actual base clock set on the PWM module. Depending on the hardware, this might have a different value than the $clock$ argument."
|
||||
},
|
||||
|
||||
{ sig = "clock = #pwm.getclock#( id )",
|
||||
desc = "Get the base clock of the given PWM module.",
|
||||
args = "$id$ - the ID of the PWM module.",
|
||||
ret = "The base clock of the PWM module."
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- eLua reference manual - SPI module
|
||||
-- eLua reference manual - RPC module
|
||||
|
||||
data_en =
|
||||
{
|
||||
@ -14,7 +14,28 @@ data_en =
|
||||
<p>It works by providing a $handle$ to the client session which allows control over remote state. Functions can
|
||||
be called in the remote environment and variables can be manipulated by treating the $handle$ (representing
|
||||
the remote global table) as if it were a local table.</p>
|
||||
<p><span class="warning">IMPORTANT</span>: This module is considered experimental. It currently works over a
|
||||
<p>In order to open a connection, it is necessary to specify the interface through wich the connection is made.
|
||||
Currently the connections are limited to serial ports on the desktop side, and uart devices on the eLua side.
|
||||
For a number of the connections below, a parameter labeled $transport_identifiers$ is used to specify the port
|
||||
to be used in a platform specific manner.:
|
||||
<ul>
|
||||
<li>eLua: $transport_identifiers$ = $uart_id$, $timer_id$
|
||||
<ul>
|
||||
<li>$uart_id$ - the ID of the serial port (as in the @refman_gen_uart.html@uart module@). This uart must already be configured using $uart.setup$ before being used in this module.</li>
|
||||
<li>$timer_id$ - the ID of the timer for send/receive timeouts (as with send/receive functions in the @refman_gen_uart.html@uart module@)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Linux/Mac OS X luarpc: $transport_identifiers$ = $uart_path$
|
||||
<ul>
|
||||
<li>$uart_path$ - the path to the serial port to use (e.g.: "/dev/ttyS0")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>See @using.html#rpc@Using eLua@ for a basic tutorial on getting started with the RPC module.</p>
|
||||
|
||||
<p><span class="warning">NOTE</span>: This module is considered experimental. It currently works over a
|
||||
serial port with eLua targets and on desktop systems implementing POSIX serial communications (Linux, Mac OS X, etc).
|
||||
]],
|
||||
|
||||
@ -25,9 +46,34 @@ data_en =
|
||||
desc = "Initiate connection from client to server.",
|
||||
args =
|
||||
{
|
||||
"$transport_identifiers$ - identifiers for channel connecting to server (specific to selected transport)",
|
||||
"$transport_identifiers$ - platform-specific serial port identification (see @#overview@overview@)"
|
||||
},
|
||||
ret = "$handle$ - used to interact with the remote Lua state."
|
||||
ret = [[$handle$ - handle used to interact with the remote Lua state. Usage styles are as follows:</p>
|
||||
<table style="text-align: left; margin-left: 2em;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left; width: 20em;">Usage Style</th>
|
||||
<th style="text-align: left;">Meaning</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$handle$.$remote_var$ = $local_var$</td>
|
||||
<td>send contents of $local_var$ to remote host and assign to $remote_var$ (registered on global table). This also works where the destination variable is nested within tables.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$local_var$ = $handle$.$remote_var$:get()</td>
|
||||
<td>get contents of $remote_var$ from remote global table and assign to $local_var$.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$val1$, $val2$, $valn$ = $handle$.$remote_func$()</td>
|
||||
<td>call $remote_func$ on the server side, and return values to local state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$helper$ = $handle$.$remote_var$</td>
|
||||
<td>create a $helper$ which points to $remote_var$, and can be used as shorthand later (e.g.: $helper$:get() would get the contents of the remote variable. If $remote_var$ were a table with functions on it: $helper$.$funcname$() would call $funcname$, on table $remote_var$ on the server, and return any results.)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>]]
|
||||
},
|
||||
|
||||
{ sig = "#rpc.close#( handle )",
|
||||
@ -37,7 +83,7 @@ data_en =
|
||||
|
||||
{ sig = "#rpc.server#( transport_identifiers )",
|
||||
desc = "Start a blocking/captive RPC server, which will wait for incoming connections.",
|
||||
args = "$transport_identifiers$ - identifiers for the transport channel to listen on (specific to selected transport).",
|
||||
args = "$transport_identifiers$ - platform-specific serial port identification (see @#overview@overview@)",
|
||||
},
|
||||
|
||||
{ sig = "#rpc.on_error#( err_handler )",
|
||||
@ -47,7 +93,7 @@ data_en =
|
||||
|
||||
{ sig = "server_handle = #rpc.listen#( transport_identifiers )",
|
||||
desc = "Open a listener on transport and await incoming connections.",
|
||||
args = "$transport_identifiers$ - identifiers for the transport channel to listen on (specific to selected transport).",
|
||||
args = "$transport_identifiers$ - platform-specific serial port identification (see @#overview@overview@)",
|
||||
ret = "server handle to use with @#rpc.peek@rpc.peek@ and @#rpc.dispatch@rpc.dispatch@"
|
||||
},
|
||||
|
||||
|
@ -67,70 +67,4 @@ data_en =
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - SPI module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "spi",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing the SPI interfaces of the eLua CPU.</p>
|
||||
<p><span class="warning">IMPORTANT</span>: right now, only master SPI mode is implemented in eLua.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "clock = #spi.setup#( id, type, clock, cpol, cpha, databits )",
|
||||
desc = "Setup the SPI interface",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the SPI interface.",
|
||||
"$type$ - SPI interface type, can be either $spi.MASTER$ or $spi.SLAVE$. $NOTE: currently, only master SPI mode is supported$.",
|
||||
"$clock$ - the clock of the SPI interface.",
|
||||
"$cpol$ - the clock polarity (0 or 1).",
|
||||
"$cpha$ - the clock phase (0 or 1).",
|
||||
"$databits$ - the length of the SPI data word.",
|
||||
},
|
||||
ret = "The actual clock set on the SPI interface. Depending on the hardware, this might have a different value than the $clock$ parameter."
|
||||
},
|
||||
|
||||
{ sig = "#spi.sson#( id )",
|
||||
desc = "Select the SS line (Slave Select) of the SPI interface. This is only applicable for SPI interfaces with a dedicated SS pin.",
|
||||
args = "$id$ - the ID of the SPI interface.",
|
||||
},
|
||||
|
||||
{ sig = "#spi.ssoff#( id )",
|
||||
desc = "Deselect the SS line (Slave Select) of the SPI interface. This is only applicable for SPI interfaces with a dedicated SS pin.",
|
||||
args = "$id$ - the ID of the SPI interface.",
|
||||
},
|
||||
|
||||
{ sig = "#spi.write#( id, data1, [data2], ..., [datan] )",
|
||||
desc = "Write one or more strings/numbers to the SPI interface.",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID os the SPI interface.",
|
||||
"$data1$ - the first string/number to send.",
|
||||
"$data2 (optional)$ - the second string/number to send.",
|
||||
"$datan (optional)$ - the %n%-th string/number to send."
|
||||
},
|
||||
},
|
||||
|
||||
{ sig = "#spi.readwrite#( id, data1, [data2], ..., [datan] )",
|
||||
desc = "Write one or more strings/numbers to the SPI interface and return the data read from the same interface.",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID os the SPI interface.",
|
||||
"$data1$ - the first string/number to send.",
|
||||
"$data2 (optional)$ - the second string/number to send.",
|
||||
"$datan (optional)$ - the %n%-th string/number to send."
|
||||
},
|
||||
ret = "An array with all the data read from the SPI interface."
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -156,159 +156,4 @@ data_en =
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - term module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "term",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing ANSI-compatible terminals (and terminal emulators) from Lua.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#term.clrscr#()",
|
||||
desc = "Clear the screen",
|
||||
},
|
||||
|
||||
{ sig = "#term.clreol#()",
|
||||
desc = "Clear from the current cursor position to the end of the line",
|
||||
},
|
||||
|
||||
{ sig = "#term.moveto#( x, y )",
|
||||
desc = "Move the cursor to the specified coordinates",
|
||||
args=
|
||||
{
|
||||
"$x$ - the column (starting with 1)",
|
||||
"$y$ - the line (starting with 1)"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#term.moveup#( delta )",
|
||||
desc = "Move the cursor up",
|
||||
args = "$delta$ - number of lines to move the cursor up"
|
||||
},
|
||||
|
||||
{ sig = "#term.movedown#( delta )",
|
||||
desc = "Move the cursor down",
|
||||
args = "$delta$ - number of lines to move the cursor down",
|
||||
},
|
||||
|
||||
{ sig = "#term.moveleft#( delta )",
|
||||
desc = "Move the cursor left",
|
||||
args = "$delta$ - number of columns to move the cursor left",
|
||||
},
|
||||
|
||||
{ sig = "#term.moveright#( delta )",
|
||||
desc = "Move the cursor right",
|
||||
args = "$delta$ - number of columns to move the cursor right",
|
||||
},
|
||||
|
||||
{ sig = "numlines = #term.getlines#()",
|
||||
desc = "Get the number of lines in the terminal",
|
||||
ret = "The number of lines in the terminal",
|
||||
},
|
||||
|
||||
{ sig = "numcols = #term.getcols#()",
|
||||
desc = "Get the number of columns in the terminal",
|
||||
ret = "The number of columns in the terminal",
|
||||
},
|
||||
|
||||
{ sig = "#term.print#( [ x, y ], str1, [ str2, ..., strn ] )",
|
||||
desc = "Write one or more strings in the terminal",
|
||||
args =
|
||||
{
|
||||
"$x (optional)$ - write the string at this column. If $x$ is specified, $y$ must also be specified",
|
||||
"$y (optional)$ - write the string at this line. If $y$ is specified, $x$ must also be specified",
|
||||
"$str1$ - the first string to write",
|
||||
"$str2 (optional)$ - the second string to write",
|
||||
"$strn (optional)$ - the nth string to write"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "cx = #term.getcx#()",
|
||||
desc = "Get the current column of the cursor",
|
||||
ret = "The column of the cursor"
|
||||
},
|
||||
|
||||
{ sig = "cy = #term.getcy#()",
|
||||
desc = "Get the current line of the cursor",
|
||||
ret = "The line of the cursor"
|
||||
},
|
||||
|
||||
{ sig = "ch = #term.getchar#( [ mode ] )",
|
||||
desc = "Read a char (a key press) from the terminal",
|
||||
args = [[$mode (optional)$ - terminal input mode. It can be either:</p>
|
||||
<ul>
|
||||
<li>$term.WAIT$ - wait for a key to be pressed, then return it. This is the default behaviour if $mode$ is not specified. </li>
|
||||
<li>$term.NOWAIT$ - if a key was pressed on the terminal return it, otherwise return -1.</li>
|
||||
</ul><p>]],
|
||||
ret = [[The char read from a terminal or -1 if no char is available. The 'char' can be an actual ASCII char, or a 'pseudo-char' which encodes special keys on
|
||||
the keyboard. The list of the special chars and their meaning is given in the table below:</p>
|
||||
<table style="text-align: left; margin-left: 2em;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left;">Key code</th>
|
||||
<th style="text-align: left;">Meaning</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_UP$</td>
|
||||
<td>the UP key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_DOWN$</td>
|
||||
<td>the DOWN key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_LEFT$</td>
|
||||
<td>the LEFT key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_RIGHT$</td>
|
||||
<td>the RIGHT key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_HOME$</td>
|
||||
<td>the HOME key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_END$</td>
|
||||
<td>the END key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_PAGEUP$</td>
|
||||
<td>the PAGE UP key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_PAGEDOWN$</td>
|
||||
<td>the PAGE DOWN key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_ENTER$</td>
|
||||
<td>the ENTER (CR) key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_TAB$</td>
|
||||
<td>the TAB key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_BACKSPACE$</td>
|
||||
<td>the BACKSPACE key on the terminal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$KC_ESC$</td>
|
||||
<td>the ESC (escape) key on the terminal</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>]]
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -91,94 +91,4 @@ $NOTE:$ this function does not work with virtual timers.]]
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - tmr module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "tmr",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing the hardware timers of the eLua CPU. In addition, if virtual timers are enabled
|
||||
(see @arch_platform_timers.html#virtual_timers@here@ and @building.html@here@ for details), they can be used just like the "regular" (hardware)
|
||||
timers with a single exception: you can't set the clock of a virtual timer (using @#tmr.setclock@tmr.setclock@). To use virtual timers with this
|
||||
module, specify $tmr.VIRTx$ as the timer ID instead of a number. For example, if the eLua image was configured to support 4 virtual timers, they will
|
||||
be available by using $tmr.VIRT0$ to $tmr.VIRT3$ as timer IDs.</p>
|
||||
<p>All "time units" (delays, differences in time) in this module, as well as in other parts of eLua (timeouts) are expressed in microseconds. However,
|
||||
please keep in mind that the actual timer resolution depends on many factors. For example, it's very likely that the @#tmr.delay@tmr.delay@ function won't
|
||||
be able to delay for the exact amount you specify (in us), as the real delay depends ona number of variables, most notably the base clock of the timer
|
||||
and the size of the timer counter register (32 bits on some platforms, 16 bits on most platforms, other values are less common). To ensure that the delay
|
||||
you're requesting is achievable, use @#tmr.getmindelay@tmr.getmindelay@ and @#tmr.getmaxdelay@tmr.getmaxdelay@ to obtain the maximum and the minimum
|
||||
achievable wait times on your timer, respectively. Even if your delay is within these limits, the $precision$ of this function still varies a lot,
|
||||
mainly as a function of the timer base clock.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#tmr.delay#( id, period )",
|
||||
desc = "Waits for the specified period, then returns.",
|
||||
args =
|
||||
{
|
||||
"$period$ - the timer ID.",
|
||||
"$period$ - how long to wait (in us)."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "counter = #tmr.read#( id )",
|
||||
desc= "Reads the timer counter register.",
|
||||
args = "$id$ - the timer ID.",
|
||||
ret = "The value of the timer counter register."
|
||||
},
|
||||
|
||||
{ sig = "counter = #tmr.start#( id )",
|
||||
desc = "Starts the specified timer.",
|
||||
args = "$id$ - the timer ID.",
|
||||
ret = "The value of the timer counter register when the timer started.",
|
||||
},
|
||||
|
||||
{ sig = "delta = #tmr.gettimediff#( id, counter1, counter2 )",
|
||||
desc = "Computes the time difference between two timer counter values (you can get counter values by calling @#tmr.read@tmr.read@ or @#tmr.start@tmr.start@).",
|
||||
args =
|
||||
{
|
||||
"$id$ - the timer ID.",
|
||||
"$counter1$ - the first counter value.",
|
||||
"$counter2$ - the second counter value.",
|
||||
},
|
||||
ret = "The time difference (in us)."
|
||||
},
|
||||
|
||||
{ sig = "mindelay = #tmr.getmindelay#( id )",
|
||||
desc = "Get the minimum achieavable delay on the specified timer.",
|
||||
args = "$id$ - the timer ID.",
|
||||
ret = "The minimum achievable delay on the specified timer (in us)."
|
||||
},
|
||||
|
||||
{ sig = "maxdelay = #tmr.getmaxdelay#( id )",
|
||||
desc = "Get the maximum achieavable delay on the specified timer.",
|
||||
args = "$id$ - the timer ID.",
|
||||
ret = "The maximum achievable delay on the specified timer (in us)."
|
||||
},
|
||||
|
||||
{ sig = "clock = #tmr.setclock#( id, clock )",
|
||||
desc = "Set the timer clock (the clock used to increment the timer counter register).",
|
||||
args =
|
||||
{
|
||||
"$id$ - the timer ID.",
|
||||
"$clock$ - the timer clock (in Hz)."
|
||||
},
|
||||
ret = [[The actual clock set on the timer (in Hz). Depending on the hardware, this might have a different value than the $clock$ argument.
|
||||
$NOTE:$ this function does not work with virtual timers.]]
|
||||
},
|
||||
|
||||
{ sig = "clock = #tmr.getclock#( id )",
|
||||
desc = "Get the timer clock (the clock used to increment the timer counter register).",
|
||||
args = "$id$ - the timer ID.",
|
||||
ret = "The timer clock (in Hz)."
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -78,81 +78,4 @@ $timeout$ is neither $uart.NO_TIMEOUT$, nor $uart.INF_TIMEOUT$).]]
|
||||
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - UART module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "uart",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accessing the serial ports (UARTs) of the eLua CPU.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "baud = #uart.setup#( id, baud, databits, parity, stopbits )",
|
||||
desc = "Setup the serial port",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the serial port",
|
||||
"$baud$ - serial baud rate",
|
||||
"$databits$ - number of data bits",
|
||||
"$parity$ - parity type, can be either $uart.PAR_EVEN$, $uart.PAR_ODD$ or $uart.PAR_NONE$",
|
||||
[[$stopbits$ - the number of stop bits, can be either $uart.STOP_1$ (for 1 stop bit), $uart.STOP_1_5$ (for 1.5 stop bits) or $uart.STOP_2$
|
||||
(for 2 stop bits)]]
|
||||
},
|
||||
ret = "The actual baud rate set on the serial port. Depending on the hardware, this might have a different value than the $baud$ parameter"
|
||||
},
|
||||
|
||||
{ sig = "#uart.write#( id, data1, [data2], ..., [datan] )",
|
||||
desc = [[Write one or more strings or numbers to the serial port. If writing a number, its value must be between 0 and 255.]],
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the serial port.",
|
||||
"$data1$ - the first string/number to write.",
|
||||
"$data2 (optional)$ - the second string/number to write.",
|
||||
"$datan (optional)$ - the %n%-th string/number to write."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "str = #uart.getchar#( id, [timeout], [timer_id] )",
|
||||
desc = "Read a single character from the serial port",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the serial port",
|
||||
[[$timeout (optional)$ - timeout of the receive operation, can be either $uart.NO_TIMEOUT$ or 0 for non-blocking operation, $uart.INF_TIMEOUT$ for
|
||||
blocking operation, or a positive number that specifies the timeout in microseconds (in this case, the $timer_id$ parameter is also required). The default
|
||||
value of this argument is $uart.INF_TIMEOUT$]],
|
||||
[[$timer_id (optional)$ - the ID of the timer for the receive operation, needed if the $timeout$ parameter specifies an actual timeout (that is,
|
||||
$timeout$ is neither $uart.NO_TIMEOUT$, nor $uart.INF_TIMEOUT$).]]
|
||||
},
|
||||
ret = "The character read from the serial port as a string, or the empty string it timeout occured while waiting for the character."
|
||||
},
|
||||
|
||||
{ sig = "str = #uart.read#( id, format, [timeout], [timer_id] )",
|
||||
desc = "Reads one or more characters from the serial port according to a format specifier",
|
||||
args =
|
||||
{
|
||||
"$id$ - the ID of the serial port",
|
||||
[[$format$ - format of data to read. This can be either:
|
||||
<ul>
|
||||
<li>$'*l'$ - read until an end of line character (a $\n$) is found (the $\n$ is not returned) or a timeout occurs.</li>
|
||||
<li>$'*n'$ - read an integer. The integer can optionally have a sign. Reading continues until the first non-digit character is detected or a timeout occurs. This is the only case in which $read$ returns a number instead of an integer.</li>
|
||||
<li>$'*s'$ - read until a spacing character (like a space or a TAB) is found (the spacing character is not returned) or a timeout occurs.</li>
|
||||
<li>$a positive number$ - read at most this many characters before returning (reading can stop earlier if a timeout occurs).</li>
|
||||
</ul>]],
|
||||
[[$timeout (optional)$ - timeout of the receive operation, can be either $uart.NO_TIMEOUT$ or 0 for non-blocking operation, $uart.INF_TIMEOUT$ for
|
||||
blocking operation, or a positive number that specifies the inter-char timeout in microseconds (in this case, the $timer_id$ parameter is also required). The default value of this argument is $uart.INF_TIMEOUT$]],
|
||||
[[$timer_id (optional)$ - the ID of the timer for the receive operation, needed if the $timeout$ parameter specifies an actual timeout (that is,
|
||||
$timeout$ is neither $uart.NO_TIMEOUT$, nor $uart.INF_TIMEOUT$).]]
|
||||
},
|
||||
ret = [[The data read from the serial port as a string (or as a number if $format$ is $'*n'$). If a timeout occures, only the data read before the timeout is returned. If the function times out while trying to read the first character, the empty string is returned]]
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -67,70 +67,4 @@ data_en =
|
||||
},
|
||||
}
|
||||
|
||||
data_pt =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - LM3S disp module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "disp",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for working with the RIT OLED display on the Luminary Micro EKx-LM3S8962 boards and others.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#lm3s.disp.init#( frequency )",
|
||||
desc = "Initialize the display.",
|
||||
args = "$frequency$ - Number, the clock frequency (in Hertz) of the SSI interface used to control the display."
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.enable#( frequency )",
|
||||
desc = "Enable the display.",
|
||||
args = "$frequency$ - Number, the clock frequency (in Hertz) of the SSI interface used to control the display."
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.disable#()",
|
||||
desc = "Disable the display.",
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.on#()",
|
||||
desc = "Turn the display on."
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.off#()",
|
||||
desc = "Turn the display off."
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.clear#()",
|
||||
desc = "Clear the display."
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.print#( str, x, y, col )",
|
||||
desc = "Write a string on the display. A 5x7 font (in a 6x8 cell) is used for drawing the text.",
|
||||
args =
|
||||
{
|
||||
"$str$ - String, the text to be written on the display.",
|
||||
"$x$ - Number [0-127], the horizonal position of the text (specified in columns).",
|
||||
"$y$ - Number [0-95], the vertical position of the text (specified in lines).",
|
||||
"$col$ - Number [0-15], the 4-bit gray scale value to be used for the text."
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "#lm3s.disp.draw#( img, x, y, width, height )",
|
||||
desc = "Draw an image on the display.",
|
||||
args =
|
||||
{
|
||||
"$img$ - String, the image to draw in string format.",
|
||||
"$x$ - Number [0-127], the horizontal position of the image (specified in pixels).",
|
||||
"$y$ - Number [0-95], the vertical position of the image (specified in pixels).",
|
||||
"$width$ - Number [1-127], the width of the image.",
|
||||
"$height$ - Number [1-95], the height of the image."
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
36
doc/eluadoc/refman_ps_str9_pio.lua
Normal file
@ -0,0 +1,36 @@
|
||||
-- eLua reference manual - platform data
|
||||
|
||||
data_en =
|
||||
{
|
||||
|
||||
-- Title
|
||||
title = "eLua reference manual - STR9 pio module",
|
||||
|
||||
-- Menu name
|
||||
menu_name = "pio",
|
||||
|
||||
-- Overview
|
||||
overview = [[This module contains functions for accesing the particular features of the PIO subsystem of the STR9 family of CPUs. This subsystem is very flexible, allowing things like
|
||||
configurable output types (push-pull or open collector), multiple alternate functions for the PIO pins, and others. For a full description of the STR9 PIO module check the STR9 CPU
|
||||
Reference manual, available from ST at @http://www.st.com/mcu/devicedocs-STR912FAW44-101.html@this address@. Note that this module is a supplement of the platform independent
|
||||
@refman_gen_pio.html@pio@ module, not a replacement. Use this module only for setting up the STR9 PIO pins, and the @refman_gen_pio.html@pio@ module for all the other PIO related operations.]],
|
||||
|
||||
-- Functions
|
||||
funcs =
|
||||
{
|
||||
{ sig = "#str9.pio.setpin#( pin, direction, type, ipconnected, alternate )",
|
||||
desc = "Setup the pin.",
|
||||
args =
|
||||
{
|
||||
"$pin$ - the pin, as encoded in the @refman_gen_pio.html@pio@ module.",
|
||||
"$direction$ - the pin direction, can be either $str9.pio.INTPUT$ or $str9.pio.OUTPUT$,",
|
||||
"$type$ - the type of the pin, can be either $str9.pio.OUTPUT_PUSHPULL$ (push-pull) or $str9.pio.OUTPUT_OC$ (open collector).",
|
||||
"$ipconnected$ - $true$ to connect the pin to its corresponding peripheral(s), $false$ otherwise.",
|
||||
"$alternate$ - alternate pin function. Must be either $str9.pio.ALT_INPUT$, $str9.pio.ALT_OUTPUT1$, $str9.pio.ALT_OUTPUT2$, $str9.pio.ALT_OUTPUT3$."
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
data_pt = data_en
|
@ -50,3 +50,4 @@ data_en =
|
||||
}
|
||||
}
|
||||
|
||||
data_pt = data_en
|
||||
|
@ -77,6 +77,8 @@ As opposed to:
|
||||
<pre><code>int Simple1;
|
||||
double AnotherIdentifier;
|
||||
char DontEvenThinkAboutWritingSomethingLikeThis;</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<b>DO NOT USE HUNGARIAN NOTATION</b> (like iNumber, sString, fFloat ... if you don't know what that is, it's fine, as it means that we don't need to worry about it :) ). It has its advantages
|
||||
when used properly, it's just not for <b>eLua</b>.
|
||||
</li>
|
||||
|
@ -99,7 +99,7 @@ might encounter other problems with it.</p>
|
||||
but a precise performance penalty figure is not known. Experience suggests that the performance penalty is minimal, and it certainly can't be observed
|
||||
with "regular" (non-computationally intensive) Lua programs.</p>
|
||||
<h2>How to enable LTR</h2>
|
||||
<p>Enabling LTR is very easy: all you need to do is specify the <b>opt=1</b> as a parameter to scons when building <b>eLua</b>, as explained
|
||||
<p>Enabling LTR is very easy: all you need to do is specify the <b>optram=1</b> as a parameter to scons when building <b>eLua</b>, as explained
|
||||
<a href="building.html">here</a>. You don't even to specify this explicitly, as LTR is enabled by default for all <b>eLua</b> targets.</p>
|
||||
<p>When <b>optram</b> is 0, LTR is not active. In this mode the patch just tries to keep the modified version as close as possible to the unpatched version
|
||||
in terms of speed and functionality. You might want to use this if you want full Lua compatibility (although this is rarely an issue in practice),
|
||||
@ -155,7 +155,7 @@ LUALIB_API int luaopen_mod( lua_State *L )
|
||||
0.</li>
|
||||
</ul>
|
||||
<p>The two forms above (for regular tables and for rotables) are clearly different, but we want to keep them both to be able to work at both <b>optram=0</b>
|
||||
and <b>optram=2</b>. You can use #ifdefs to differentiate between the two cases in different optimization levels, but this becomes really annoying after
|
||||
and <b>optram=1</b>. You can use #ifdefs to differentiate between the two cases in different optimization levels, but this becomes really annoying after
|
||||
a (short) while. This is why I added another file called <b>lrodefs.h</b> (<i>src/lua</i>) that can be used to give an "universal" definition to our map
|
||||
arrays. Here's how our example looks after rewriting it to take advantage of <b>lrodefs.h</b>:</p>
|
||||
<pre><code><span class="warning">#define MIN_OPT_LEVEL 2 // the minimum optimization level at which we use rotables</span>
|
||||
|
@ -70,7 +70,7 @@ possible; that is, it should absorb as much common code as possible. For example
|
||||
<a href="building.html">here</a>, the user must have full control over what's getting built into this <b>eLua</b> image. If you don't need the SPI
|
||||
module, for example, you don't need to implement its platform interface.</li>
|
||||
<li>a part of the platform interface is implemented (at least partially) in a file that is common for all the platforms (<i>src/common.c</i>). It
|
||||
eases the implmentation of some modules (such as the timer module) and also implements common features that are tied to the platform interface,
|
||||
eases the implementation of some modules (such as the timer module) and also implements common features that are tied to the platform interface,
|
||||
but have a common behaviour on all platforms (for example virtual timers, see <a href="arch_platform_timers.html#virtual_timers">here</a> for details). You probably won't need to modify
|
||||
if you're writing platform specific code, but it's best to keep in mind what it does.</li>
|
||||
</ul>
|
||||
@ -202,7 +202,8 @@ specific_files = " ".join( [ "src/platform/%s/%s" % ( platform, f ) for f in spe
|
||||
<li><b>main</b> then initializes the rest of the system: the ROM file system, XMODEM, and term.</li>
|
||||
<li>if <b>/rom/autorun.lua</b> (which is a file called <b>autorun.lua</b> in the <a href="arch_romfs.html">ROM file system</a>) is found, it is
|
||||
executed. If it returns after execution, or if it isn't found, the boot process continues with the next step.</li>
|
||||
<li>if the <a href="using.html#shell">shell</a> was compiled in the image, it is started, otherwise a standard Lua interpreter is started.</li>
|
||||
<li>if boot is set to 'standard' and the <a href="using.html#shell">shell</a> was compiled in the image, it is started, in the absence of the shell, a standard Lua interpreter is started.</li>
|
||||
<li>if boot is set to 'luarpc' an rpc server is started.</li>
|
||||
</ol>
|
||||
$$FOOTER$$
|
||||
|
||||
|
@ -55,5 +55,21 @@ $$HEADER$$
|
||||
<p><pre><code>eLua# lua /rom/bisect.lua</code></pre></p>
|
||||
<p>Or directly from Lua:</p>
|
||||
<p><pre><code>> dofile "/rom/bisect.lua"</code></pre></p>
|
||||
<a name="mode" /><h2>ROMFS modes</h2>
|
||||
<p>Starting with version 0.7, the ROMFS can be added to the <b>eLua</b> binary image in 3 different ways:</p>
|
||||
<ul>
|
||||
<li><b>verbatim</b>: this is the default option. All the files are copied to the ROMFS directly, without any processing.</li>
|
||||
<li><b>compress</b>: compress the Lua source code by using <a href="http://luaforge.net/projects/luasrcdiet/">LuaSrcDiet</a> (included in <b>eLua</b>), a program
|
||||
that can decrease the size of a Lua source file by applying different transformations. Every
|
||||
Lua source file (extension <b>.lua</b>) from ROMFS is fed through LuaSrcDiet and the result is written in the <b>eLua</b> binary image. This option can yield
|
||||
pretty good compression, the only downside being that the compressed Lua source files aren't generally easily readable. However, this isn't really a problem in
|
||||
most practical cases.</li>
|
||||
<li><b>compile</b>: precompile the Lua source code to bytecode. Every Lua source file (extension <b>.lua</b>) from ROMFS is fed through the Lua cross compiler
|
||||
(see <a href="using.html#cross">here</a> for details on cross compilation and its benefits) and the result is written in the <b>eLua</b> binary image. This option
|
||||
might decrease or increase the physical size of the ROMFS image, but its real benefits are increased speed (because <b>eLua</b> doesn't need to compile the Lua
|
||||
code to bytecode first) and decreased RAM consumption (the Lua parser might get quite memory-hungry at times, which in turn might lead to stack overflows and very
|
||||
hard to find bugs). </li>
|
||||
</ul>
|
||||
<p>See <a href="building.html#buildoptions">here</a> for instructions on how to specify the ROMFS compilation mode.</p>
|
||||
$$FOOTER$$
|
||||
|
||||
|
@ -1,49 +1,10 @@
|
||||
$$HEADER$$
|
||||
<h3>Building eLua</h3>
|
||||
<p>If you decide to build your own <b>eLua</b>
|
||||
binary image (instead of <a href="downloads.html">downloading
|
||||
one</a>) you need to check a few things first:
|
||||
</p>
|
||||
<ul>
|
||||
<li>you're using Linux. Compiling under windows should be
|
||||
possible, however this isn't tested. We are in Ubuntu, so what
|
||||
we use is "apt-get". If you're using a distro with a different
|
||||
package
|
||||
manager you'll need to translate the "apt-get" calls to your specific
|
||||
distribution.</li>
|
||||
<li>you have a toolchain (compiler, linker, assembler and
|
||||
standard C libraries) for your target. Check <a href="toolchains.html">the toolchains page</a> for
|
||||
toolchain instructions. Please note that even if you already have a
|
||||
compiled toolchain, the differences in the Newlib configure flags
|
||||
(mainly the --disable-newlib-supplied-syscalls flags) might prevent <b>eLua</b>
|
||||
for building properly on your machine.</li>
|
||||
<li>you set your platform configuration options properly. Check
|
||||
the next paragraph for instructions on how to configure your build.</li>
|
||||
<li>Python - It should be already installed. If it's not, use
|
||||
apt-get to install it:
|
||||
<pre><code>$ sudo apt-get install python</code></pre>
|
||||
</li>
|
||||
<li>Scons - <b>eLua</b> uses scons instead of make
|
||||
and makefiles, because we find scons much more "natural" and easier to
|
||||
use than make. To install it:
|
||||
<pre><code>$ sudo apt-get install scons</code></pre>
|
||||
</li>
|
||||
<li>your toolchain's "bin" directory (this is generally
|
||||
something like /usr/local/cross-arm/bin, where /usr/local/cross-arm is
|
||||
the directory in which you installed your toolchain) must be in $PATH.
|
||||
</li>
|
||||
<li>if you're building for the i386 platform, you'll also need
|
||||
"nasm":
|
||||
<pre><code>$ sudo apt-get install nasm</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>For each platform, <b>eLua</b> assumes a certain
|
||||
name for the toolchain components, as shown below.
|
||||
</p>
|
||||
<p>If your toolchain uses different names, you have to modify the
|
||||
toolchain definition in SConstruct. See the <a href="toolchains.html">toolchains instructions</a> for
|
||||
details.</p>
|
||||
<h3>Configuring the build image</h3>
|
||||
<p>If you decide to build your own <b>eLua</b> binary image (instead of <a href="downloads.html">downloading
|
||||
one</a>) you need to download the source code (see <a href="downloads.html#source">here</a> for details) and follow the
|
||||
platform specific eLua build instructions (provided for <a href="building_unix.html">Linux</a> and <a href="building_win.html">Windows</a>) to setup your build environment.
|
||||
Then follow the instructions below to build your eLua binary image.</p>
|
||||
<a name="configuring" /><h3>Configuring the build image</h3>
|
||||
<p><b>eLua</b> has a very flexible build system that
|
||||
can be used to select the components that are going to be part of the <b>eLua</b>
|
||||
binary image and to set the compile time (static) configuration.
|
||||
@ -52,7 +13,7 @@ located in the platform specific directory (<i>src/platform/<platform
|
||||
name>/platform_conf.h)</i>. The configuration parameters
|
||||
are described in detail in the next paragraphs.</p>
|
||||
<a name="components"><h2>Configuring components</h2></a>
|
||||
<p>A <b>component</b> is a feature that can be
|
||||
<p>An <b>eLua component</b> is a feature that can be
|
||||
enabled to add functionality to <b>eLua</b> itself,
|
||||
without modifying its API (which is the part that the programmer uses
|
||||
to write <b>eLua</b> programs). An example of component configuration from
|
||||
@ -63,12 +24,14 @@ to write <b>eLua</b> programs). An example of component configuration from
|
||||
#define BUILD_XMODEM
|
||||
#define BUILD_SHELL
|
||||
#define BUILD_ROMFS
|
||||
#define BUILD_MMCFS
|
||||
#define BUILD_TERM
|
||||
#define BUILD_UIP
|
||||
#define BUILD_DHCPC
|
||||
#define BUILD_DNS
|
||||
#define BUILD_CON_GENERIC
|
||||
#define BUILD_ADC</code></pre>
|
||||
#define BUILD_ADC
|
||||
#define BUILD_RPC</code></pre>
|
||||
<p>The components that can be configured in <b>eLua</b> are:</p>
|
||||
<table class="table_center">
|
||||
<tbody>
|
||||
@ -111,6 +74,15 @@ To enable:
|
||||
<pre><code>#define BUILD_ROMFS</code></pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">BUILD_MMCFS</td>
|
||||
<td>Enable the <b>eLua</b> SD/MMC FAT
|
||||
filesystem support.
|
||||
To enable:
|
||||
<pre><code>#define BUILD_MMCFS</code></pre>
|
||||
<a href="building.html#static">Static configuration data dependencies:</a> <b>MMCFS_TICK_HZ, MMCFS_TICK_MS, MMCFS_CS_PORT, MMCFS_CS_PIN, MMCFS_SPI_NUM</b></td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">BUILD_TERM</td>
|
||||
<td>Enable ANSI terminal support. It allows <b>eLua</b>
|
||||
to interact with terminals that support ANSI escape sequences (more details <a href="arch_con_term.html">here</a>).
|
||||
@ -181,6 +153,14 @@ To enable:
|
||||
<a href="building.html#static">Static configuration data dependencies:</a> <b>ADC_BIT_RESOLUTION, ADC_TIMER_FIRST_ID, ADC_NUM_TIMERS, BUF_ENABLE_ADC, ADC_BUF_SIZE</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">BUILD_RPC</td>
|
||||
<td>Define this to build support for LuaRPC. This must be enabled to use the <a href="refman_gen_rpc.html">rpc module</a>.
|
||||
To enable:
|
||||
<pre><code>#define BUILD_RPC</code></pre>
|
||||
<a href="building.html#static">Static configuration data dependencies</a> (ONLY if built with boot=luarpc): <b>RPC_UART_ID, RPC_TIMER_ID</b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<a name="confmodules"><h2>Configuring modules</h2></a>
|
||||
@ -268,6 +248,20 @@ documentation</a> for details). Define VTMR_NUM_TIMERS to 0 if
|
||||
this feature is not used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">MMCFS_TICK_HZ<br>
|
||||
MMCFS_TICK_MS</td>
|
||||
<td>Specify the rate at which SD/MMC timer function <i>disk_timerproc()</i> are being called by the platform. On most platforms MMCFS_TICK_HZ will match VTMR_FREQ_HZ. Only needed if MMCFS support is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">MMCFS_CS_PORT<br>
|
||||
MMCFS_CS_PIN</td>
|
||||
<td>Specify the port and pin to be used as chip select for MMCFS control of an SD/MMC card over SPI. Only needed if MMCFS support is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">MMCFS_SPI_NUM</td>
|
||||
<td>Specify the SPI peripheral to be used by MMCFS. Only needed if MMCFS support is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">PLATFORM_CPU_CONSTANTS</td>
|
||||
<td>If the <a href="refman_gen_cpu.html">cpu module</a>
|
||||
is enabled, this defines a list of platform-specific constants (for
|
||||
@ -282,34 +276,38 @@ all, so you can define as many constants as you want here. </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<<<<<<< .mine
|
||||
<td style="color: rgb(255, 102, 0);">BUF_ENABLE_ADC</td>
|
||||
<td>If the <a href="arch_platform_adc.html">adc module</a> is enabled, this controls whether or not the ADC will create a buffer so that more than one sample per channel can be held in a buffer before being returned through adc.getsample or adc.getsamples. If disabled, only one conversion result will be buffered. This option does NOT affect the behavior of the moving average filter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">ADC_BUF_SIZE</td>
|
||||
<td>If the <a href="arch_platform_adc.html">adc module</a> is enabled, and BUF_ENABLE_ADC is defined, this will define the default buffer length allocated at startup. This does not limit buffer sizes, it only defines the default length. Appropriate values range from BUF_SIZE_2 to BUF_SIZE_32768, with the numeric component at the end being in powers of 2.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">ADC_BIT_RESOLUTION<br>ADC_TIMER_FIRST_ID<br>ADC_NUM_TIMERS
|
||||
=======
|
||||
<td style="color: rgb(255, 102, 0);">BUF_ENABLE_ADC</td>
|
||||
<td>If the <a href="refman_gen_adc.html">adc module</a> is enabled, this controls whether or not the ADC will create a buffer so that more than one sample per channel can be held in a buffer before being returned through adc.getsample or adc.getsamples. If disabled, only one conversion result will be buffered. This option does NOT affect the behavior of the moving average filter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">ADC_BUF_SIZE</td>
|
||||
<td>If the <a href="refman_gen_adc.html">adc module</a> is enabled, and BUF_ENABLE_ADC is defined, this will define the default buffer length allocated at startup. This does not limit buffer sizes, it only defines the default length. Appropriate values range from BUF_SIZE_2 to BUF_SIZE_32768, with the numeric component at the end being in powers of 2.</td>
|
||||
<td>If the <a href="refman_gen_adc.html">adc module</a> is enabled, and
|
||||
BUF_ENABLE_ADC is defined, this will define the default buffer length
|
||||
allocated at startup. This does not limit buffer sizes, it only defines the
|
||||
default length. Appropriate values range from BUF_SIZE_2 to BUF_SIZE_32768,
|
||||
with the numeric component at the end being in powers of 2.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">ADC_BIT_RESOLUTION
|
||||
>>>>>>> .r476
|
||||
</td>
|
||||
<<<<<<< .mine
|
||||
<td>The ADC resolution in bits, the ID of the first timer and the total number of timers used by the ADC subsystem.</td>
|
||||
=======
|
||||
<td>If the <a href="refman_gen_adc.html">adc module</a> is enabled, this will define the number of bits per adc conversion result. This is used to determine the maximum conversion value that can be returned by the ADC.</td>
|
||||
>>>>>>> .r476
|
||||
<td>If the <a href="refman_gen_adc.html">adc module</a> is enabled, this will
|
||||
define the number of bits per adc conversion result. This is used to determine
|
||||
the maximum conversion value that can be returned by the ADC.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">RPC_UART_ID
|
||||
</td>
|
||||
<td>If the <a href="refman_gen_rpc.html">rpc module</a> is enabled and boot mode is set to luarpc, this selects which uart luarpc will listen on for incoming client connections.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">RPC_TIMER_ID
|
||||
</td>
|
||||
<td>If the <a href="refman_gen_rpc.html">rpc module</a> is enabled and boot mode is set to luarpc, this selects which timer will be used with the uart selected with RPC_UART_ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">EGC_INITIAL_MODE<br />EGC_INITIAL_MEMLIMIT</td>
|
||||
<td><b>(version 0.7 or above)</b> Configure the default (compile time) operation mode and memory limit of the emergency garbage collector (see <a href="elua_egc.html">here</a> for details
|
||||
about the EGC patch). If not specified, <b>EGC_INITIAL_MODE</b> defaults to <b>EGC_NOT_ACTIVE</b> (emergency garbage collector disabled) and <b>EGC_INITIAL_MEMLIMIT</b> defaults to 0.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -318,7 +316,7 @@ to be modified mainly by developers and thus they're not listed here.<br>
|
||||
One more thing you might want to configure for your build is the
|
||||
contents of the ROM file system. See the <a href="arch_romfs.html">ROMFS
|
||||
documentation</a> for details on how to do this.</p>
|
||||
<h3>Invoking the build system</h3>
|
||||
<a name="buildoptions" /><h3>Invoking the build system</h3>
|
||||
<p>Once you have everything in place, all you have to do is to
|
||||
invoke the build system (scons) with the right arguments. This is a
|
||||
fairly easy step, although it might look intimidating because of the
|
||||
@ -328,7 +326,7 @@ very special you won't need to modify them, so don't worry about the
|
||||
aparent complexity. The examples at the end of this section will show
|
||||
how easy it is to use the build system in practice.
|
||||
</p>
|
||||
<pre><code>$ scons <br> [target=lua | lualong]<br> [cpu=at91sam7x256 | at91sam7x512 | i386 | str912fw44 | lm3s8962 | <br> lm3s6965 | lm3s6918 | lpc2888 | str711fr2 | at32uc3a0512 | stm32f103ze<br> [board=ek-lm3s8962 | ek-lm3s6965 | eagle-100 | str9-comstick | sam7-ex256 | <br> lpc-h2888 | mod711 | pc | atevk1100 | stm3210e-eval ]<br> [cpumode=arm | thumb] <br> [allocator = newlib | multiple | simple]<br> [toolchain = <toolchain name>]<br> [optram = 0 | 1]<br> [prog]<br></code></pre>
|
||||
<pre><code>$ scons <br> [target=lua | lualong]<br> [cpu=at91sam7x256 | at91sam7x512 | i386 | str912fw44 | lm3s8962 | <br> lm3s6965 | lm3s6918 | lpc2888 | str711fr2 | at32uc3a0512 | stm32f103ze<br> [board=ek-lm3s8962 | ek-lm3s6965 | eagle-100 | str9-comstick | sam7-ex256 | <br> lpc-h2888 | mod711 | pc | atevk1100 | stm3210e-eval ]<br> [cpumode=arm | thumb] <br> [allocator = newlib | multiple | simple]<br> [toolchain = <toolchain name>]<br> [optram = 0 | 1]<br> [romfs = verbatim | compress | compile]<br> [prog]<br></code></pre>
|
||||
<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
|
||||
@ -381,6 +379,8 @@ command will build only the 'elf' (executable) 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>
|
||||
<li><b>romfs = verbatim | compress | compile</b>: ROMFS compilation mode, check <a href="arch_romfs.html#mode">here</a> for details (<b>new in 0.7</b>).</li>
|
||||
<li><b>boot = standard | luarpc</b>: Boot mode. 'standard' will boot to either a shell or lua interactive prompt. 'luarpc' boots with a waiting rpc server, using a UART & timer as specified in <a href="building.html#static">static configuration data</a> (<b>new in 0.7</b>).</li>
|
||||
</ul>
|
||||
<p>The output will be a file named elua_<i>[target]</i>_<i>[cpu]</i>.elf
|
||||
(and also another file with the same name but ending in .bin/.hex if
|
||||
|
36
doc/en/building_unix.html
Normal file
@ -0,0 +1,36 @@
|
||||
$$HEADER$$
|
||||
<h3>Building eLua in Linux</h3>
|
||||
<p>Building <b>eLua</b> in Linux is fairly easy. This tutorial assumes that Ubuntu is used for building, however any distro should be fine, you just need to
|
||||
convert the "apt-get" calls to your distro's package manager equivalent. You need a few packages installed to build <b>eLua</b>:</p>
|
||||
<ul>
|
||||
<li><b>a toolchain</b>: check <a href="toolchains.html">the toolchains page</a> for
|
||||
toolchain instructions. Please note that even if you already have a
|
||||
compiled toolchain, the differences in the Newlib configure flags
|
||||
(mainly the --disable-newlib-supplied-syscalls flags) might prevent <b>eLua</b>
|
||||
for building properly on your machine.</li>
|
||||
<li><b>Python</b> : it should be already installed. If it's not, use
|
||||
apt-get to install it:
|
||||
<pre><code>$ sudo apt-get install python</code></pre>
|
||||
</li>
|
||||
<li><b>scons</b> - <b>eLua</b> uses scons instead of make
|
||||
and makefiles, because we find scons much more "natural" and easier to
|
||||
use than make. To install it:
|
||||
<pre><code>$ sudo apt-get install scons</code></pre>
|
||||
</li>
|
||||
<li>your toolchain's "bin" directory (this is generally
|
||||
something like /usr/local/cross-arm/bin, where /usr/local/cross-arm is
|
||||
the directory in which you installed your toolchain) must be in $PATH.
|
||||
</li>
|
||||
<li>if you're building for the i386 platform, you'll also need
|
||||
"nasm":
|
||||
<pre><code>$ sudo apt-get install nasm</code></pre>
|
||||
</li>
|
||||
<li><b>gcc</b>: if you want to use the ROMFS precompile feature (see <a href="arch_romfs.html#mode">here</a> for details) you need to build an image of the <b>eLua</b> cross compiler, and you need an i386
|
||||
toolchain for this. It should be already installed, but if you want to be on the safe side do this:
|
||||
<pre><code>sudo apt-get install build-essential</code></pre>
|
||||
Then build the <b>eLua</b> cross compiler by executing this command:
|
||||
<pre><code>scons -f cross-lua.py</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>After you setup your build environment as described above, follow <a href="building.html#configuring">this tutorial</a> to build your <b>eLua</b> image.</p>
|
||||
$$FOOTER$$
|
35
doc/en/building_win.html
Normal file
@ -0,0 +1,35 @@
|
||||
$$HEADER$$
|
||||
<h3>Building eLua in Windows</h3>
|
||||
<p>Starting with version 0.7, building <b>eLua</b> in Windows is officialy supported. The following instructions were tested in Windows 7 Professional, but they
|
||||
should work with little or no modification in any version of Windows 7, Vista or XP. You need to download and install a few things first:</p>
|
||||
<ul>
|
||||
<li><b>a toolchain</b>: building a GCC-based toolchain under Windows is possible, but not easy. We found that the easiest thing to do is to download a pre-built toolchain
|
||||
and install it. Currently, all the targets supported by <b>eLua</b> (except i386) have at least one toolchain that runs under Windows:
|
||||
<ul>
|
||||
<li>For ARM7, ARM9 and Cortex-M3 targets, you can download and install the CodeSourcery Lite Edition (supported by <b>eLua</b> out of the box) from
|
||||
<a href="http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite">here</a>. For reference, the version used in this tutorial is
|
||||
"Sourcery G++ Lite 2009q3-68 for ARM EABI". Future (and some previous) versions of this toolchain should also work. Remember to specify
|
||||
<code>toolchain=codesourcery</code> when using this toolchain (see <a href="building.html#buildoptions">here</a> for details).</li>
|
||||
<li>AVR32 has its own Windows based GNU toolchain that can be downloaded from Atmel <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4118">here</a>.</li>
|
||||
</ul></li>
|
||||
<li><b>Python</b>: my favourite Windows distribution of Python is <a href="http://www.activestate.com/activepython/">ActivePython</a>. Simply download it and install it. ActivePython
|
||||
2.6.4.8 will be used in this tutorial. Other Python distribution might work equally well.</li>
|
||||
<li><b>scons</b>: download the Windows installer package from <a href="http://www.scons.org/download.php">here</a>. For this tutorial, scons 1.2.0 will be used. Remember to install
|
||||
scons <b>after</b> you install Python. </li>
|
||||
<li><b>lua</b>: a very good and versatile Lua distribution for Windows is "Lua for Windows", it can be downloaded from <a href="http://luaforwindows.luaforge.net/">here</a>. Besides
|
||||
Lua itself, it includes a lot of very useful Lua modules, so I highly recommend it. Version 5.1.4.30 of Lua for Windows will be used in this tutorial.</li>
|
||||
<li><b>svn</b>: if you need to checkout the <b>eLua</b> source code from the SVN repository, you need to install SVN for windows. There are a few precompiled SVN packages for
|
||||
Windows available, I'm using the Tigris binaries that can be downloaded from <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100">here</a>. In this
|
||||
tutorial I'll use version 1.6.6. If you require developer access (svn+ssh), additional steps are needed to make "svn+ssh" work in Windows. A lot of tutorials
|
||||
that cover this topic are available, check for example <a href="http://agateau.wordpress.com/2007/07/03/windows-svnssh-and-the-subversion-command-line-client/">this one</a>.</li>
|
||||
<li><b>gcc</b>: if you want to use the ROMFS precompile feature (see <a href="arch_romfs.html#mode">here</a> for details) you need to build an image of the <b>eLua</b> cross compiler, and you need an i386
|
||||
toolchain for this. I'm using MinGW for this task, it can be downloaded from <a href="http://www.mingw.org/">here</a>. This tutorial uses MinGW version 5.1.6. Note that you
|
||||
don't need to install MSYS, MinGW should be enough. Cygwin should work equally well, or even Microsoft's Visual Studio (not tested). To build the cross compiler, run
|
||||
this command from the command line:
|
||||
<pre><code>scons -f cross-lua.py</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Make sure that all the programs listed above are added to %PATH%. Most of them do this automatically, or have an option to do this automatically, but some
|
||||
(for example MinGW) do not and you need to add them to %PATH% manually.</p>
|
||||
<p>After you setup your build environment as described above, follow <a href="building.html#configuring">this tutorial</a> to build your <b>eLua</b> image.</p>
|
||||
$$FOOTER$$
|
@ -1,5 +1,5 @@
|
||||
$$HEADER$$
|
||||
<a name="lists" /><h3>Mail lists</h3>
|
||||
<a name="lists" /><h3>Mailing lists</h3>
|
||||
<p style="text-align: left;"><strong>eLua</strong> currently has a single <strong>developers and users discussion list</strong>. You are very welcomed
|
||||
to join us at <a href="https://lists.berlios.de/mailman/listinfo/elua-dev">https://lists.berlios.de/mailman/listinfo/elua-dev</a>.
|
||||
Please note that the list is moderated in order to avoid spam, so you
|
||||
@ -8,7 +8,7 @@ rarely accepted.</p>
|
||||
<p>Our development repository is currently maintained in a
|
||||
subversion server. If you want to track SVN activity, you can also subscribe to our <strong>SVN
|
||||
Activity List</strong> at <a href="https://lists.berlios.de/mailman/listinfo/elua-svn">https://lists.berlios.de/mailman/listinfo/elua-svn</a></p>
|
||||
<a name="forums" /><h3>eLua forums</h3>
|
||||
<a name="forums" /><h3>Forums</h3>
|
||||
<p><b>eLua</b> doesn't have a dedicated forum at this point. However, our <strong>developers and users discussion list</strong> is "mirrored" in a forum-like format at
|
||||
<a href="http://n2.nabble.com/eLua-Development-f2368040.html">this address</a>
|
||||
(using the services provided by <a href="http://www.nable.com">Nabble</a>).
|
||||
@ -20,24 +20,23 @@ continuous development of the project. Here's an alphabetically
|
||||
ordered non-exhaustive list of contributors:</p>
|
||||
<ul>
|
||||
<li>Everson Denis and Flávio Nogueira - Portuguese translation for the site & doc</li>
|
||||
<li>Robert Jakabosky - for porting his excellent emergency garbage collector patch to <b>eLua</b></li>
|
||||
<li>Fréderic Thomas - Site hosting, LM3S enhancements</li>
|
||||
<li>James Snyder - ADC, CAN, LuaRPC (<a href="http://q12.org/lua/index.html">originaly by Russell Smith</a>), testing</li>
|
||||
<li>Jesus Alvarez - Initial SD/MMC card support</li>
|
||||
<li>James Snyder - ADC, CAN, LuaRPC (<a href="http://q12.org/lua/index.html">originaly by Russell Smith</a>), sd/mmc, doc/site menu CSS, testing, planning, ...</li>
|
||||
<li>Mike Panetta - STM32 port</li>
|
||||
<li>Pedro Bittencourt - RIT OLED, <a href="http://code.google.com/p/vhews/">VHeHS</a>, testing...</li>
|
||||
<li>Pedro Bittencourt - RIT OLED display support, testing ...</li>
|
||||
<li>Raul Nunes - The fundamental support from <a href="http://www.puc-rio.br">PUC-Rio</a>.</li>
|
||||
<li>Roberto Ierusalimschy, Luiz Henrique Figueiredo, Waldemar Celles - for
|
||||
<a href="http://www.lua.org">Lua</a> (!!! :)</li>
|
||||
<li>Téo Benjamin, Ives Cunha, Rafael Barmak - Pong, TetrIves, SpaceShip
|
||||
games and <a href="http://www.giga.puc-rio.br/site/embedded/manfredo">Manfredo</a>, a GPS guided robot, powered by eLua.</li>
|
||||
<li>The whole community of users on our eLua list at <a
|
||||
href="https://lists.berlios.de/mailman/listinfo/elua-dev">https://lists.berlios.de/mailman/listinfo/elua-dev</a></li>
|
||||
<li>Roberto Ierusalimschy, Luiz Henrique Figueiredo, Waldemar Celles - for <a href="http://www.lua.org">Lua</a> :)</li>
|
||||
<li>Téo Benjamin, Ives Cunha, Rafael Barmak - Pong, TetrIves, SpaceShip games and <a href="http://www.giga.puc-rio.br/site/embedded/manfredo">Manfredo</a>, a GPS guided robot, powered by eLua.</li>
|
||||
<li>The whole community of users on our eLua list at <a href="https://lists.berlios.de/mailman/listinfo/elua-dev">https://lists.berlios.de/mailman/listinfo/elua-dev</a></li>
|
||||
</ul>
|
||||
... and the constant help and support from:<br />
|
||||
|
||||
Alberto Fabiano, André Carregal, Ângelo Santos, Asko Kauppi, Cosmin Filip,
|
||||
Dean Hall, Diego Sueiro, Fabio Pereira, Giovani Balduino, Jesus Alvarez, John Hind, Luiz de Barros, Marcelo Tíio, Marco Meggiolaro,
|
||||
Ricardo L. Rosa, Robert Jakabosky, Yuri Takhteyev ....
|
||||
...
|
||||
Alberto Fabiano, André Carregal, Ângelo Santos, Asko Kauppi, Carlos Eduardo Deodoro,
|
||||
Cosmin Filip, Dean Hall, Diego Sueiro, Eduardo von Ristow, Fabio Pereira,
|
||||
Giovani Balduino, Guilherme Sanchez Pacheco, John Hind, Luiz de Barros, Marcelo
|
||||
Tílio, Marco Meggiolaro, Ralph Hempel, Vagner Nascimento, Yuri Takhteyev, ....
|
||||
</a>
|
||||
|
||||
$$FOOTER$$
|
||||
|
@ -1,6 +1,110 @@
|
||||
$$HEADER$$
|
||||
<h3>Downloading eLua Old Versions</h3>
|
||||
<p>The tables below have links to the previous official versions of <b>eLua</b> (both source code and binaries).</p>
|
||||
<a name="v060" /><h2>0.6</h2>
|
||||
<table class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>MCU</th>
|
||||
<th>Board</th>
|
||||
<th>Lua number type</th>
|
||||
<th>Image file</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>All (source code)</td>
|
||||
<td>All (source code)</td>
|
||||
<td>All (source code)</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6.tgz">elua0.6.tgz</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=3755">AT91SAM7X256</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/sam7-ex256.html">SAM7-EX256</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at91sam7x256.bin">elua0.6_lua_at91sam7x256.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=4104">AT91SAM7X512</a></td>
|
||||
<td>None</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at91sam7x512.bin">elua0.6_lua_at91sam7x512.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.intel.com">i386 (generic)</a></td>
|
||||
<td>PCs/emulators</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_i386.elf">elua0.6_lua_i386.elf</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965.html">LM3S6965</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965_ethernet_evaluation_kit.html">EKx-LM3S6965</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s6965.bin">elua0.6_lua_lm3s6965.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/LM3S8962.html">LM3S8962</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s8962_can_ethernet_evaluation_kit.html">EKx-LM3S8962</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s8962.bin">elua0.6_lua_lm3s8962.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.standardics.nxp.com/microcontrollers/to/pip/LPC2880FET180.html">LPC2888</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/lpc-h2888.html">LPC-H2888</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lpc2888.bin">elua0.6_lua_lpc2888.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR711FR2.html">STR711FR2</a></td>
|
||||
<td><a href="http://www.sctec.com.br/content/view/101/30/">MOD711</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_str711fr2.bin">elua0.6_lua_str711fr2.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td><a href="http://www.hitex.com/index.php?id=383">STR9-comStick</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_str912fw44.bin">elua0.6_lua_str912fw44.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/LM3S6918.html">LM3S6918</a></td>
|
||||
<td><a href="http://www.micromint.com/index.php/SBC/eagle-100.html">Micromint Eagle 100</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s6918.bin">elua0.6_lua_lm3s918.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=4117">AT32UC3A0512</a></td>
|
||||
<td><a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=4114">ATEVK1100</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at32uc3a0512.hex">elua0.6_lua_at32uc3a0512.hex</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103RE-110.html">STM32F103RE</a></td>
|
||||
<td><a href="http://www.futurlec.com/ET-STM32_Stamp.shtml">ET-STM32 Stamp</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_stm32f103re.bin">elua0.6_lua_stm32f103re.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103ZE-110.html">STM32F103ZE</a></td>
|
||||
<td><a href="http://www.st.com/mcu/contentid-100-110-STM3210E_EVAL.html">STM3210E-EVAL</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_stm32f103ze.bin">elua0.6_lua_stm32f103ze.bin</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a name="v050" /><h2>0.5</h2>
|
||||
<table class="table_center">
|
||||
<tbody>
|
||||
|
@ -2,7 +2,7 @@ $$HEADER$$
|
||||
<h3>Downloading eLua</h3>
|
||||
<p>You have a few options for downloading <b>eLua</b>:</p>
|
||||
<ul>
|
||||
<li>download a binary <b>eLua</b> image for your platform of choice. Binary images are provided with each official release
|
||||
<li>download a binary <b>eLua</b> image for the platform of your choice. Binary images are provided with each official release
|
||||
and also for some specific applications (ie: games). This is generally the best option if you have a bord that's officially
|
||||
supported by <b>eLua</b> (see <a href="status.html">here</a> for details) and you want to have <b>eLua</b> up and running on your board as quickly as possible.</li>
|
||||
<li>download the source code to build <b>eLua</b> yourself. You can either download the source code of an official release or get the "bleeding edge" version from the SVN repository. Download the source code instead of a
|
||||
@ -10,16 +10,26 @@ $$HEADER$$
|
||||
happens behind the <i>eLua# </i> prompt :)</li>
|
||||
</ul>
|
||||
<a name="binaries" /><h3>Binary images</h3>
|
||||
<p>Pre-built images of <b>eLua</b> can be downloaded for each official release. Only the latest official <b>eLua</b> release is covered in this paragraph; if you want to download a pre-built
|
||||
image from an older release (although this isn't generally advisable), check <a href="dl_old.html">this page</a>. Choose the corresponding image file from the table below, flash it into your
|
||||
board, connect a serial terminal (or Ethernet if you board supports) and enjoy <b>eLua</b>. Also note that <b>eLua binaries</b>, like the <a href="#source">source code distribution</a>,
|
||||
include some example programs in it's file system, so you can run and play them (yes! we have games too! :), following the instructions in our <a href="using.html">Using eLua</a> page. The
|
||||
available example programs are described in our <a href="examples.html">examples page</a>.</p>
|
||||
<p>If you need a customized binary image for an already supported platform (for example with an autorun program, with some code of yours in the file system, with your LAN IP settings) and the
|
||||
<a href="building.html">instructions for building eLua</a> didn't work for you, feel free to <a href="overview.html#contacts">write us</a> explaining what you need. We may find some time to
|
||||
build one for you and eventually make it available here too.</p>
|
||||
<p>To understand what's in a file name (for example <i>elua_lualong_lm3s8962.bin</i>) check our <a href="building.html">building eLua</a> page.</p>
|
||||
<!-- [NEWVER] -->
|
||||
<p>Pre-built images of <b>eLua</b> can be downloaded for each official release. Only the latest official <b>eLua</b> release is covered in this
|
||||
paragraph. If you want to download a pre-built image from an older release (although this isn't generally advisable), check <a href="dl_old.html">this page</a>.
|
||||
</p>
|
||||
<p>Choose the corresponding image file from the table below, flash it into your
|
||||
board, connect a serial terminal (or Ethernet if you board supports) and enjoy <b>eLua</b>.
|
||||
Please also note that <b>eLua binaries</b>, like the <a href="#source">source code distribution</a>,
|
||||
include some example programs in it's file system, so you can run and play (yes! we have games too! :) them , following the instructions in our <a href="using.html">Using eLua</a> page.
|
||||
The available example programs are described in our <a href="examples.html">examples page</a>.
|
||||
</p>
|
||||
<p>
|
||||
If you need a customized binary image for an already supported platform (for example with an autorun program, with some code of yours in the file system, with your LAN IP settings) and the
|
||||
<a href="building.html">instructions for building eLua</a> didn't work for you, feel free to
|
||||
ask for one in <a href="https://lists.berlios.de/mailman/listinfo/elua-dev">our discussion
|
||||
list</a> explaining what you need. We may find some time to
|
||||
build one for you and eventually make it available here too.
|
||||
</p>
|
||||
<h2>Official Latest Release Binaries</h2>
|
||||
<p>
|
||||
To understand what's in a file name (for example <i>elua_lualong_lm3s8962.bin</i>) check our <a href="building.html">building eLua</a> page.
|
||||
</p>
|
||||
<table class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -30,92 +40,110 @@ build one for you and eventually make it available here too.</p>
|
||||
<th>Image file</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=3755">AT91SAM7X256</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/sam7-ex256.html">SAM7-EX256</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at91sam7x256.bin">elua0.6_lua_at91sam7x256.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=4104">AT91SAM7X512</a></td>
|
||||
<td>None</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at91sam7x512.bin">elua0.6_lua_at91sam7x512.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.intel.com">i386 (generic)</a></td>
|
||||
<td>PCs/emulators</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_i386.elf">elua0.6_lua_i386.elf</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965.html">LM3S6965</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965_ethernet_evaluation_kit.html">EKx-LM3S6965</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s6965.bin">elua0.6_lua_lm3s6965.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/LM3S8962.html">LM3S8962</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s8962_can_ethernet_evaluation_kit.html">EKx-LM3S8962</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s8962_can_ethernet_evaluation_kit.html">EK-LM3S8962</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s8962.bin">elua0.6_lua_lm3s8962.bin</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_lm3s8962.bin">elua0.7_lua_lm3s8962.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.standardics.nxp.com/microcontrollers/to/pip/LPC2880FET180.html">LPC2888</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/lpc-h2888.html">LPC-H2888</a></td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965.html">LM3S6965</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965_ethernet_evaluation_kit.html">EK-LM3S6965</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lpc2888.bin">elua0.6_lua_lpc2888.bin</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_lm3s6965.bin">elua0.7_lua_lm3s6965.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR711FR2.html">STR711FR2</a></td>
|
||||
<td><a href="http://www.sctec.com.br/content/view/101/30/">MOD711</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_str711fr2.bin">elua0.6_lua_str711fr2.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td><a href="http://www.hitex.com/index.php?id=383">STR9-comStick</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_str912fw44.bin">elua0.6_lua_str912fw44.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/LM3S6918.html">LM3S6918</a></td>
|
||||
<td><a href="http://www.micromint.com/index.php/SBC/eagle-100.html">Micromint Eagle 100</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_lm3s6918.bin">elua0.6_lua_lm3s918.bin</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_lm3s6918.bin">elua0.7_lua_lm3s918.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s9b92.html">LM3S9B92</a></td>
|
||||
<td><a href="http://www.luminarymicro.com/products/ek-lm3s9b92.html">EK-LM3S9B92</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_lm3s9b92.bin">elua0.7_lua_lm3s9b92.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=3755">AT91SAM7X256</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/sam7-ex256.html">SAM7-EX256</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_at91sam7x256.bin">elua0.7_lua_at91sam7x256.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=4104">AT91SAM7X512</a></td>
|
||||
<td>None</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_at91sam7x512.bin">elua0.7_lua_at91sam7x512.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=4117">AT32UC3A0512</a></td>
|
||||
<td><a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=4114">ATEVK1100</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_at32uc3a0512.hex">elua0.6_lua_at32uc3a0512.hex</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_at32uc3a0512.hex">elua0.7_lua_at32uc3a0512.hex</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.standardics.nxp.com/microcontrollers/to/pip/LPC2880FET180.html">LPC2888</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/lpc-h2888.html">LPC-H2888</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_lpc2888.bin">elua0.7_lua_lpc2888.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.nxp.com/#/pip/pip=[pip=LPC2468_4]|pp=[t=pip,i=LPC2468_4]">LPC2468</a></td>
|
||||
<td><a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">PUC-Rio eLua board</a></td>
|
||||
<td>double</td>
|
||||
<td><a
|
||||
href="http://prdownload.berlios.de/elua/elua0.7_lua_lpc2468.hex">elua0.7_lua_lpc2468.hex</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR711FR2.html">STR711FR2</a></td>
|
||||
<td><a href="http://www.sctec.com.br/content/view/101/30/">MOD711</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_str711fr2.bin">elua0.7_lua_str711fr2.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td><a href="http://www.olimex.com/dev/str-e912.html">STR-E912</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_str912faw44.bin">elua0.7_lua_str912faw44.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103RE-110.html">STM32F103RE</a></td>
|
||||
<td><a href="http://www.futurlec.com/ET-STM32_Stamp.shtml">ET-STM32 Stamp</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_stm32f103re.bin">elua0.6_lua_stm32f103re.bin</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_stm32f103re.bin">elua0.7_lua_stm32f103re.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103ZE-110.html">STM32F103ZE</a></td>
|
||||
<td><a href="http://www.st.com/mcu/contentid-100-110-STM3210E_EVAL.html">STM3210E-EVAL</a></td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6_lua_stm32f103ze.bin">elua0.6_lua_stm32f103ze.bin</a></td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_stm32f103ze.bin">elua0.7_lua_stm32f103ze.bin</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://www.intel.com">i386 (generic)</a></td>
|
||||
<td>PCs/emulators</td>
|
||||
<td>double</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7_lua_i386.elf">elua0.7_lua_i386.elf</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><b>NOTE:</b> <i>Lua number type</i> refers to the built Lua interpreter number type, float or integer, as explained in the <a href="building.html">building eLua</a> page.</p>
|
||||
<p>
|
||||
<b>NOTE:</b> <i>Lua number type</i> refers to the built Lua interpreter number type, float or integer, as explained in the <a href="building.html">building eLua</a> page.
|
||||
</p>
|
||||
<p/>
|
||||
<a name="source" /><h3>Source code</h3>
|
||||
<p>If all you want is to take a quick peek at <b>eLua</b>'s source code, but you don't need to download it, it's probably enough to use the
|
||||
<a href="http://svn.berlios.de/wsvn/elua">BerliOS WebSVN interface</a>. You can browse through the complete source of <b>eLua</b> using this method.<br />
|
||||
@ -136,8 +164,8 @@ code of an older version, check out <a href="dl_old.html">this page.</p>
|
||||
<th>Source code archive</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.6</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.6.tgz">eLua 0.6</a></td>
|
||||
<td>0.7</td>
|
||||
<td><a href="http://prdownload.berlios.de/elua/elua0.7.tgz">eLua 0.7</a></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<a name="svnpublic" /><h2>SVN public repository (anonymous read-only mode)</h2>
|
||||
|
38
doc/en/elua_egc.html
Normal file
@ -0,0 +1,38 @@
|
||||
$$HEADER$$
|
||||
<h3>Using the EGC patch with eLua</h3>
|
||||
<p>The EGC (Emergency Garbage Collector) patch was originally written for Lua by Robert Jakabosky, who was kind enough to port it to <b>eLua</b>. You can find the author's detailed
|
||||
description of the patch <a href="http://lua-users.org/wiki/EmergencyGarbageCollector">here</a>. In short, what it does is that it lets you run a garbage collection cycle in Lua in a low memory
|
||||
situation, from inside Lua's memory allocation function (something that the current version of Lua can't do out of the box). By forcing a garbage collection cycle, Lua can reclaim memory that's
|
||||
not in use anymore, thus making more memory available for your program. The downside is reduced execution speed, as a direct result of running the gargabe collector when needed. For some
|
||||
applications, reducing the execution speed to fit the application in memory might be acceptable, and for other applications it might not. As usual, it all depends on your application. As a generic
|
||||
guideline, if your application isn't concerned with realtime processing, you should be fine with sacrifing execution speed to get more memory in many real life scenarios.</p>
|
||||
<p>In <b>eLua</b>, the EGC patch can be configured to run in 4 different modes:</p>
|
||||
<ol>
|
||||
<li><b>disabled</b>: EGC inactive, no collection cycle will be forced in low memory situations.</li>
|
||||
<li><b>run on allocation failure</b>: try to allocate a new block of memory, and run the garbage collector if the allocation fails. If the allocation fails even after running the garbage
|
||||
collector, the allocator will return with error. </li>
|
||||
<li><b>run on memory limit</b>: run the garbage collector when the memory used by the Lua script goes beyond an upper limit. If the upper limit can't be satisfied even after running
|
||||
the garbage collector, the allocator will return with error.</li>
|
||||
<li><b>run before each allocation</b>: run the garbage collector before each memory allocation. If the allocation fails even after running the garbage collector, the allocator will
|
||||
return with error. This mode is very efficient with regards to memory savings, but it's also the slowest.</li>
|
||||
</ol>
|
||||
<p><b>eLua</b> lets you use any of the above modes, or combine modes 2-4 above as needed. The C code API for EGC interfacing is defined in <i>src/lua/legc.h</i>, shown partially below:</p>
|
||||
<p><pre><code>// EGC operations modes
|
||||
#define EGC_NOT_ACTIVE 0 // EGC disabled
|
||||
#define EGC_ON_ALLOC_FAILURE 1 // run EGC on allocation failure
|
||||
#define EGC_ON_MEM_LIMIT 2 // run EGC when an upper memory limit is hit
|
||||
#define EGC_ALWAYS 4 // always run EGC before an allocation
|
||||
|
||||
void legc_set_mode(lua_State *L, int mode, unsigned limit);</code></pre></p>
|
||||
<p>To set the EGC operation mode, call <i>legc_set_mode</i> above with 3 parameters:</p>
|
||||
<ul>
|
||||
<li><b>L</b>: a pointer to a Lua state structure.</li>
|
||||
<li><b>mode</b>: EGC operation mode, as described by the <b>#define</b> section above. You can specifiy a single mode, or a bitwise OR combination between <b>EGC_ON_ALLOC_FAILURE</b>,
|
||||
<b>EGC_ON_MEM_LIMIT</b> and <b>EGC_ALWAYS</b>.</li>
|
||||
<li><b>memlimit</b>: the upper memory limit used by the <b>EGC_ON_MEM_LIMIT</b> mode. Must be higher than 0 for this mode to run properly, can be 0 for any other mode.</li>
|
||||
</ul>
|
||||
|
||||
<p>The functionality of this C function is mirrored by the <b>elua</b> generic module <b>egc_setup</b> function, see <a href="refman_gen_elua.html#elua.egc_setup">here</a> for more details.
|
||||
Also, see <a href="building.html#static">here</a> for details on how to configure the default (compile time) EGC behaviour.</p>
|
||||
$$FOOTER$$
|
||||
|
141
doc/en/faq.html
@ -1,74 +1,83 @@
|
||||
$$HEADER$$
|
||||
<h3>eLua Frequently Asked Questions</h3><p>Welcome to the official <b>eLua</b>
|
||||
FAQ!<br />
|
||||
It is assumed that you already know what <b>eLua</b> is, so here's a list of questions (and their answers) that you might find useful.</p>
|
||||
It is assumed that you already know <a href="overview.html#whatis">what <b>eLua</b>
|
||||
is</a>, so here's a list of questions (and their answers) that you might find useful.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#minimum">What are the minimum requirements for eLua?</a></li>
|
||||
<li><a href="#learnlua">How can I learn Lua? Is it hard?</a></li>
|
||||
<li><a href="#helpelua">How can I help eLua?</a></li>
|
||||
<li><a href="#comercial">Can I use eLua in my commercial, closed source project?</a></li>
|
||||
<li><a href="#comercial">Can I use eLua in my comercial, closed source project?</a></li>
|
||||
<li><a href="#fast">Is eLua fast enough?</a></li>
|
||||
<li><a href="#minimum">What are the minimum requirements for eLua?</a></li>
|
||||
<li><a href="#portability">Since I'm using the Lua platform modules (uart, spi, pwm, tmr...), can I trust my peripheral code to run the
|
||||
same on all my platforms?</a></li>
|
||||
<li><a href="#luaversions">What's the deal with floating-point Lua and integer only Lua?</a></li>
|
||||
<li><a href="#windows">All your tutorials give instructions on how to compile eLua under Linux, yet you seem to use a lot of Windows tools.
|
||||
How come?</a></li>
|
||||
<li><a href="#portability">Since I'm using the <b>eLua</b> generic platform modules (uart, spi, pwm, tmr...), can I trust my peripheral code to run the same on all my platforms?</a></li>
|
||||
<li><a href="#luaversions">What's the deal with floating-point Lua and
|
||||
integer-only Lua?</a></li>
|
||||
<li><a href="#wincomp">Is it possible to compile eLua under Windows?</a></li>
|
||||
<li><a href="#windows">All your tutorials give instructions on how to compile eLua under Linux, yet you seem to use a lot of Windows tools. How come?</a></li>
|
||||
<li><a href="#cygwin">Will you ever post instructions about how to compile toolchains under Cygwin in Windows?</a></li>
|
||||
<li><a href="#bytecode">I know that Lua can be compiled to bytecode, so I compiled one of the eLua examples with luac and tried to run it on
|
||||
my eLua board, but it didn't work. Is this a bug in eLua?</a></li>
|
||||
<li><a href="#bytecode">I know that Lua can be compiled to bytecode, so I compiled one of the eLua examples with luac and tried to run it on my eLua board, but it didn't work. Is this a bug in eLua?</a></li>
|
||||
<li><a href="#outofmemory">I get "out of memory" errors when I run my Lua programs, what should I do?</a></li>
|
||||
<li><a href="#rotables">I enabled the LTR patch, but now all my module tables (math, io, string, spi and so on) are read only. Do I have to
|
||||
disable LTR if I want write access to these modules?</a></li>
|
||||
<li><a href="#rotables">I enabled the LTR patch, but now all my module tables (math, io, string, spi and so on) are read only. Do I have to disable LTR if I want write access to these modules?</a></li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="minimum" /><h2>What are the minimum requirements for eLua?</h2>
|
||||
<p>It's hard to give a precise answer to this, because this is not only
|
||||
dependable on the footprint of <b>eLua</b> or it's resource requirements but
|
||||
on the final user applications as well. As a general rule, for
|
||||
a 32-bit CPU, we recommend at least 256k of Flash and
|
||||
at least 64k of RAM. However, this isn't a strict requirement. A
|
||||
stripped down, integer-only version of eLua can definitely fit in 128k
|
||||
of Flash and depending on your type of application, 32k of RAM might
|
||||
prove just fine. We have built <b>eLua</b> for targets with less than 10K
|
||||
RAM but you can't do much than blinking an LED with them. It really largely depends on your needs.</p>
|
||||
|
||||
<a name="learnlua" /><h2>How can I learn Lua? Is it hard?</h2>
|
||||
<p>Lua is a minimalistic language (yet very powerful) which is quite easy to learn. Once you understand the basic concepts you'll find yourself writing
|
||||
<p>Lua is a minimalistic language (yet incredibly powerful!) which is quite easy to learn.
|
||||
Once you understand the basic concepts you'll find yourself writing
|
||||
Lua programs in notime. The main resource is the <a href="http://www.lua.org/">Lua homepage</a>. In the
|
||||
<a href="http://www.lua.org/docs.html">documentation page</a> you'll find the reference manual and the first version of the excellent
|
||||
"Programming in Lua" book. I recommend purchasing the second version of this book, since it's likely that this is all you'll ever need to learn
|
||||
"Programming in Lua" book. We recommend purchasing the second version of this book, since it's likely that this is all you'll ever need to learn
|
||||
Lua. Another very good resource is the <a href="http://lua-users.org/wiki/">Lua wiki</a>. If you need more help, check the
|
||||
<a href="http://www.lua.org/community.html">community page</a>. Lua has a very friendly and active community.</p>
|
||||
<a href="http://www.lua.org/community.html">community page</a>. Lua has a very friendly and active community.
|
||||
Most of all, Lua is FUN to learn and use :)</p>
|
||||
|
||||
<a name="helpelua" /><h2>How can I help eLua?</h2>
|
||||
<p><b>eLua</b> has many ambitious goals, so it would be great to have more people working on it. Take a look at the
|
||||
<a href="status.html#roadmap">roadmap page</a>, and if you see something there that you'd like to work on, don't hesitate to
|
||||
<a href="status.html#roadmap">roadmap page</a> and if you see something there that you'd like to work on, don't hesitate to
|
||||
<a href="overview.html#contacts">contact us</a>. Also, if you'd like to make a donation to the project (money, or maybe a development board)
|
||||
rest assured that wwe won't say no :) It also helps a lot if you test <b>eLua</b> on your own board and you find a bug or an
|
||||
incomplete feature. Or if you just thought about a cool feature that you'd like to see in <b>eLua</b>.
|
||||
If so, feel free to <a href="overview.html#contacts">contact us</a>.</p>
|
||||
|
||||
<a name="comercial" /><h2>Can I use eLua in my commercial, closed source project?</h2>
|
||||
<p>Starting with version 0.6, <b>eLua</b> is distributed under a MIT license, so you can use it in your close source projects. Prior to this it was
|
||||
distributed under GPL, which restricted its usage to open source applications. Be careful though, <b>eLua</b> includes some
|
||||
<a name="comercial" /><h2>Can I use eLua in my comercial, closed source project?</h2>
|
||||
<p>Starting with version 0.6, <b>eLua</b> is distributed under a MIT license, so you can use it in your closed source projects. Prior to
|
||||
this, it was
|
||||
distributed under GPL, which restricted its usage to open source applications. Be careful though,
|
||||
because <b>eLua</b> includes some
|
||||
(few) 3rd party libraries,
|
||||
each with its own licensing terms that might be more restrictive than MIT. See <a href="overview.html#license">the eLua license</a> for details.</p>
|
||||
|
||||
<a name="fast" /><h2>Is eLua fast enough?</h2>
|
||||
<p>This pretty much depends on what you expect. If you expect your Lua code to run as fast as your compiled C code, this won't happen, simply because C
|
||||
is a compiled language, while Lua is an interpreted language. That said, you'll be happy to know that Lua is one of the fastest interpreted languages
|
||||
out there. If you really need both high speed and Lua, you can (very
|
||||
easily in eLua) write your speed critical code sections in C and export them as a Lua module.
|
||||
out there and also compiles it's programs to bytecodes for it's own
|
||||
virtual machine to execute. If you really need both high speed and Lua, you can (very
|
||||
easily in <b>eLua</b>) write your speed critical code sections in C and export them as a Lua module.
|
||||
This way you get the best of both worlds.<br />
|
||||
We don't have any official benchmarks about Lua speed on embedded devices, but you might want to check the
|
||||
TV-B-Gone example on the <a href="examples.html">examples page</a>.TV-B-Gone is a "software remote control" application coded directly in <b>eLua</b>.
|
||||
If you're familiar with the remote control protocols, you'll know that this kind of application is quite "real time", and delays in the order of
|
||||
milliseconds or even less can make your software remote control fail. Yet this sample runs without problems on a 50MHz Cortex (Thumb2) CPU. This should
|
||||
give you a fairly intuitive view on the speed of eLua.</p>
|
||||
We don't have any official benchmarks about Lua speed on embedded devices but you might want to check the TV-B-Gone example on the <a href="examples.html">examples page</a>. TV-B-Gone is a "software remote control" application coded directly in <b>eLua</b>.
|
||||
If you're familiar with the remote control protocols, you'll know that this kind of application is quite "real time" and delays in the order of
|
||||
milliseconds or even less can make your software remote control fail. Yet this sample runs without problems on a 50MHz
|
||||
Cortex-M3 in Thumb2 mode CPU. This should
|
||||
give you a fairly intuitive view on the speed of <b>eLua</b>. Of course,
|
||||
the project benefits from the incredible speed and performance of Lua.</p>
|
||||
|
||||
<a name="minimum" /><h2>What are the minimum requirements for eLua?</h2>
|
||||
<p>It's hard to give a precise answer to this. As a general rule for
|
||||
a 32-bit CPU, we recommend at least 256k of Flash (program memory) and
|
||||
at least 64k of RAM. However, this isn't a strict requirement. A
|
||||
stripped down, integer-only version of eLua can definitely fit in 128k
|
||||
of Flash, and depending on your type of application, 32k of RAM might
|
||||
prove just fine. It largely depends on your needs.</p>
|
||||
|
||||
<a name="portability" /><h2>Since I'm using the Lua platform modules (uart, spi, pwm, tmr...), can I trust my peripheral code to run the same on all my
|
||||
<a name="portability" /><h2>Since I'm using the eLua generic platform modules (uart, spi, pwm, tmr...), can I trust my peripheral code to run the same on all my
|
||||
platforms?</h2>
|
||||
<p>Unfortunately, no. While <b>eLua</b> makes it possible to have a common code on different platforms using the <a href="arch_platform.html">platform interface</a>,
|
||||
<p>Unfortunately, no. While <b>eLua</b> brings an unprecedent level of
|
||||
source code portability to the embedded world and makes it possible to have a common code on different platforms using the <a href="arch_platform.html">platform interface</a>,
|
||||
it can't possibly provide the same functionality on all platforms, since all MCUs are not created equal. It is very recommended
|
||||
(and many times imperative) to have an understanding of the peripherals on your particular MPU before you start writing your code.
|
||||
This, of course, is not particular to <b>eLua</b>, but it's especially important since the platform interface might give the impression that it
|
||||
@ -78,33 +87,43 @@ prove just fine. It largely depends on your needs.</p>
|
||||
would increase the code size and complexity too much. These are some caveats that come to mind (note that these are only a few examples, the complete
|
||||
list is much longer):</p>
|
||||
<ul>
|
||||
<li><b>timers</b>: from all the platforms on which <b>eLua</b> runs, only the Luminary Cortex CPUs has rock solid 32-bit timers. You can do pretty much
|
||||
everything you need with them. All the other platforms have 16-bit timers, which imposes some limits on the range of delays you can achieve with them.
|
||||
Make sure to use tmr.mindelay(id) and tmr.maxdelay(id) to check the actual resolution of your timers, and adapt your code accordingly. To 'compensate'
|
||||
<li><b>Timers</b>: some CPUs, like the Luminary Cortex CPUs, have rock solid 32-bit timers. You can do pretty much
|
||||
everything you need with them. Most platforms have only 16-bit timers though, which imposes some limits on the range of delays you can achieve with them.
|
||||
Make sure to use <a
|
||||
href="en_refman_gen_tmr.html#tmr.getmindelay">tmr.getmindelay(id)</a> and <a
|
||||
href="en_refman_gen_tmr.html#tmr.getmindelay">tmr.getmaxdelay(id)</a> to check the actual resolution of your timers and adapt your code accordingly. To 'compensate'
|
||||
for this, it's not possible to change the base timer frequency on the Cortex CPUs, but it is possible on most other platforms :) So be sure to also check
|
||||
the result of tmr.setclock(id)</li>
|
||||
<li>also, when using timers, remember that if you're using XMODEM and/or the "term" module, one of them (generall TMR0) is used by both of them. So, if
|
||||
you change the TMR0 base clock in your code, be sure to restore the original setting before returning to the <b>eLua</b> shell.</li>
|
||||
<li><b>PWM</b>: the Cortex CPUs have 6 PWM channels, but channels 0/1, 2/3 and 4/5 respectively share the same base clock setting. So, when you're
|
||||
the result of <a
|
||||
href="en_refman_gen_tmr.html#tmr.setclock">tmr.setclock(id)</a>.
|
||||
Important: when using timers, remember that if you're using XMODEM and/or the "term" module, one of them (generall TMR0) is
|
||||
also used by both of them. So, if
|
||||
you change the TMR0 base clock in your code, be sure to restore the original setting before returning to the <b>eLua</b>
|
||||
shell.</li>
|
||||
<li><b>PWM</b>: the Cortex-M3 CPUs have 6 PWM channels, but channels 0/1, 2/3 and 4/5 respectively share the same base clock setting. So, when you're
|
||||
changing the base clock for channel 1, you're also changing the base clock for channel 0; if channel 0 was already running, you won't like
|
||||
what will happen next. This time no eLua function can save you, you simply need you know your CPU architecture.</li>
|
||||
<li><b>GPIO</b>: only some platform have internal pullups for the GPIO pins (others might also have pulldowns). However, in this case you're safe, as
|
||||
<b>eLua</b> will signal an error if you try to execute a pull-up operation on a platform that does not support it.</li>
|
||||
what will happen next. This time no <b>eLua</b> function can save you. You simply need you know your CPU architecture.</li>
|
||||
<li><b>GPIO</b>: only some platforms have internal pullups for the GPIO pins (others might also have pulldowns). However, in this case you're safe, as
|
||||
<b>eLua</b> will signal an error if you try to execute a pull-up/dn operation on a platform that does not support it.</li>
|
||||
</ul>
|
||||
<p>The lesson here is clear: understand your platform first!</p>
|
||||
|
||||
<a name="luaversions" /><h2>What's the deal with floating-point Lua and integer only Lua?</h2>
|
||||
<p>Lua is build around a number type. Every number in Lua will have this type. By default, this number type is a double. This means that even if your
|
||||
program only does integer operations, they will still be treated as doubles. On embedded platforms this is a problem, since the floating point
|
||||
operations are generally emulated in software, thus they are very slow. This is why <b>eLua</b> gives you "integer only Lua": a Lua with the default
|
||||
number type changed to long. The advantages are increased speed and smaller code size (since we can force Newlib to "cut" the floating point code from
|
||||
<a name="luaversions" /><h2>What's the deal with floating-point Lua and integer-only Lua?</h2>
|
||||
<p>Lua is built around a number type. Every number in Lua will have this type. By default, this number type is a double. This means that even if your
|
||||
program only does integer operations, they will still be treated as
|
||||
floating-point doubles. On embedded platforms this can be a problem, since the floating point
|
||||
operations are generally emulated in software and this can be slow. This is why <b>eLua</b> gives you
|
||||
the choice of "integer only Lua": a Lua with the default
|
||||
number type changed to long integer. The advantages are increased speed and smaller code size (since we can force Newlib to "cut" the floating point code from
|
||||
printf/scanf and friends, which has quite a strong impact on the code size) and increased speed. The downside is that you'll loose the ability to do
|
||||
any floating point operations (although a separate module that will partially overcome this limitation will be provided in the future).</p>
|
||||
|
||||
<a name ="wincomp /"><h2>Is it possible to compile eLua under Windows?</h2>
|
||||
<p>Starting with version 0.7, compiling <b>eLua</b> under Windows is officialy supported, check <a href="building_win.html">here</a> for details.</p>
|
||||
|
||||
<a name="windows" /><h2>All your tutorials give instructions on how to compile eLua under Linux, yet you seem to use a lot of Windows tools. How come?</h2>
|
||||
<p>It's true that we do all the <b>eLua</b> development under Linux, since we find Linux an environment much more suited for development. At the same
|
||||
time it's true that most of the tools that come with my development boards run under Windows. So we choose to use the best of both world: Bogdan runs
|
||||
Linux under a <a href="http://www.virtualbox.org">VirtualBox</a> emulator, and does everything else under Windows. Dado does everything on
|
||||
Linux under a <a href="http://www.virtualbox.org">VirtualBox</a> emulator and does everything else under Windows. Dado does everything on
|
||||
Linux and runs Windows under <a href="http://www.vmware.com">VMWare</a>. Both options are nice if you master your environment. To make
|
||||
everything even more flexible, Bogdan keeps his VirtualBox Ubuntu image on an external WD passport disk that he can carry with him wherever he goes,
|
||||
so he can work on eLua whenever he has a bit of spare time :)</p>
|
||||
@ -112,26 +131,34 @@ prove just fine. It largely depends on your needs.</p>
|
||||
<a name="cygwin" /><h2>Will you ever post instructions about how to compile toolchains under Cygwin in Windows?</h2>
|
||||
<p>Bogdan: If I ever have way too much spare time on my hands, yes. Otherwise, no. There are many reasons for this. As I already mentioned, I favour Linux
|
||||
over Windows when it comes to developing applications. Also, I noticed that the GNU based toolchains are noticeable slower on Cygwin than on Linux, so
|
||||
experimenting with them can prove frustrating. Also, compiling under Linux and Cygwin should be quite similar,so try starting from my Linux based
|
||||
experimenting with them can prove frustrating. Also, compiling under Linux and Cygwin should be quite similar, so try starting from my Linux based
|
||||
tutorials, they might work as well on Cygwin.</p>
|
||||
|
||||
|
||||
<a name="bytecode" /><h2>I know that Lua can be compiled to bytecode, so I compiled one of the eLua examples with luac and tried to run it on my eLua
|
||||
board, but it didn't work. Is this a bug in eLua?</h2>
|
||||
<p>This is not a bug in <b>eLua</b>, it's a bit more subtle than that. See <a href="using.html#cross">the cross-compile section</a> for a full discussion
|
||||
about this problem and its fix.</p>
|
||||
about this problem and the right way to do it. Starting with v0.7, it is also possible to automatically build your ROM
|
||||
file system with only compiled (bytecode) code. See <a
|
||||
href="en_arch_romfs.html#mode">here</a> for details.</p>
|
||||
|
||||
<a name="outofmemory" /><h2>I get "out of memory" errors when I run my Lua programs, what should I do?</h2>
|
||||
<p>There are a number of things you can try to overcome this:</p>
|
||||
<ul>
|
||||
<li><b>enable the LTR patch</b>: you can get very significant improvements if you enable the LTR patch in your <b>eLua</b> image. See
|
||||
<a href="arch_ltr.html">here</a> for more details about LTR, and <a href="building.html">here</a> for instructions about enabling LTR.</li>
|
||||
<li><b>precompile your source to bytecode</b>: if you use bytecode instead of source code Lua won't need to compile your source, so you save some RAM.</li>
|
||||
<a href="arch_ltr.html">here</a> for more details about LTR and <a href="building.html">here</a> for instructions about enabling LTR.
|
||||
The LTR patch is enabled by default for some target platforms.</li>
|
||||
<li><b>precompile your source to bytecode</b>: if you use bytecode instead of source code Lua won't need to compile your source, so you save some RAM.
|
||||
Starting with v0.7, it is also possible to automatically build your ROM
|
||||
file system with only compiled (bytecode) code. See <a
|
||||
href="en_arch_romfs.html#mode">here</a> for details.</li>
|
||||
<li><b>try to avoid using too many strings</b>: strings are immutable in Lua. That means that a statement like <i>s = s .. "\n"</i> (where s is a string)
|
||||
will create a new string each time it's called. If this happens a lot (for example in a loop), your memory will quickly run out because of all the
|
||||
strings. If you really need to do frequent string operations, put them in a table and then use
|
||||
<a href="http://www.lua.org/manual/5.1/manual.html#5.5">table.concat</a> to make a string from your table.</li>
|
||||
<li><b>control Lua's garbage collection manually</b>: if you're still running out of memory, try calling <i>collectgarbage('collect')</i> from your code,
|
||||
which will force a garbage collection and thus might free some memory.</li>
|
||||
<li><b>use the emergency garbage collector (EGC)</b>: starting with version 0.7, <b>eLua</b> integrates Robert Jakabosky's excellent Emergency Garbage Collector
|
||||
(EGC) patch. It can help a lot with low memory problems. See <a href="elua_egc.html">here</a> for details on how to use the EGC patch in <b>eLua</b>.</li>
|
||||
</ul>
|
||||
|
||||
<a name="rotables" /><h2>I enabled the LTR patch, but now all my module tables (math, io, string, spi and so on) are read only. Do I have to
|
||||
|
53
doc/en/fatfs.html
Normal file
@ -0,0 +1,53 @@
|
||||
$$HEADER$$
|
||||
<h3>The FAT file system</h3>
|
||||
<p>The FAT file system implementation in <b>eLua</b> uses Elm Chan's excellent FatFS package, available <a href="http://elm-chan.org/fsw/ff/00index_e.html">here</a>. It can handle FAT12, FAT16
|
||||
and FAT32 file systems in read/write mode, and it packs a lot of functionality in a low footprint. Like the ROM filesystem it is integrated with the C library, so similar POSIX file manipulation will work in addition to accessing the filesystem via the Lua <b>io</b> module. <b>eLua</b> adds a platform abstraction layer on top of FatFS which makes it very easy to
|
||||
port the FAT file system implementation between different <b>eLua</b> targets. Since most SD/MMC cards can be accessed using the very common SPI interface, and since <b>eLua</b> already provides
|
||||
a <a href="arch_platform_spi.html">SPI platform interface</a>, porting the FAT file system to an <b>eLua</b> board is a fairly simple process.</p>
|
||||
<p>To use the FAT file system on your <b>elua</b> board (that has the proper hardware to access SD/MMC cards), first make sure that there is a working implementation of the
|
||||
<a href="arch_platform_spi.html">eLua SPI platform interface</a> on your platform (as currently <b>eLua</b> can access SD/MMC cards only via SPI). Then you need to enable the FAT file system module (MMCFS)
|
||||
in your <b>eLua</b> binary image, as described on the <a href="building.html">building page</a>.</p>
|
||||
<h2>Using the FAT file system</h2>
|
||||
<p>To use the FAT filesystem with an SD or MMC card, first ensure that the card has been properly formatted as a FAT filesystem (many come preformatted with this file system).</p>
|
||||
<p>Next, ensure that you have connected the SD or MMC card using the pin configuration described in the table below. For more more information, see Elm Chan's page on <a href="http://elm-chan.org/docs/mmc/mmc_e.html">SD/MMC with SPI</a>.</p>
|
||||
<table class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>eLua PIN</th>
|
||||
<th>Static Config</th>
|
||||
<th>SD Card Pin</th>
|
||||
<th>MMC Card Pin</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CS</td>
|
||||
<td>MMCFS_CS_PORT,<br> MMCFS_CS_PIN</td>
|
||||
<td>DAT3/CS</td>
|
||||
<td>RES/CS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SPI DO</td>
|
||||
<td>MMCFS_SPI_NUM</td>
|
||||
<td>CMD/DI</td>
|
||||
<td>CMD/DI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SPI DI</td>
|
||||
<td>MMCFS_SPI_NUM</td>
|
||||
<td>DAT0/DO</td>
|
||||
<td>DAT0/DO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SPI SCLK</td>
|
||||
<td>MMCFS_SPI_NUM</td>
|
||||
<td>CLK</td>
|
||||
<td>CLK</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Once configured, connected, and <b>eLua</b> has started up, you are ready to work with the files on your card. To open a file on the SD/MMC card, all you need to do is to prefix its name with <i>/mmc/</i>, like this:</p>
|
||||
<p><pre><code># lua /mmc/info.lua </code></pre></p>
|
||||
<p>Similarly, if you wanted to access a text file <b>a.txt</b> from your card, you could use fopen like this:</p>
|
||||
<p><pre><code>f = fopen( "/mmc/a.txt", "rb" )</code></pre></p>
|
||||
$$FOOTER$$
|
||||
|
||||
|
10
doc/en/filesystems.html
Normal file
@ -0,0 +1,10 @@
|
||||
$$HEADER$$
|
||||
<h3>eLua file systems</h3>
|
||||
<p>You can compile and use more than one file system in <b>eLua</b>, as listed below:</p>
|
||||
<ul>
|
||||
<li><b>the ROM file system</b>: a very simple, very low footprint read-only file system that can be included in the <b>eLua</b> binary image. Check <a href="arch_romfs.html">here</a> for details.</li>
|
||||
<li><b>the FAT file system</b>: a read-write FAT filesystem implementation (platform independent) that can currently be used with SD/MMC memory cards. Check <a href="fatfs.html">here</a> for
|
||||
details. <b>(new in 0.7)</b></li>
|
||||
</ul>
|
||||
$$FOOTER$$
|
||||
|
55
doc/en/installing_lpc2468.html
Normal file
@ -0,0 +1,55 @@
|
||||
$$HEADER$$
|
||||
<h3>Installing <b>eLua</b> on the LPC2468 CPU from NXP</h3>
|
||||
<p>The <a href="http://ics.nxp.com/products/lpc2000/lpc24xx/">LPC2468 CPU</a> from <a href="http://www.nxp.com">NXP</a> is one of the CPUs on which <b>eLua</b> is very happy to run, because of its
|
||||
very generous resources: 512k of Flash and 96k of SRAM on-chip memory, loads of peripherals, up to 72MHz operating frequency, external memory bus and other goodies. <b>eLua</b> is so happy with
|
||||
this chip, in fact, that a board designed specifically for <b>eLua</b> was built around it. You can find the full specifications of the board
|
||||
<a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">here</a>. This is the board that we're going to use in this tutorial.</p>
|
||||
<h3>Prerequisites</h3>
|
||||
<p>Before you'll be able to use <b>eLua</b> on the LPC2468 CPU, make sure that:</p>
|
||||
<ul>
|
||||
<li>you're using Windows. Using this board under Linux or other operating systems should be possible, but we're going to cover only Windows here.</li>
|
||||
<li>you downloaded the latest FTDI VCP drivers from <a href="http://www.ftdichip.com/Drivers/VCP.htm">here</a>.</li>
|
||||
<li>you downloaded and installed the FTDI FT_PROG tool from <a href="http://www.ftdichip.com/Resources/Utilities.htm">here</a>.</li>
|
||||
<li>you downloaded and installed the Flash Magic programming software from <a href="http://www.flashmagictool.com/">here</a>.</li>
|
||||
<li>you already have your <b>eLua</b> image for the LPC2468 CPU (<a href="building.html">built</a> or <a href="downloads.html">downloaded</a>).</li>
|
||||
</ul>
|
||||
<h3>Burning <b>eLua</b> to the LPC2468 using the Flash Magic software</h3>
|
||||
<p>Before actually downloading the <b>eLua</b> image to the CPU, the board must be configured for proper USB operation (note that this should be done only once, not everytime you need to program
|
||||
a new <b>eLua</b> image). The steps for this procedure are listed below:</p>
|
||||
<ol>
|
||||
<li>make sure that jumper JP1 on the board is set to position "USB" (2-3) if you want to power your board from the USB bus.</li>
|
||||
<li>connect your board to the PC using an USB cable.</li>
|
||||
<li>if needed, install the FTDI drivers you downloaded earlier.</li>
|
||||
<li>once the drivers are properly installed, start the FTDI FT_PROG software downloaded earlier and choose "Devices", "Scan and Parse". If everything is OK, your device should show up in the
|
||||
left part of the FT_PROG window, under "Device Tree".</li>
|
||||
<li>in "Device Tree", select "USB_Config_Descriptor", then enter "500" in the "Max Bus Power" field in the upper right part of the FT_PROG window. It should look like below:
|
||||
<img src="images/ft_prog_power.png" alt="FT_PROG power settings" style="margin-top: 10px;" />
|
||||
</li>
|
||||
<li><b>(optional)</b> now it's a good time to give your <b>eLua</b> board a good description :) In "Device Tree", select "USB_String_Descriptors", then enter "eluaproject.net" in the
|
||||
"Manufacturer" field in the upper right part of the FT_PROG window, and "eLua demo board" in the "Product Description" field. It should look like below:
|
||||
<img src="images/ft_prog_strings.png" alt="FT_PROG strings" style="margin-top: 10px;" />
|
||||
</li>
|
||||
<li>choose "Devices", "Program". The new settings will be written to the FTDI chip internal memory, and the board will automatically re-enumerate.</li>
|
||||
</ol>
|
||||
<p>Once your board is properly configured (remember, you only need to do this ONCE!), follow the next steps to program your <b>eLua</b> image to the board as many times as you need to:</p>
|
||||
<ol>
|
||||
<li>make sure that jumper JP1 on the board is set to position "USB" (2-3) if you want to power your board from the USB bus.</li>
|
||||
<li>make sure that JP2 (ISP), JP3 (RST), JP6 (RDX0) and JP7 (TDX0) are connected on the board.</li>
|
||||
<li>connect the board to the PC using an USB cable.</li>
|
||||
<li>find the serial port used by the board. Open "Device Manager" in Windows, go to "Ports (COM & LPT)" and look for a serial port named "USB serial port" or something similar. If unsure,
|
||||
simply unplug the board. The serial port that disappears from the list after unplugging the board is your board's serial port.</li>
|
||||
<li>start Flash Magic and click on "Select Device" under "Step 1 - Communications". In the "Device Database" window that appears, select "ARM7" and then double click on "LPC2468"
|
||||
(<b>NOT</b> "LPC2468 Ethernet").</li>
|
||||
<li>select the COM port from step 4 in "COM Port", set the baud rate to 230400, "Interface" to "None (ISP)", and "Oscillator (MHZ)" to 12.</li>
|
||||
<li>under "Step 2 - Erase", select "Erase blocks used by Hex File".</li>
|
||||
<li>under "Step 3 - Hex File", select your LPC2468 </b>eLua</b> hex file.</li>
|
||||
<li><b>(optional)</b> under "Step 4 - Options", select "Verify after programming" if you want to verify your downloaded image.</li>
|
||||
</ol>
|
||||
<p>After all the steps above, the Flash Magic windows should look similar to the image below (my LPC2468 serial port is COM14):</p>
|
||||
<img src="images/flashmagic.png" alt="Flash Magic Settings" style="margin-left: 10px;" />
|
||||
<p>All that's left to do is hit the "Start" button, and wait (the whole process takes a while). When it's finished, close Flash Magic and remove the JP2 (ISP) and JP3 (RST) jumpers from the
|
||||
board, then reset it.</p>
|
||||
<p>That's it! You now have <b>eLua</b> programmed on your board, so you can start your terminal emulator and enjoy it, as described in <a href="using.html">using eLua</a>.</p>
|
||||
|
||||
$$FOOTER$$
|
||||
|
@ -1,5 +1,5 @@
|
||||
$$HEADER$$
|
||||
<h3>Installing <b>eLua</b> with the LPC2888 CPU from NXP</h3>
|
||||
<h3>Installing <b>eLua</b> on the LPC2888 CPU from NXP</h3>
|
||||
<p>The <a href="http://www.standardics.nxp.com/products/lpc2000/all/~LPC2888/">LPC2888 CPU</a> from <a href="http://www.nxp.com">NXP</a> packs some interesting features: huge internal 1Mbyte flash memory,
|
||||
on-chip USB 2.0 high speed interface, and the most complex (by far) clocking network that I've ever seen on an ATM7TDMI chip. Also, it implements the USB DFU (Device Firmware Update) profile over
|
||||
its USB interface, so it's quite easy to program it in-circuit. I'm using the <a href="http://www.olimex.com/dev/lpc-h2888.html">Olimex LPC-H2888</a> development board built around this chip, which packs
|
||||
|
@ -1,24 +1,58 @@
|
||||
$$HEADER$$
|
||||
<h3>Installing <b>eLua</b> on the STR9 CPU family from ST</h3>
|
||||
<p>Among the ARM based MCUs available today, the <a href="http://www.st.com/mcu/inchtml-pages-str9.html">STR9</a> CPUs from <a href="http://www.st.com">ST</a> stand up because of a few unique features.
|
||||
<p>Among the ARM based MCUs available today, the <a href="http://www.st.com/mcu/inchtml-pages-str9.html">STR9</a> CPUs from <a href="http://www.st.com">ST</a> stand up because of a few unique features.
|
||||
First, their core is an ARM966-E, as opposed to the very popular ARM7TDMI core. This, together with some cleverly chosen on-chip hardware blocks, allows the CPU to run at 96MHz, which is very fast for a
|
||||
general purpose MCU. The particular CPU I'm using (STR912FAW44) ) also has 512k of flash (and another bank of 32k flash) and 96k of internal RAM, so you won't be running out of memory anytime soon. It is accompanied by a very good support library,
|
||||
and ST provides a lot of nice tools for STR9, including a graphical tool that you can use to configure the chip exactly how you want. When I wrote to ST about <b>eLua</b>, they
|
||||
agreed to send me a <a href="http://www.hitex.com/str9-comstick/">STR9-comStick</a> board to run <b>eLua</b> on it. Thank you very much for your help, once again. This is the board that I'm going to
|
||||
use through this tutorial.</p>
|
||||
general purpose MCU. The particular CPU I'm using (STR912FAW44) also has 512k of flash (and another bank of 32k flash) and 96k of internal RAM, so you won't be running out of memory anytime soon. It is accompanied by a very good support library,
|
||||
and ST provides a lot of nice tools for STR9, including a graphical tool that you can use to configure the chip exactly how you want.
|
||||
</p>
|
||||
|
||||
<h3>Prerequisites</h3>
|
||||
<p>Before you'll be able to use <b>eLua</b> on the STR912FAW44 CPU, make sure that:</p>
|
||||
<ul>
|
||||
<li>you're using Linux, Windows, or any other OS that has support for <a href="http://openocd.berlios.de/web/">OpenOCD</a>. You might have a look at my <a href="tut_openocd.html">OpenOCD tutorial</a> before continuing.</li>
|
||||
<li>you're using Linux, Windows, or any other OS that has support for <a href="http://openocd.berlios.de/web/">OpenOCD</a>.
|
||||
You might have a look at our <a href="tut_openocd.html">OpenOCD tutorial</a> before continuing.</li>
|
||||
<li>if you're on Windows, you have installed the STR9-comStick support package from the accompanying CD.</li>
|
||||
<li>you already have your <b>eLua</b> image for the STR912FAW44 CPU (<a href="building.html">built</a> or <a href="downloads.html">downloaded</a>).</li>
|
||||
<li>if you're on Linux, you have super-user (sudoer) access to the system</li>
|
||||
</ul>
|
||||
<h3>Burning <b>eLua</b> to the STR9-comStick</h3>
|
||||
<p>You need OpenOCD to do this. Just follow the instructions from my <a href="tut_openocd.html">OpenOCD tutorial </a>. On the tutorial page you'll also find links to the OpenOCD
|
||||
<p> The following sections show how to burn <b>eLua</b> on kits based on the STR9 MCU.</p>
|
||||
|
||||
<h3>Using <b>eLua</b> on the STR9-comStick</h3>
|
||||
<p>When we wrote to ST about <b>eLua</b>, they agreed to send us a <a href="http://www.hitex.com/str9-comstick/">STR9-comStick</a> board to run <b>eLua</b> on it. Thank you very much for your help, once again. This is the board that
|
||||
we're going to use through this tutorial.You need OpenOCD to do this. Just follow the instructions from our <a href="tut_openocd.html">OpenOCD tutorial </a>. On the tutorial page you'll also find links to the OpenOCD
|
||||
configuration files that I'm using for burning <b>eLua</b> to the comstick.</p>
|
||||
<p><b>IMPORTANT NOTE</b>: for some very strange reasons (probably related to the on-board USB to JTAG converter) my comstick does NOT start to execute the code from its internal flash after being
|
||||
powered up via the USB cable (faulty reset sequence?). To overcome this, you'll find a special OpenOCD configuration file on my <a href="tut_openocd.html">OpenOCD tutorial</a> page. It is called <i>comrst.cfg</i>,
|
||||
and you can use it to reset your comstick after it is powered up.</p>
|
||||
|
||||
<h3>Burning <b>eLua</b> to the STR-E912 Olimex boardboard</h3>
|
||||
<p>To use eLua on the <a href="http://www.olimex.com/dev/str-e912.html">Olimex STR-E912 development
|
||||
board</a> we are using an <a href="http://www.olimex.com/dev/arm-usb-ocd.html">Olimex programmer</a> to flash the image under
|
||||
Linux, using OpenOCD.
|
||||
<ul>
|
||||
<li>
|
||||
Copy the binary image file to the scripts' dir of OpenOCD, renaming it to main.bin:
|
||||
(you can also have a simbolic link on your OpenOCD script's folder, linked
|
||||
to the binary image on your build dir but it must be named "main.bin")
|
||||
</li>
|
||||
<h2>$ cp elua_lua_str912faw44.bin /..yourpath../openocd/scripts/main.bin</h2>
|
||||
<li>
|
||||
Connect the Olimex programmer cable on the JTAG connector on the STR-E912
|
||||
</li>
|
||||
Run the OpenOCD script as a superuser, from the OpenOCD scripts directory:
|
||||
</li>
|
||||
<h2>$ sudo ./openocd -f comstick.cfg</h2>
|
||||
<li>
|
||||
Carefully disconnect the Olimex programmer cable on the JTAG connector on the
|
||||
STR-E912, as unfortunately you will have to do this many times while using
|
||||
this combination. The terminal will NOT run if the programmer is connected
|
||||
to the board.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<p>That's it! <b>eLua</b> is now programmed in the CPU, so you can start your terminal emulator and enjoy it, as described in <a href="using.html">using eLua</a>.
|
||||
</p>
|
||||
$$FOOTER$$
|
||||
|
5
doc/en/modules_str9.html
Normal file
@ -0,0 +1,5 @@
|
||||
$$HEADER$$
|
||||
<h3>Reference manual - STR9 platform dependent modules</h3>
|
||||
<p>This paragraph presents all the modules specific to the <a href="status.html">STR9</a> platform.</p>
|
||||
$$FOOTER$$
|
||||
|
@ -2,31 +2,36 @@ $$HEADER$$
|
||||
|
||||
<h3>eLua Project News</h3>
|
||||
|
||||
<h2>##TODO ?? Month## 2009</h2>
|
||||
<p>Version 0.7 is released. The main changes are described below and the
|
||||
full list can be seen in our Version History page:</p>
|
||||
<h2>January 18th, 2010</h2>
|
||||
<p>Version 0.7 is released. Here's the changelog:</p>
|
||||
<ul>
|
||||
<li>Added the Lua EGC (Emergency Garbage Collection) patch</li>
|
||||
<li>Initial generic Interrupt support</li>
|
||||
<li>Added generic/portable SD/MMC Card FAT File System support</li>
|
||||
<li>Added LuaRPC support. Remote procedure calls in the embedded world</li>
|
||||
<li>New eLua shell cat/type command, lists text file contents</li>
|
||||
<li>Added support for Olimex STR-E912 board, ST Electronics STR912FW44X MCU</li>
|
||||
<li>Added support for the PUC-Rio eLua Board, based on an NXP LPC2468 MCU</li>
|
||||
<li>More Portuguese content</li>
|
||||
<li>ADC module and doc enhancements</li>
|
||||
<li>Please check our <a href="versionhistory.html">Version History page</a>
|
||||
to see the full details of the changes.</li>
|
||||
<li>Compiling <b>eLua</b> under Windows is now officially supported, tutorial added <a href="building_win.html">here</a></li>
|
||||
<li>Added <a href="http://fanplastic.org/2009/05/11/lua-rpc/">LuaRPC</a> support. Remote procedure calls in the embedded world (!!!). (see <a href="using.html#rpc">here</a> for details)</li>
|
||||
<li>Added generic and portable SD/MMC Card FAT File System support, (see <a href="fatfs.html">here</a> for details)</li>
|
||||
<li>New shell cat/type command, lists text file contents</li>
|
||||
<li>New ROMFS build modes: compress and compile (see <a href="arch_romfs.html#mode">here</a> for details)</li>
|
||||
<li>Added support for <a href="http://www.olimex.com/dev/str-e912.html">Olimex STR-E912</a> board</li>
|
||||
<li>Added the STR9 platform specific <a href="refman_ps_str9_pio.html">pio module</a>.</li>
|
||||
<li>Added Robert Jakabosky's EGC (Emergency Garbage Collector) patch to <b>eLua</b> (see <a href="elua_egc.html">here</a> for details)</li>
|
||||
<li>Added support for the <a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">PUC-Rio eLua</a> board, NXP LPC2468 MCU</li>
|
||||
<li>Added basic CAN module</li>
|
||||
<li>New full CSS based site/doc menu</li>
|
||||
<li>Reference Manual doc folders restructured for easier management</li>
|
||||
<li>More portuguese content translations</li>
|
||||
<li>ADC module doc enhancements</li>
|
||||
<li>More tutorials and general doc enhancements</li>
|
||||
</ul>
|
||||
|
||||
<h2>06 October 2009</h2>
|
||||
<h2>October 6th, 2009</h2>
|
||||
<p>Version 0.6 is (finally) released. Here is the changelog:</p>
|
||||
<ul>
|
||||
<li>License changed to MIT</li>
|
||||
<li>Web page and documentation completely redesigned</li>
|
||||
<li>Documentation available offline</li>
|
||||
<li>Site/doc (partially) translated to brazilian portuguese</li>
|
||||
<li>Added support for AVR32 CPUs</li>
|
||||
<li>Added support for STM32 Cortex-M3 CPUs</li>
|
||||
<li>Added support for LM3S9Bxx Cortex-M2 CPUs</li>
|
||||
<li>Added ADC module with support for moving average filters</li>
|
||||
<li>Added support for multiple toolchains</li>
|
||||
<li>Added an ls (or dir) shell command</li>
|
||||
@ -36,16 +41,16 @@ full list can be seen in our Version History page:</p>
|
||||
<li>API semantic revisions (old code might not be compatible)</li>
|
||||
</ul>
|
||||
|
||||
<h2>27 July 2009</h2>
|
||||
<h2>July 27th, 2009</h2>
|
||||
<p>We would like to invite all eLua users to the Lua Workshop 2009. This
|
||||
will be the first one to be held at PUC-Rio, in Rio de Janeiro, Brazil, on october 6-7 2009.
|
||||
Bogdan and Dado will make a presentation and show demos on the first day of
|
||||
the event. eLua demos will also be presented in the second day of the event.
|
||||
The activities on October 7th will be dedicated to the use of Lua in games,
|
||||
as part of Lua Games 2009, a pre-event of SBGames 2009.
|
||||
We will also proudly offer a "little surprise" for the <b>eLua comunity</b>.</p>
|
||||
We will also proudly offer a "little surprise" for the <b>eLua</b> comunity.</p>
|
||||
|
||||
<h2>02 February 2009</h2>
|
||||
<h2>February 2nd, 2009</h2>
|
||||
<p>We know that we haven't had an official release in a while now, but
|
||||
there's a lot of stuff going on with the project. The next release will
|
||||
definitely happen before the end of February and it will come with a
|
||||
@ -54,7 +59,7 @@ platforms, a completely redesigned documentation system, and a few
|
||||
surprises that I won't mention just yet :) So stay tuned, we're working
|
||||
hard to make eLua better for you.</p>
|
||||
|
||||
<h2>01 November 2008</h2>
|
||||
<h2>November 1st, 2008</h2>
|
||||
<p>Version 0.5 is released! Among other goodies, it brings TCP/IP support to eLua. Here's the changelog:</p>
|
||||
|
||||
<ul><li>Added support for STR7 CPUs from ST </li><li>Added TCP/IP support using the uIP stack </li><li>Added support for console and shell over TCP/IP besides the previous serial link</li><li>Added the "net" module (eLua's interface to TCP/IP functions) </li><li>Added the "cpu" module (eLua's interface to the target CPU) </li><li>New samples: morse.lua (Morse code encoder), lhttpd.lua (Lua scripting HTTP server) </li><li>Added support for cross-compiling Lua code (compile on PC, run on target)</li><li>XMODEM can now receive Lua bytecode in addition to Lua source code </li><li>The XMODEM buffer is now dynamic (grows as needed) instead of fixed size</li><li>Project documentation updated</li></ul>
|
||||
@ -68,10 +73,10 @@ hard to make eLua better for you.</p>
|
||||
memory footprint (both Flash and RAM) of eLua, and (hopefully) will
|
||||
also come with a nice surprise :)</p>
|
||||
|
||||
<h2>16 October 2008</h2>
|
||||
<h2>October 16th, 2008</h2>
|
||||
<p>The <a href="tut_openocd.html">OpenOCD tutorial</a> was updated with a new section about how to use OpenOCD with a STR7 CPU from ST. Also, the <a href="overview.html">about page</a> was updated with more information about the authors of eLua. Expect a new eLua version towards the end of October.</p>
|
||||
|
||||
<h2>10 September 2008</h2>
|
||||
<h2>September 10th, 2008</h2>
|
||||
<p>Version 0.4.1 is released! This is a minor release, its main purpose
|
||||
is to "keep in sync" with Lua, thus eLua now has the latest official
|
||||
Lua version (5.1.4). You probably don't need to upgrade to this version
|
||||
@ -84,7 +89,7 @@ can't be used anyway. Because of this, the code size of eLua was
|
||||
reduced.</li><li>Project documentation updated</li></ul>
|
||||
|
||||
|
||||
<h2>02 September 2008</h2>
|
||||
<h2>September 2nd, 2008</h2>
|
||||
<p>Version 0.4 is released! Here's the changelog:</p>
|
||||
|
||||
<ul><li>Added support for LPC2888 (preliminary)</li><li>Added PWM module</li><li>New
|
||||
@ -95,13 +100,13 @@ of both the internal CPU RAM and external RAM chips on boards that have
|
||||
external RAM)</li><li>Autorun: if "autorun.lua" is found in the filesystem, it is executed before starting the shell</li><li>Added "pack" (binary data packing/unpacking) and "bit" (binary operations) modules</li><li>Build system updated, easier to use, now it knows how to handle "boards" as well as CPUs</li><li>Modified the existing platform modules to take less RAM and to report an error when an unavailable resource is requested</li><li>Project documentation updated</li></ul>
|
||||
|
||||
|
||||
<h2>02 September 2008</h2>
|
||||
<h2>September 2nd, 2008</h2>
|
||||
<p>The eLua site was updated in anticipation of the new 0.4 release, which will come soon (very soon, in fact). Now there's a <a href="faq.html">FAQ page</a>. Also, the <a href="status.html">status and roadmap</a>, <a href="building.html">building eLua</a>, <a href="examples.html">example programs</a> and <a href="tut_openocd.html">using OpenOCD</a> pages were updated. And there's yet another new page on <a href="installing_lpc2888.html">how to use eLua with LPC2888 CPUs</a>. Expect the 0.4 release later today.</p>
|
||||
|
||||
<h2>09 August 2008</h2>
|
||||
<h2>August 9th, 2008</h2>
|
||||
<p>OK, this took less time than I expected :) The page on how to use eLua with STR9 CPUs is available <a href="installing_str9.html">here</a>.</p>
|
||||
|
||||
<h2>09 August 2008</h2>
|
||||
<h2>August 9th, 2008</h2>
|
||||
<p>Version 0.3 is released! The project page was updated, with more
|
||||
sections to come soon, including a tutorial on how to use eLua with
|
||||
STR9 CPUs. Here's the changelog for the 0.3 version:</p>
|
||||
@ -109,20 +114,20 @@ STR9 CPUs. Here's the changelog for the 0.3 version:</p>
|
||||
<ul><li>Now you can play hangman directly from eLua :), thanks to the new "term" module that handles ANSI escape sequences</li><li>Added support for ST STR912FAW44</li><li>Added support for Cortex LM3S6965</li><li>More intuitive and flexible build system (new syntax, component selection at build time)</li><li>eLua examples are now part of the repository</li><li>Project documentation updated</li></ul>
|
||||
|
||||
|
||||
<h2>06 August 2008</h2>
|
||||
<h2>August 6th, 2008</h2>
|
||||
<p>The web page was updated with an <a href="tut_openocd.html">OpenOCD tutorial</a>
|
||||
that will continue to grow as more and more targets are added. This
|
||||
update is also an informal announcement of the soon to come eLua 0.3
|
||||
release, which (among other things) brings support for the <a href="http://www.hitex.com/index.php?id=383">STR9-comStick</a>.</p>
|
||||
|
||||
<h2>29 July 2008</h2>
|
||||
<h2>July 29th, 2008</h2>
|
||||
<p>eLua has a new home at BerliOS. Besides the new menu system on the
|
||||
home page, the biggest news is that the code repository is now based on
|
||||
SVN (as opposed to CVS until now). If you're a developer, this is
|
||||
probably good news for you. If not, check the download page to learn
|
||||
about the new eLua download locations.</p>
|
||||
|
||||
<h2>28 July 2008</h2>
|
||||
<h2>July 28th, 2008</h2>
|
||||
<p>I got a report that compiling a simple C++ program for a Cortex CPU with a compiler built after <a href="tc_cortex.html">my instructions</a>
|
||||
failed with a linker error. I checked and I found out that the gcc's
|
||||
C++ library (libstdc++) wasn't even build properly for Cortex-M3. My
|
||||
@ -130,7 +135,7 @@ bad. I updated the tutorial page. The only modification is in step 4,
|
||||
where you need to give more flags to the "make" commands, not just the
|
||||
CFLAGS. Thanks for reporting this.</p>
|
||||
|
||||
<h2>27 July 2008</h2>
|
||||
<h2>July 27th, 2008</h2>
|
||||
<p>Version 0.2 is released! Also, as you probably figured out by now,
|
||||
the project page was seriously updated. Here's the changelog for the
|
||||
0.2 version:</p>
|
||||
@ -138,22 +143,22 @@ the project page was seriously updated. Here's the changelog for the
|
||||
<ul><li>Added support for Cortex LM3S8962</li><li>New platform modules (UART, SPI, Timer, platform data)</li><li>First release of the eLua shell</li><li>Lua source files can now be sent to target with XMODEM</li><li>You can download binary file images from the "files" section, so you don't need to compile eLua yourself</li></ul>
|
||||
|
||||
|
||||
<h2>25 July 2008</h2>
|
||||
<h2>July 25th, 2008</h2>
|
||||
<p>Project page updated to reflect the current eLua <a href="status.html">status and roadmap</a>.
|
||||
Now there is a separate status and roadmap page. Also, version 0.2 is
|
||||
about to be released soon, with many new features, improvements and
|
||||
support for a new platform. More documentation is on the way, too.</p>
|
||||
|
||||
<h2>15 July 2008</h2>
|
||||
<h2>July 15th, 2008</h2>
|
||||
<p>Added a <a href="tut_bootstick.html">tutorial</a> on how to make your own eLua USB bootable stick! Get it while it's hot! :)</p>
|
||||
|
||||
<h2>11 July 2008</h2>
|
||||
<h2>July 11th, 2008</h2>
|
||||
<p>eLua version 0.1 is finally out! Be sure to check the <a href="downloads.html">download page</a>,
|
||||
and also the project page. The build instructions are included in the
|
||||
eLua archive. Also, new tutorials (building cross compilers for ARM and
|
||||
i386) were added, and the <a href="tut_bootpc.html">boot into Lua</a> page was updated to reflect the fact that you can build the eLua ELF file yourself now!</p>
|
||||
|
||||
<h2>07 July 2008</h2>
|
||||
<h2>July 7th, 2008</h2>
|
||||
<p>I'm still "brushing" the source code and adding more documentation
|
||||
before commiting the first version to CVS. Meanwhile, I prepared a
|
||||
(hopefully) nice surprise for all of you who showed interest in eLua
|
||||
@ -170,7 +175,7 @@ proof of concept, I am not going to abandon the "standalone Lua on PC"
|
||||
idea, because it could have some very interesting applications (think
|
||||
"BIOS scripting with Lua", <a href="http://en.wikipedia.org/wiki/Open_Firmware">Open Firmware</a> with Lua instead of Forth, educational applications and many others.)</p>
|
||||
|
||||
<h2>05 July 2008</h2>
|
||||
<h2>July 5th, 2008</h2>
|
||||
<p>The web page is up! For now you can only read the <a href="overview.html">project description</a>. Also, a tutorial about how to compile a GCC toolchain for the Cortex architecture is available <a href="tc_cortex.html">here</a>.</p>
|
||||
|
||||
$$FOOTER$$
|
||||
|
@ -1,31 +1,38 @@
|
||||
$$HEADER$$
|
||||
<a name="whatis" /><h3>What is eLua ?</h3>
|
||||
<a name="whatis" /><h3>What is eLua?</h3>
|
||||
<p><strong>eLua</strong>
|
||||
stands for <strong>Embedded Lua</strong> and the project
|
||||
aims to offer the full set of features of the <a href="http://www.lua.org">Lua Programming Language</a> to the embedded world. </p>
|
||||
aims to offer the full implementation of the
|
||||
<a href="http://www.lua.org">Lua Programming Language</a> to the embedded world. </p>
|
||||
|
||||
<p><strong>eLua</strong>
|
||||
is not a stripped down set of Lua; much on the contrary, it strives to
|
||||
offer the same features as the desktop version of Lua, but complementing them with
|
||||
specific features for embedded use.
|
||||
is not a stripped down set of Lua to fit in the embedded environment. Much on the contrary, it strives to
|
||||
offer the same features as the desktop version of Lua, complementing them with
|
||||
specific features for embedded use and discarting the need of an operating
|
||||
system running on the microcontrollers.
|
||||
Besides offering different flavors of the full Lua implementation
|
||||
(like the possibility of choosing between an integer-only and a floating
|
||||
point numbers implementation),
|
||||
a lot of work was and will be done in the direction of making Lua
|
||||
more "embedded-friendly" by augmenting the core language with features
|
||||
that allow lower memory requirements.</p>
|
||||
that allow lower memory requirements and faster embedded performance.</p>
|
||||
|
||||
<p>Lua is the perfect example of a
|
||||
minimal, yet fully
|
||||
functional language. Although generally advertised as a "scripting
|
||||
<p>Why Lua? Extremely well crafted, Lua is the perfect example of a
|
||||
minimal, yet fully functional language.
|
||||
Although generally advertised as a "scripting
|
||||
language" (and used accordingly especially in the game industry), it is
|
||||
also fully capable of running stand-alone programs. (ex: Adobe Lightroom, World of Warcraft,
|
||||
...). Its limited
|
||||
also fully capable of running stand-alone programs and web services
|
||||
(ex: Adobe Lightroom, World of Warcraft, ...). Its limited
|
||||
resource requirements make it suitable to a lot of microcontroller
|
||||
families. The intrinsic high portability of the original Lua code
|
||||
(which is ANSI C and runs virtually on every platform for which an ANSI
|
||||
C compiler is available) combined with the highly portable software
|
||||
architecture of <b>eLua</b> allow for easy porting of the project to a large variety or architectures. The peripheral access libraries exported by <b>eLua</b> are also portable by design, so one could run a Lua program (without or with very few modifications) on every <span style="font-weight: bold;">eLua</span> supported platform (the <a href="status.html">project status & roadmap</a> shows a constantly growing list of platforms on which <b>eLua</b> is supported). <b>eLua</b> inherits the minimalistic and functional design of Lua, staying in line with the well known <b>KISS</b>, <i>Keep It Small and Simple</i> philosophy.</p>
|
||||
(which is ANSI C and runs virtually on every platform), combined with the highly portable software
|
||||
architecture of <b>eLua</b>, allow for easy porting of the project to a large variety
|
||||
of architectures. The peripheral access libraries/modules exported by <b>eLua</b> are also portable
|
||||
by design, so one could run a Lua program (without or with very few modifications)
|
||||
on every <span style="font-weight: bold;">eLua</span> supported platform.
|
||||
This brings an unprecedent level of portability to the embedded aplications
|
||||
world. <b>eLua</b> inherits the minimalistic and functional design of Lua, staying
|
||||
in line with the well known <b>KISS</b>, <i>Keep It Small and Simple</i> philosophy.</p>
|
||||
|
||||
<p>The aim of the project is to have a fully functional Lua development
|
||||
environment <strong>on the microcontroller itself</strong>,
|
||||
@ -35,36 +42,44 @@ the PC side, other than a serial or ehternet console/terminal emulator.</p>
|
||||
Fun with it :)</p>
|
||||
<br />
|
||||
<br />
|
||||
<a name="features"></a><h3>Features</h3>
|
||||
<a name="features"></a><h3>General Features</h3>
|
||||
<p>As already stated, <b>eLua</b> allows you to run Lua completely on
|
||||
the
|
||||
target microcontroller. A fast-growing set of complementary modules is also
|
||||
provided, for programming <strong>eLua</strong> microcontroller's peripherals. </p>
|
||||
<p>The following important features are ready or being implemented:</p>
|
||||
<ul>
|
||||
<li>a flexible, configurable build system.</li>
|
||||
<li>access to the Lua interpreter on the target MCU via a variety of physical transports (RS-232 being the most popular).</li>
|
||||
<li>a (mostly) platform independent peripheral library (PIO,
|
||||
UART, PWM, SPI, TMR, ADC, NET, I2C...)</li>
|
||||
<li>a flexible, configurable build system and a web build service under
|
||||
development.</li>
|
||||
<li>access to the Lua interpreter on the target MCU via a variety of physical transports
|
||||
(RS-232, Ethernet, ...).</li>
|
||||
<li>a (mostly) platform independent MCU peripheral library (PIO,
|
||||
UART, PWM, SPI, TMR, ADC, NET, CAN, DAC, I2C...)</li>
|
||||
<li>a very low footprint embedded ROM file system, easy to port to different types of memory chips and other storage devices</li>
|
||||
<li>a small FAT R/W file system layer for SD cards</li>
|
||||
<li>a minimal "shell" (for file operations, environment configuration and other facilities)</li>
|
||||
<li>network support</li>
|
||||
<li>a small FAT R/W file system layer for SD/MMC cards</li>
|
||||
<li>a minimal command "shell", for file operations, environment configuration and other facilities</li>
|
||||
<li>tcp/ip network support</li>
|
||||
<li>remote procedure calls support. Distributed processing in the embedded world</li>
|
||||
<li>an embedded http server</li>
|
||||
<li>Terminal / Console over Ethernet</li>
|
||||
<li>debugging (directly on the MCU or remotely with the PC).</li>
|
||||
<li>extended (romable) Lua types, optimized for embedded performance</li>
|
||||
<li>terminal/console over Serial and Ethernet protocols</li>
|
||||
<li>debugging (directly on the MCU or remotely with the PC)</li>
|
||||
<li>rfs support. Remote file sharing on the embedded world</li>
|
||||
<li>full and stand alone implementation on all MCUs. No dependency on embedded operating systems</li>
|
||||
<li>online and offline access to (same format) documentation and tutorials</li>
|
||||
</ul>
|
||||
<p>For more information about the functionality (implemented and planned) in <strong>eLua</strong> check <a href="status.html">the status page</a>.</p>
|
||||
<p>For more information about the functionality (implemented and planned) in <strong>eLua</strong> check <a
|
||||
href="status.html">our status page</a>.</p>
|
||||
<p>Porting <strong>eLua</strong> to another compatible platform should be as easy
|
||||
and
|
||||
painless as possible. Currently this is restricted to platforms for
|
||||
which the gcc+newlib combo is available. This restriction will disappear in the near future, as <b>eLua</b> will have its own libc and thus it will be available on a much
|
||||
broader range of MCUs.</p>
|
||||
<p>The Lua implementation comes in two flavors: "regular Lua"
|
||||
<p>The Lua implementation is the full desktop Lua version and comes in two flavors: "regular Lua"
|
||||
(using
|
||||
floating point as the number type) and "integer Lua" (using integers).
|
||||
"Regular Lua" will be able
|
||||
to perform floating point operations (but will be slower because the
|
||||
to perform floating point operations (slower because the
|
||||
floating point operations will be emulated in software on the MCU),
|
||||
while "integer Lua" will only be able to perform operations with
|
||||
integer numbers (but support for fixed and even floating point can be
|
||||
@ -81,7 +96,7 @@ allows embedded-oriented programmers to use the simplicity and
|
||||
power of the Lua programming language and to hide the low-level
|
||||
complexities and platform/architecture-dependent features. With <b>eLua</b>,
|
||||
the programmer can focus on the actual implementation of his program,
|
||||
without having to worry about accessing the low-level peripheral
|
||||
without having to worry about accessing the low-level peripheral
|
||||
configuration and data registers, as the platform libraries already
|
||||
take care of this. This increases productivity and eliminates the often
|
||||
frustrating task of dealing with platform-specific drivers. </p>
|
||||
@ -102,18 +117,24 @@ algorithms and data description.</li>
|
||||
engineers that can go to their customer site and debug an eLua module on
|
||||
site, without any preparation at all, since the whole development
|
||||
environment resides on chip already.</li>
|
||||
<li>Final clients and decision makers, who benefits from the fact that
|
||||
<b>eLua</b> conceptually transforms hardware into comodities. In systems using
|
||||
<b>eLua</b>, replacing field sensor and actuator controllers by diferent models, brands and
|
||||
architectures have no impact on the main aplication software.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<a name="authors" /><h3>Authors</h3>
|
||||
<p><strong>eLua</strong> is a joint project of <strong><a href="#contacts">Bogdan Marinescu</a></strong>,
|
||||
a software developer from Bucharest, Romania and <strong><a href="#contacts">Dado Sutter</a></strong>,
|
||||
head of the Led Lab at <a href="http://www.puc-rio.br/">PUC-Rio University</a>, in Rio de Janeiro (Brazil). </p>
|
||||
head of the Led Lab at <a href="http://www.puc-rio.br/">PUC-Rio University</a>, in Rio de
|
||||
Janeiro, Brazil. </p>
|
||||
<p>Its origins come from the <a href="http://www.circuitcellar.com/renesas2005m16c/winners/1685.htm">ReVaLuaTe</a>
|
||||
project also developed by Bogdan Marinescu (as a contest entry for the
|
||||
project, also developed by Bogdan Marinescu (as a contest entry for the
|
||||
2005 Renesas M16C Design Contest), and the Volta Project, managed by
|
||||
Dado Sutter at PUC-Rio from 2005 to 2007.</p>
|
||||
<p><strong>eLua</strong> is Open Source and an always growing list of collaborators can be found in our <a
|
||||
<p><strong>eLua</strong> is developed in an fully open, distributed and colaborative model.
|
||||
An always growing list of collaborators, from all over the planet, can be found in our <a
|
||||
href="en_comunity.html#credits">Credits Page</a></p>
|
||||
<br />
|
||||
<table style="width: 578px; height: 256px; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">
|
||||
@ -137,9 +158,55 @@ href="en_comunity.html#credits">Credits Page</a></p>
|
||||
<br />
|
||||
<br />
|
||||
<a name="license" /><h3>License</h3>
|
||||
<p><strong>eLua</strong> is Open Source and is freely
|
||||
distributed under the MIT licence.</p>
|
||||
<p><strong>eLua</strong> is Open Source and is freely distributed under the MIT licence.</p>
|
||||
<p>The Lua code (with all the <strong>eLua</strong> specific changes) is included in the source tree and is, of course, licensed under the same <a href="http://en.wikipedia.org/wiki/MIT_License">MIT license that Lua uses.</a></p>
|
||||
<p>There may be other components with different licenses in <strong>eLua</strong>, see <strong>COPYING</strong> in the source distribution for details.</p>
|
||||
<p>Other (few) components have different licenses. Please see the file LICENCE in the source distribution for details.</p>
|
||||
<p>
|
||||
The Lua part of eLua is licensed under the Lua licensing terms, which you can
|
||||
find at <a
|
||||
href="http://www.lua.org/license.html">http://www.lua.org/license.html</a>.
|
||||
</p>
|
||||
<p>
|
||||
The XMODEM code is adapted from the FreeBSD at91 library, which was written by
|
||||
M. Warner Losh and is released under the BSD license.
|
||||
</p>
|
||||
<p>
|
||||
The "pack" module is adapted from the "lpack" module by Luiz Henrique de
|
||||
Figueiredo and it's placed in the public domain.
|
||||
</p>
|
||||
<p>
|
||||
The "bit" module is adapted from the "bitlib" library by Reuben Thomas, distributed under a MIT license.
|
||||
</p>
|
||||
<p>
|
||||
The "integer only lua" is based on the "Go Long Lua!" patch by John D.
|
||||
Ramsdell (from the Lua Power Patches page) and is placed in the public
|
||||
domain.
|
||||
</p>
|
||||
<p>
|
||||
The multiple memory allocator (dlmalloc) is written by Doug Lea and is
|
||||
placed on the public domain.
|
||||
</p>
|
||||
<p>
|
||||
The TCP/IP stack is adapted from uIP, written by Adam Dunkels and released
|
||||
under a BSD license.
|
||||
</p>
|
||||
<p>
|
||||
The FAT file sistem is based on FatFs, written by <a
|
||||
href="http://elm-chan.org">Elm Chan</a>. A copy of the FatFs license can be found in the
|
||||
LICENSE.fatfs file.
|
||||
</p>
|
||||
<p>
|
||||
The RPC implementation is based on Russell Smith's <ahref="http://q12.org/lua/index.html">Lua-RPC</a>
|
||||
A copy of the Lua-RPC license can be found in the LICENSE.luarpc file.
|
||||
</p>
|
||||
<p>
|
||||
Manufacturer provided CPU support libraries are licensed under their own
|
||||
terms. Check src/platform/*platform-name* for details of each license.
|
||||
</p>
|
||||
<p>
|
||||
The rest of the eLua code is licensed under MIT.
|
||||
</p>
|
||||
|
||||
|
||||
$$FOOTER$$
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
$$HEADER$$
|
||||
<h3>Reference manual - generic modules</h3>
|
||||
<p>This part of the reference manual presents the generic modules in <b>eLua</b> (see <a href="arch_overview.html">here</a> for more information about generic
|
||||
modules).</p>
|
||||
<p>This part of the reference manual presents the generic modules in
|
||||
<b>eLua</b>. Please check the available modules and all its functions, in the
|
||||
Generic Modules sub-menu options of the main menu. For more information on
|
||||
what a Generic Module is, see <a href="arch_overview.html">here</a>.</p>
|
||||
$$FOOTER$$
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
$$HEADER$$
|
||||
<a name="platforms" /><h3>eLua platforms and modules status</h3>
|
||||
<p>The current status of <b>eLua</b> is given by the list of the
|
||||
<a name="status" /><h3>eLua project status</h3>
|
||||
<p>
|
||||
The current status of <b>eLua</b> is given by the list of the
|
||||
currently supported platforms, together with a list of
|
||||
modules-per-platform and their development phase. For better
|
||||
formatting, the lists are organized as tables that use the graphical
|
||||
notation given below:</p>
|
||||
<table style="width: 325px;" class="table_center">
|
||||
notation given below:
|
||||
</p>
|
||||
<table style="width: 620px;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: center;">Symbol</th>
|
||||
@ -16,8 +18,8 @@ notation given below:</p>
|
||||
<td style="text-align: left;">Implemented and tested</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: left;">Implemented, not tested</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: left;">Implemented, needs more testing</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
@ -29,38 +31,53 @@ notation given below:</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>The list of CPUs/boards currently supported by <b>eLua</b> is given below:</p>
|
||||
<p/>
|
||||
<a name="platforms" /><h3>eLua suported platforms</h3>
|
||||
<p>The list of CPUs and boards currently supported by <b>eLua</b> is given below:</p>
|
||||
<table style="text-align: left; width: 620px;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left;">CPU</th>
|
||||
<th style="text-align: center;">Architecture</th>
|
||||
<th style="text-align: center;">Platform name</th>
|
||||
<th style="text-align: center;">Supported boards</th>
|
||||
<th style="text-align: center;"> Supported boards </th>
|
||||
<th style="text-align: center;">Status</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.luminarymicro.com/products/LM3S8962.html">LM3S8962</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">lm3s</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s8962_can_ethernet_evaluation_kit.html">EKx-LM3S8962</a></td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s8962_can_ethernet_evaluation_kit.html">EK-LM3S8962</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965.html">LM3S6965</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">lm3s</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965_ethernet_evaluation_kit.html">EKx-LM3S6965</a></td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6965_ethernet_evaluation_kit.html">EK-LM3S6965</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6918.html">LM3S6918</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">lm3s</td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S</td>
|
||||
<td><a href="http://www.micromint.com/index.php/SBC/eagle-100.html">Eagle 100</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.luminarymicro.com/products/lm3s6918.html">LM3S9B92</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S</td>
|
||||
<td><a href="http://www.luminarymicro.com/products/ek-lm3s9b92.html">EK-LM3S9B92</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=4117">AT32UC3A0512</a></td>
|
||||
<td>AVR32</td>
|
||||
<td style="color: rgb(255, 102, 0);">AVR32</td>
|
||||
<td><a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=4114">ATEVK1100</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.atmel.com/dyn/products/Product_card.asp?part_id=3755">AT91SAM7X256</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
@ -73,7 +90,66 @@ notation given below:</p>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">at91sam7x</td>
|
||||
<td>None</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td><a href="http://www.nxp.com/#/pip/pip=[pip=LPC1768_66_65_64_2]|pp=[t=pip,i=LPC1768_66_65_64_2]">LPC1768</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">LPC17xx</td>
|
||||
<td><a href="http://hackaday.com/2009/11/21/review-mbed-nxp-lpc1768-microcontroller/">mbed</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td><a
|
||||
href="http://www.nxp.com/#/pip/pip=[pip=LPC2468_4]|pp=[t=pip,i=LPC2468_4]">LPC2468</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">LPC24xx</td>
|
||||
<td><a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">PUC-Rio Demo Board</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.standardics.nxp.com/microcontrollers/to/pip/LPC2880FET180.html">LPC2888</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">LPC288x</td>
|
||||
<td><a href="http://www.olimex.com/dev/lpc-h2888.html">LPC-H2888</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR711FR2.html">STR711FR2</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">STR7</td>
|
||||
<td><a href="http://www.sctec.com.br/content/view/101/30/">MOD711</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td>ARM966E-S</td>
|
||||
<td style="color: rgb(255, 102, 0);">STR9</td>
|
||||
<td><a href="http://www.hitex.com/index.php?id=383">STR9-comStick</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td>ARM966E-S</td>
|
||||
<td style="color: rgb(255, 102, 0);">STR9</td>
|
||||
<td><a href="http://www.olimex.com/dev/str-e912.html">STR-E912</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103ZE-110.html">STM32F103ZE</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">STM32</td>
|
||||
<td><a href="http://www.st.com/mcu/contentid-100-110-STM3210E_EVAL.html">STM3210E-EVAL</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103RE-110.html">STM32F103RE</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">STM32</td>
|
||||
<td><a href="http://www.futurlec.com/ET-STM32_Stamp.shtml">ET-STM32 Stamp</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.intel.com">i386 (generic)</a></td>
|
||||
@ -82,52 +158,321 @@ notation given below:</p>
|
||||
<td>PCs/emulators</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p/>
|
||||
<a name="plat_modules" /><h3>eLua modules x MCUs</h3>
|
||||
<p>The relationship between a module and its implementation on a particular platform is given in the next table.</p>
|
||||
<table style="text-align: left; width: 620px;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR912FAW44-101.html">STR912FAW44</a></td>
|
||||
<td>ARM966E-S</td>
|
||||
<td style="color: rgb(255, 102, 0);">str9</td>
|
||||
<td><a href="http://www.hitex.com/index.php?id=383">STR9-comStick</a>
|
||||
<a href="http://www.olimex.com/dev/str-e912.html">STR-E912</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<th>Module</th>
|
||||
<th rowspan="2">pio</th>
|
||||
<th rowspan="2">spi</th>
|
||||
<th rowspan="2">uart</th>
|
||||
<th rowspan="2">tmr</th>
|
||||
<th rowspan="2">pwm</th>
|
||||
<th rowspan="2">net</th>
|
||||
<th rowspan="2">cpu</th>
|
||||
<th rowspan="2">adc</th>
|
||||
<th rowspan="2">pd</th>
|
||||
<th rowspan="2">term</th>
|
||||
<th rowspan="2">bit</th>
|
||||
<th rowspan="2">pack</th>
|
||||
<th rowspan="2">can</th>
|
||||
<!-- rowspan="2">i2c</th><-->
|
||||
<th rowspan="2">rpc</th>
|
||||
<th rowspan="2">mmc</th>
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">MCU</td>
|
||||
</tr><tr>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S8962</td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented"/></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.standardics.nxp.com/microcontrollers/to/pip/LPC2880FET180.html">LPC2888</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">lpc288x</td>
|
||||
<td><a href="http://www.olimex.com/dev/lpc-h2888.html">LPC-H2888</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S6965</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STR711FR2.html">STR711FR2</a></td>
|
||||
<td>ARM7TDMI</td>
|
||||
<td style="color: rgb(255, 102, 0);">str7</td>
|
||||
<td><a href="http://www.sctec.com.br/content/view/101/30/">MOD711</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S6918</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=4117">AT32UC3A0512</a></td>
|
||||
<td>AVR32</td>
|
||||
<td style="color: rgb(255, 102, 0);">avr32</td>
|
||||
<td><a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=4114">ATEVK1100</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S9B92</td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103ZE-110.html">STM32F103ZE</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">stm32</td>
|
||||
<td><a href="http://www.st.com/mcu/contentid-100-110-STM3210E_EVAL.html">STM3210E-EVAL</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="color: rgb(255, 102, 0);">AT32UC3A0512</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.st.com/mcu/devicedocs-STM32F103RE-110.html">STM32F103RE</a></td>
|
||||
<td>Cortex-M3</td>
|
||||
<td style="color: rgb(255, 102, 0);">stm32</td>
|
||||
<td><a href="http://www.futurlec.com/ET-STM32_Stamp.shtml">ET-STM32 Stamp</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="color: rgb(255, 102, 0);">AT91SAM7X256</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">AT91SAM7X512</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LPC1768</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LPC2468</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LPC2888</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">STR711FR2</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">STR912FAW44</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">STM32F103ZE</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">STM32F103RE</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">i386</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img style="height: 16px; width: 16px;" src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img style="height: 16px; width: 16px;" src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<!--><td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td><-->
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a name="gen_modules" /><h3>eLua modules</h3>
|
||||
<p>The following table shows a list of the generic modules currently implemented (and planned to be implemented) in <b>eLua</b>.</p>
|
||||
<table style="text-align: left; width: 620px;" class="table_center">
|
||||
<tbody>
|
||||
@ -138,27 +483,27 @@ notation given below:</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">pio</td>
|
||||
<td>Programmable Input/Output</td>
|
||||
<td>programmable input/output</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">tmr</td>
|
||||
<td>timers</td>
|
||||
<td>periodic timer / counters</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">pwm</td>
|
||||
<td>Pulse Width Modulation</td>
|
||||
<td>pulse width modulation</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">uart</td>
|
||||
<td>Universal Asynchronous Receiver Transmitter</td>
|
||||
<td>universal asynchronous receiver transmitter</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">spi</td>
|
||||
<td>Serial Peripheral Interface</td>
|
||||
<td>serial peripheral interface</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">net</td>
|
||||
@ -167,10 +512,15 @@ notation given below:</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">adc</td>
|
||||
<td>Analog to Digital Converter</td>
|
||||
<td>analog to digital converter</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">dac</td>
|
||||
<td>digital to analog converter</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">cpu</td>
|
||||
<td>low level system access</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
@ -202,7 +552,7 @@ notation given below:</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">i2c</td>
|
||||
<td>I2C bus access module</td>
|
||||
<td>inter-integrated circuit protocol</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -212,249 +562,42 @@ notation given below:</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">can</td>
|
||||
<td>Controller Area Network</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td>controller area network</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">rpc</td>
|
||||
<td>remote procedure call / remote control</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td>remote procedure call</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">i2s</td>
|
||||
<td>inter-IC sound</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">mmc</td>
|
||||
<td>sd/mmc card FAT file system</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: testing" /></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td style="color: rgb(255, 102, 0);">disp</td>
|
||||
<td>lcd, oled and other displays support</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: testing" /></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td style="color: rgb(255, 102, 0);">int</td>
|
||||
<td>interrupt service routines</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: testing" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>The relationship between a module and its implementation on a particular platform is given in the next table.</p>
|
||||
<table style="text-align: left; width: 620px;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th rowspan="2">pio</th>
|
||||
<th rowspan="2">spi</th>
|
||||
<th rowspan="2">uart</th>
|
||||
<th rowspan="2">tmr</th>
|
||||
<th rowspan="2">pwm</th>
|
||||
<th rowspan="2">net</th>
|
||||
<th rowspan="2">cpu</th>
|
||||
<th rowspan="2">adc</th>
|
||||
<th rowspan="2">pd</th>
|
||||
<th rowspan="2">term</th>
|
||||
<th rowspan="2">bit</th>
|
||||
<th rowspan="2">pack</th>
|
||||
<th rowspan="2">can</th>
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">MCU</td>
|
||||
</tr><tr>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S8962</td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img style="width: 16px; height: 16px;" src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S6965</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LM3S6918</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">i386</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img style="height: 16px; width: 16px;" src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img style="height: 16px; width: 16px;" src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">AT91SAM7X256</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">AT91SAM7X512</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">STR912FAW44</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">LPC2888</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;" ><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">STR711FR2</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">AT32UC3A0512</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_applicable.png" alt="Status: not applicable" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">STM32F103ZE</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr><td style="color: rgb(255, 102, 0);">STM32F103RE</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /> </td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>For some platforms, a number of platform dependent modules are
|
||||
<p>
|
||||
For some platforms, a number of platform dependent modules are
|
||||
implemented (or in the works) and are listed below. To understand the
|
||||
difference between generic modules and platform specific modules, check
|
||||
<a href="arch_overview.html">the eLua architecture page</a>.</p>
|
||||
<a href="arch_overview.html">the eLua architecture page</a>.
|
||||
</p>
|
||||
<table style="width: 620px; margin-bottom: 10px;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -466,12 +609,24 @@ difference between generic modules and platform specific modules, check
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">disp</td>
|
||||
<td>OLED display support</td>
|
||||
<td>EKx-LM3S8962<br>EKx-LM3S6965</td>
|
||||
<td><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
<td>EK-LM3S8962<br>
|
||||
EK-LM3S6965
|
||||
</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: rgb(255, 102, 0);">pio</td>
|
||||
<td>Platform specific PIO support</td>
|
||||
<td>STR-E912<br />
|
||||
STR9-comStick
|
||||
</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p/>
|
||||
<p/>
|
||||
<a name="roadmap" /><h3>Status of features and roadmap</h3>
|
||||
<p>The following table shows the status of some existing and planned <b>eLua</b> features.</p>
|
||||
<table style="text-align: left; width: 620px;" class="table_center">
|
||||
@ -484,15 +639,24 @@ difference between generic modules and platform specific modules, check
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Various Lua examples running properly</td>
|
||||
<td style="text-align: left;" >Embedded HTTP web server</td>
|
||||
<td style="text-align: center;" ><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Various Lua examples and eLua apps running properly</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Choose floating point or integer Lua</td>
|
||||
<td style="text-align: left;">Lua floating point or integer number selection</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">XMODEM transfer over UART</td>
|
||||
<td style="text-align: left;">eLua FP module (for integer Lua)</td>
|
||||
<td style="color: rgb(255, 102, 0); text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">XMODEM protocol support for console file transfer</td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -500,11 +664,19 @@ difference between generic modules and platform specific modules, check
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Terminal / Console over UART and Ethernet</td>
|
||||
<td style="text-align: left;"><a href="fatfs.html">FAT File System layer for mmc/sd cards</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><a href="using.html#rpc">LuaRPC - Remote Procedure Calls</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><a href="using.html#uart">Terminal / Console over UART or Ethernet<a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">eLua command shell</td>
|
||||
<td style="text-align: left;"><a href="using.html#shell">eLua command shell</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -516,37 +688,33 @@ difference between generic modules and platform specific modules, check
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">FAT File System layer for mmc/sd cards</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Minimal R/W file system</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">eLua FP module (for integer Lua)</td>
|
||||
<td style="color: rgb(255, 102, 0); text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" />
|
||||
</td>
|
||||
<td style="text-align: left;"><a href="elua_egc.html">eLua EGC (Emergency Garbage Collection) patch</a></td>
|
||||
<td style="text-align: center;"><img src="images/stat_ok.png" alt="Status: OK" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Embedded text editor</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Embedded help/doc subsystem</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Lua debugging (remote/on target)</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">Host (PC) File Sharing</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">GUI/IDE interface for eLua</td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">GUI eLua build configuration tool<br></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_implemented.png" alt="Status: not implemented" /></td>
|
||||
<td style="text-align: left;">eLua web build service<br></td>
|
||||
<td style="text-align: center;"><img src="images/stat_not_tested.png" alt="Status: not tested" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;" >Embedded HTTP web server</td>
|
||||
<td style="text-align: center;" ><img src="images/stat_ok.png" alt="Status: OK" /></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -6,6 +6,7 @@ skip directly to the OpenOCD script downloads, use the links below.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#str9files">Configuration files for STR9-comStick</a></li>
|
||||
<li><a href="#stre912files">Configuration files for STR-E912</a></li>
|
||||
<li><a href="#lpc2888files">Configuration files for LPC2888</a></li>
|
||||
<li><a href="#str7files">Configuration files for STR7</a></li>
|
||||
</ul>
|
||||
@ -261,7 +262,8 @@ on the subject:</p>
|
||||
<li><a href="http://elua.berlios.de/other/str91x_reset.script">str91x_reset.script</a></li>
|
||||
</ul>
|
||||
|
||||
<p>The <b>comstick.cfg</b> configuration file is for programming the
|
||||
<p>For STR9 I'm using the Yagarto OpenOCD build for Windows (repository
|
||||
version 717, as described at the beginning of this tutorial).The <b>comstick.cfg</b> configuration file is for programming the
|
||||
STR9-comStick. <b>comrst.cfg</b> is for resetting it. The comStick has a very
|
||||
interesting habit: after you power it (via USB) it does not start
|
||||
executing the code from the internal flash, you need to execute OpenOCD
|
||||
@ -272,10 +274,41 @@ generic or it's only relevant to my particular comStick. I suspect that
|
||||
the CPU RESET line isn't properly handled by the on-board USB-to-JTAG
|
||||
converter, and the only solution I have for this is to execute this
|
||||
script everytime you power the board and everytime you need to do a
|
||||
RESET.</p>
|
||||
RESET. To use the programming script, invoke the OpenOCD executable like this:</p>
|
||||
|
||||
<pre><code>openocd-ftd2xx -f comstick.cfg</code></pre>
|
||||
|
||||
<p>(<b>note</b>: under Windows, the OpenOCD executable name is often
|
||||
"openocd-ftd2xx". Under Linux it's simply "openocd". Replace it with
|
||||
the actualy name with your executable).</p>
|
||||
|
||||
<p>Also, be sure to modify <b>str91x_flashprogram.script</b> if your image name is
|
||||
not <b>main.bin</b></p>
|
||||
|
||||
<a name="stre912files" /><h2>Configuration files for STR-E912 (Olimex)</h2>
|
||||
|
||||
<p>Download them below:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://elua.berlios.de/other/str-e912.cfg">str-e912.cfg</a></li>
|
||||
<li><a href="http://elua.berlios.de/other/str91x_flashprogram.script">str91x_flashprogram.script</a></li>
|
||||
</ul>
|
||||
|
||||
<p>For the <a href="http://www.olimex.com/dev/str-e912.html">STR-E912 board</a> I'm using the Yagarto OpenOCD build for Windows (repository
|
||||
version 717, as described at the beginning of this tutorial). As this board doesn't have a built-in USB to JTAG adapter, an external one
|
||||
is needed. The one used by the <b>str-e912.cfg</b> script is the <a href="http://olimex.com/dev/arm-usb-ocd.html">ARM-USB-OCD</a> adapter (also from Olimex).
|
||||
The <b>str-e912.cfg</b> configuration file is for programming the board. To use the programming script, invoke the OpenOCD executable like this:</p>
|
||||
|
||||
<pre><code>openocd-ftd2xx -f str-e912.cfg</code></pre>
|
||||
|
||||
<p>(<b>note</b>: under Windows, the OpenOCD executable name is often
|
||||
"openocd-ftd2xx". Under Linux it's simply "openocd". Replace it with
|
||||
the actualy name with your executable).</p>
|
||||
|
||||
<p>Also, be sure to modify <b>str91x_flashprogram.script</b> if your image name is
|
||||
not <b>main.bin</b></p>
|
||||
|
||||
|
||||
<a name="lpc2888files" /><h2>Configuration files for LPC2888</h2>
|
||||
|
||||
<p>LPC2888 is quite a different animal. I couldn't find any "official"
|
||||
@ -300,7 +333,7 @@ like this:</p>
|
||||
from Olimex, but it should be easy to use the script with any other
|
||||
JTAG adapter (don't forget to change the script to match your adapter).</p>
|
||||
|
||||
<a name="str7files" /><h2>#Configuration files for STR711FR2 (STR7 from ST)</h2>
|
||||
<a name="str7files" /><h2>Configuration files for STR711FR2 (STR7 from ST)</h2>
|
||||
|
||||
<p>Download them below:</p>
|
||||
|
||||
|
@ -1,13 +1,16 @@
|
||||
$$HEADER$$
|
||||
<h3>Using eLua</h3>
|
||||
<p> So, you already <a href="building.html">built</a> and <a href="installing.html">installed</a> <b>eLua</b>, and now it is time to (finally) have some fun with it :)
|
||||
You can compile <b>eLua</b> with either console over UART (by far the most popular) and console over TCP/IP (still experimental, but working quite well), so there are two different usage
|
||||
scenarios for this (see <a href="building.html">building eLua</a> for details on how to select serial or TCP/IP console).</p>
|
||||
<p>So, you already <a href="building.html">built</a> and <a href="installing.html">installed</a>
|
||||
<b>eLua</b>, now it is time to (finally) have some fun with it :)
|
||||
You can compile <b>eLua</b> with either console over UART (the default and by far the most popular)
|
||||
or console over TCP/IP (still experimental, but working quite well). See <a href="building.html">building eLua</a> for details on how to select
|
||||
the second option above.</p>
|
||||
<a name="uart"><h3>Using eLua over serial connections</h3></a>
|
||||
<p>All you need to use <b>eLua</b> over a serial connection is your <b>eLua</b>
|
||||
board connected to a PC running a terminal emulator program.<br>If
|
||||
you're using Windows, I strongly recommend <a href="http://www.ayera.com/teraterm/">TeraTerm</a>.
|
||||
It's a freeware, it's very powerful and also easy to use. The native Hyper Terminal progam can do too, but give TeraTerm a chance, it's much better than HyperTerm IMO.<br>On
|
||||
you're using Windows, we recommend <a href="http://www.ayera.com/teraterm/">TeraTerm</a>.
|
||||
It's a freeware, it's very powerful and also easy to use. The native Hyper Terminal progam can do
|
||||
too, as well as any most other terminal emulator programs.<br>On
|
||||
Linux,
|
||||
you'll probably be stucked with minicom. It is not exactly intuitive
|
||||
and it runs in text mode, but it's still very powerful. If you
|
||||
@ -22,60 +25,74 @@ settings you need to look at:</p>
|
||||
|
||||
<p>Also, depending on the type of your board, you'll need some way to
|
||||
connect the board to a serial port on your PC or to USB if you're
|
||||
using an USB to serial converter. For example, as already explained <a href="installing_lm3s.html">here</a>,
|
||||
using an USB to serial converter. For example (as already explained <a href="installing_lm3s.html">here)</a>,
|
||||
the USB port on the LM3Sxxxx boards is dual, so you can use it as an USB
|
||||
to serial converter after downloading your firmware, thus you don't
|
||||
need any other type of connection. The same is true for the
|
||||
STR9-comStick board. On the other hand, for the SAM7-EX256 board you'll
|
||||
STR9-Comstick board. On the other hand, for the SAM7-EX256 board you'll
|
||||
need to connect a serial cable to the "RS232" connector, provided that
|
||||
the jumpers are already set as explained <a href="installing_at91sam7x.html">here</a> and on the MOD711 you will need to add an RS232 converter chip.
|
||||
There's no universal rule here, it all depends on your board.
|
||||
There's no universal rule here, it all depends on your board. Feel free to
|
||||
ask if you need help in our <a href="https://lists.berlios.de/mailman/listinfo/elua-dev">discussion
|
||||
list</a>
|
||||
</p>
|
||||
<a name="tcpip"><h3>Using eLua over TCP/IP connections</h3></a>
|
||||
<p>Things are even easier if you decide to enable console over TCP/IP:</p>
|
||||
<ul>
|
||||
<li>make sure you know the address of your board. If you enabled static IPs (see <a href="building.html">building</a>) remember what you chose for the static IP; if DHCP is used instead, your
|
||||
DHCP server should've added the address of the <b>eLua</b> board to your DNS. The board name is always "elua", so if you execute "ping elua" from a shell you should see that the board is
|
||||
<li>make sure you know the address of your board. If you enabled static IPs (see <a href="building.html">building</a>) remember what you chose for the static IP; if DHCP
|
||||
(the default) is used instead, your
|
||||
DHCP server should've added the address of the <b>eLua</b> board to your DNS. The board name is always "elua"
|
||||
in our code examples too, so if you execute "ping elua" from a shell you should see that the board is
|
||||
alive.</li>
|
||||
<li>telnet to the address of the board (or simply "telnet elua" if DHCP is used), and you'll be greeted with the shell prompt (if the shell is enabled, see the next paragraph for details).
|
||||
<li>telnet to the address of the board (or simply "telnet elua" if DHCP is used), and you'll be greeted with the shell prompt (if the shell is
|
||||
enabled; see the next paragraph for details).
|
||||
Note that you can only have an active telnet session to the <b>eLua</b> board at a given time.</li>
|
||||
</ul>
|
||||
|
||||
<p>If you're under Windows, make sure you're using a proper telnet client, which basically means "just about everything <b>but</b> the build-in telnet client".
|
||||
<p>If you're under Windows, make sure you're using a proper telnet client, which basically means "just about everything <b>but</b> the
|
||||
built-in telnet client".
|
||||
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> is a very good and popular choice.</p>
|
||||
|
||||
<a name="pc"><h3>Using standalone eLua on PC</h3></a>
|
||||
<p>If you build <b>eLua</b> for the i386 platform, you can boot your PC directly in <b>eLua</b>! No underlying OS, nothing but plain <b>eLua</b>. It won't have any actual peripherals to
|
||||
access, but it can use the <b>term</b> module to run <i>hangman.lua</i> and <i>life.lua</i>, as well as other samples, which makes it a nice demo :) Follow <a href="installing_i386.html">
|
||||
access, but it can use the <b>term</b> module to run <i>hangman.lua</i> and <i>life.lua</i>, as well as other
|
||||
code examples and games, which makes it a nice demo :) Follow <a href="installing_i386.html">
|
||||
this link</a> for specific informations about the i386 port. </p>
|
||||
|
||||
<a name="shell"><h3>The eLua shell</h3></a>
|
||||
<p>No matter what's your physical connection (serial, TCP/IP or you PC's monitor after booting <b>eLua</b>), after you setup the PC-<b>eLua</b> board connection (if applicable) and press
|
||||
<p>No matter what's your physical connection (serial, TCP/IP or you PC's monitor after booting <b>eLua</b>), after you setup the PC-<b>eLua</b> board connection and press
|
||||
the "RESET" button on your board or simply press ENTER if you're using the serial connection, you should see the <b>eLua</b> shell prompt (if you enabled the shell in your build, as described <a href="building.html">here</a>). The shell is a simple
|
||||
interactive command interpreter that allows you to:</p>
|
||||
<ul>
|
||||
<li>get help on shell usage with the help command</li>
|
||||
<li>query the eLua version running on your platform</li>
|
||||
<li>upload a Lua source file via XMODEM and execute in on board</li>
|
||||
<li>run the Lua interpreter in interactive mode just like you'd do on a desktop machine</li>
|
||||
<li>run a Lua program from the eLua File System</li>
|
||||
<li>upload a Lua source file via XMODEM and execute in on board</li>
|
||||
<li>query the eLua version</li>
|
||||
<li>list files on eLua file systems</li>
|
||||
<li>list file names and sizes on eLua file systems</li>
|
||||
<li>print contents from a (text) file in the eLua File System</li>
|
||||
<li>list file contents</li>
|
||||
</ul>
|
||||
<p>A detailed description of all the shell commands is given below.</p>
|
||||
<p>A detailed description of the current shell commands is given below.</p>
|
||||
|
||||
<h2>help</h2>
|
||||
<p>Show a list of all shell commands.</p>
|
||||
<pre><code>$ help</code></pre>
|
||||
|
||||
<h2>ver</h2>
|
||||
<p>Print the version of the <b>eLua</b> image installed on the board. Currently, the version only increments for official releases, so if there's inter-release code in the
|
||||
development tree, this isn't reflected in the version number.</p>
|
||||
<h2>recv</h2>
|
||||
<pre><code>$ ver</code></pre>
|
||||
|
||||
<p>Allows you to receive a Lua file (either source or compiled bytecode) via
|
||||
XMODEM and execute it on your board. To use this, your <b>eLua</b> target image must be built with support for XMODEM
|
||||
(see <a href="building.html">building</a> for details).Also, your terminal emulation program must
|
||||
<h2>recv</h2>
|
||||
<p>Allows you to receive from the PC running the terminal emulator program, a Lua file (either source or compiled bytecode) via
|
||||
XMODEM and execute it on your board.</p>
|
||||
<pre><code>$ recv</code></pre>
|
||||
<p>To use this, your <b>eLua</b> target image must be built with support for XMODEM
|
||||
(see <a href="building.html">building</a> for details). Also, your terminal emulation program must
|
||||
support sending files via the XMODEM protocol. Both XMODEM with checksum and XMODEM with CRC are supported, but only XMODEM with 128
|
||||
byte packets is allowed (XMODEM with 1K packets won't work).
|
||||
To use this feature, enter "recv" at the shell prompt. eLua will respond with
|
||||
To use this feature, enter "recv" at the shell prompt. <b>eLua</b> will respond with
|
||||
"Waiting for file ...". At this point you can send the file to the eLua board
|
||||
via XMODEM. eLua will receive and execute the file. Don't worry when you see 'C'
|
||||
characters suddenly appearing on your terminal after you enter this command,
|
||||
@ -85,32 +102,50 @@ If you'd like to send compiled bytecode to <b>eLua</b> instead of source code, p
|
||||
</p>
|
||||
|
||||
<h2>lua</h2>
|
||||
|
||||
<p>This allows you to start the Lua interpreter, optionally passing command line parameters, just
|
||||
as you would do from a desktop machine. The command has some
|
||||
restrictions:</p>
|
||||
|
||||
<ul><li>the command line can't be longer than 50 chars</li>
|
||||
<p>This command allows you to start the Lua interpreter, optionally passing command line parameters, just
|
||||
as you would do from a desktop machine.</p>
|
||||
<pre><code>$ lua</code></pre>
|
||||
<p> There are some diferences from the the Lua in desktop version:</p>
|
||||
<ul>
|
||||
<li>the command line can't be longer than 50 chars</li>
|
||||
<li>character escaping is not implemented. For example, the next command won't work
|
||||
because of the ' (simple quotes) escape sequences:
|
||||
|
||||
<pre><code>eLua# lua -e 'print(\'Hello, World!\')' -i
|
||||
<pre>
|
||||
<code>eLua# lua -e 'print(\'Hello, World!\')' -i
|
||||
Press CTRL+Z to exit Lua
|
||||
lua: (command line):1: unexpected symbol near ''</code></pre>
|
||||
|
||||
<p>However, if you use both '' (simple quotes) and "" (double quotes) for string quotin , it will work:</p>
|
||||
|
||||
<pre><code>eLua# lua -e 'print("Hello, World")' -i
|
||||
lua: (command line):1: unexpected symbol near ''
|
||||
</code>
|
||||
</pre>
|
||||
<p>However, if you use both '' (simple quotes) and "" (double quotes) for string quoting, it will work:</p>
|
||||
<pre>
|
||||
<code>eLua# lua -e 'print("Hello, World")' -i
|
||||
Press CTRL+Z to exit Lua
|
||||
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
|
||||
Hello,World</code></pre></li></ul>
|
||||
<p>If you want to execute a file from the <a href="arch_romfs.html">ROM file system</a>, remember to prefix it with <i>/rom</i>. For example, to execute <b>hello.lua</b>, do this:</p>
|
||||
Hello,World
|
||||
</code>
|
||||
</pre></li>
|
||||
<li>
|
||||
If you want to execute a file from the <a href="arch_romfs.html">ROM file system</a> (or from another file system), remember to prefix it with <i>/rom</i>. For example, to execute <b>hello.lua</b>, do this:
|
||||
<pre><code>$ lua /rom/hello.lua</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>ls or dir</h2>
|
||||
<p>Shows a list of all the files in the filesystems used by <b>eLua</b> (currently only the ROM file system), as well as their size and the total size of the given file system.</p>
|
||||
<p>Shows a list of all the files in the file systems used by <b>eLua</b>, as well as their size and the total size of the given file system.</p>
|
||||
<pre><code>$ ls
|
||||
$ dir
|
||||
</code></pre>
|
||||
|
||||
<h2>cat or type</h2>
|
||||
<p>Prints the content of (usually text) files on the console.</p>
|
||||
<pre><code>$ cat <i>filename1</i> [<i>filename2 filename3 ...</i>]
|
||||
$ type <i>filename1</i> [<i>filename2 filename3 ...</i>]</code></pre>
|
||||
|
||||
<h2>exit</h2>
|
||||
<p>Exits the shell. This only makes sense if <b>eLua</b> is compiled with terminal support over TCP/IP , as it closes the telnet session to the <b>eLua</b> board. Otherwise it just
|
||||
terminates the shell and blocks forever until you reset your board.</p>
|
||||
<pre><code>$ exit</code></pre>
|
||||
|
||||
<a name="cross"><h3>Cross-compiling your eLua programs</h3></a>
|
||||
<p><i>Cross-compilation</i> is the process of compiling a program on one hardware platform for a
|
||||
different hardware platform. For example, the process of compiling the <b>eLua</b> binary image on
|
||||
@ -207,6 +242,107 @@ You can omit the <i>-s</i> (strip) parameter from compilation, but this will res
|
||||
<ul>
|
||||
<li>write it to <a href="arch_romfs.html">the ROM file system</a> and execute it from there.</li>
|
||||
<li>use the <i>recv</i> command from <a href="using.html#shell">the shell</a> to upload it to the board using a serial connection.</li>
|
||||
<li>write it to an sd/mmc card and, if your board supports it, execute it
|
||||
from there.</li>
|
||||
</ul>
|
||||
|
||||
<a name="rpc"><h3>Controlling eLua with LuaRPC</h3></a>
|
||||
<p><i>Remote procedure calls</i> (RPC) allow one program to communicate with another and call functions or subroutines within the second program. For example one might want to programmatically control an array of LEDs connected to an eLua embedded device from a desktop Lua state. A simple implementation might be a protocol that would allow one to send commands numeric or text-based commands that would cause code to be executed in eLua that would change the state of the LEDs. As one needs new commands to change these LEDs, one would need to upload a new Lua program to handle changing functionality. In contrast to this ad-hoc method for remote calls, LuaRPC provides a more general way to manipulate the state and execution of a remote Lua environment.</p>
|
||||
<p>When a client is connected to a LuaRPC server, it can interact with it in the following ways:</p>
|
||||
<ul>
|
||||
<li>assign values to new or existing variables in the server state</li>
|
||||
<li>get values from variables in the server state</li>
|
||||
<li>call functions to be executed on the server side using parameters of serializable types, with return values being sent back to the client</li>
|
||||
<li>create local userdata helpers (aliases) which provide short-hand access to remote state</li>
|
||||
</ul>
|
||||
|
||||
<h2>Building the Desktop Client/Server</h2>
|
||||
<ul>
|
||||
<li>first, make sure that your PC has already a build system installed (gcc,
|
||||
binutils, libc, headers...). You'll also need scons. The good news is that
|
||||
you should have it already installed, since otherwise you won't be able to
|
||||
build even regular <b>eLua</b> (see <a href="building.html">building</a> for more in-depth instructions).</li>
|
||||
<li>from the <b>eLua</b> base directory, issue this command:
|
||||
<pre><code>$ scons -f rpc-lua.py</code></pre></li>
|
||||
</ul>
|
||||
<p>You should get a file called <i>luarpc</i> in the same directory which, when started, should give you a normal Lua interpreter with a built-in rpc module.</p>
|
||||
|
||||
<h2>Building eLua with RPC Boot</h2>
|
||||
|
||||
<p>See <a href="building.html">building</a> for details and requirements for the building process. In order to boot into RPC mode, the RPC <a href="building.html#components">component</a> will need to be enabled, and appropriate <a href="building.html#static">static configuration data</a> need to be set. To build <b>eLua</b> to boot into RPC mode, include <b>boot=rpc</b> in the <a href="building.html#buildoptions">build options</a>.</p>
|
||||
|
||||
|
||||
<h2>LuaRPC Basics</h2>
|
||||
<p>In terms of the LED example from the beginning of this section, one could directly call pio module functions from the desktop side, experimenting with responses. If the experimentation developed into a program this could be tested both on the desktop side and on the microcontroller by making aliases to eLua modules in local Lua state. Such aliasing can be done as follows:</p>
|
||||
<pre><code>-- open connection from Linux host serial port to eLua
|
||||
slave,err = rpc.connect("/dev/ttyUSB0")
|
||||
|
||||
-- make a local helper pointing to pio module in eLua
|
||||
pio = slave.pio
|
||||
|
||||
-- define function to set direction and value of port B
|
||||
function set_port_val(val)
|
||||
pio.port.setdir( pio.OUTPUT, pio.PB )
|
||||
pio.port.setval( val, pio.PB )
|
||||
end
|
||||
|
||||
set_port_val(23)</pre></code>
|
||||
<p>When we run this locally, calling and indexing helpers are translated into appropriate actions on the server. If we were done with modifications to the above function and wanted it to execute in eLua rather than using local aliases, which will result in a great deal of RPC traffic every time the function is called, we can send the function to the remote side:</p>
|
||||
<pre><code>-- cross-compile local chunk for function and send to server
|
||||
slave.set_port_val = set_port_val
|
||||
|
||||
-- call function on server device
|
||||
slave.set_port_val(23)</pre></code>
|
||||
|
||||
<p>In addition to functions, we can also copy most other Lua types from client to server using simple assignment. Due to Lua's internal workings the opposite operation of copying Lua types from server to client requires an additional metamethod:</p>
|
||||
<pre><code>-- make table on remote server
|
||||
slave.remote_table = {}
|
||||
|
||||
-- put data in table
|
||||
slave.remote_table.rval = 42
|
||||
|
||||
-- get data back from server, print
|
||||
local_table = slave.remote_table:get()
|
||||
print(local_table.rval)</pre></code>
|
||||
|
||||
<p>While these examples are trivial, they serve to illustrate a compelling development paradigm that gives one a great deal of flexibility for development and testing with an embedded target.</p>
|
||||
|
||||
<h2>Serializable Lua Types</h2>
|
||||
<p>Most Lua types can be transferred between the client and server states. The following list indicates which ones can be transferred, and where there are known exceptions:</p>
|
||||
|
||||
<table style="text-align: left;" class="table_center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left;">Serializable Types</th>
|
||||
<th style="text-align: center;">Exceptions and Notes</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>numbers</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>strings</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>booleans</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tables</td>
|
||||
<td>no circular references</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>functions</td>
|
||||
<td>no upvalues</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nil</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
$$FOOTER$$
|
||||
|
||||
|
@ -10,20 +10,18 @@ $$HEADER$$
|
||||
<th style="text-align: center;">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="color: rgb(255, 102, 0);">##TODO</td>
|
||||
<td align="center">##TODO.11.2009</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Added support for STR-E912 board</li>
|
||||
<li>Examples extended to support STR-E912 board</li>
|
||||
<li>Doc/site content enhancements</li>
|
||||
<li>More PT content</li>
|
||||
<li>Platform Specific PIO module added to support STR9 goodies</li>
|
||||
<li>Added the Lua EGC (Emergency Garbage Collection) patch</li>
|
||||
<li>(Added initial support for generic interrupt handling)</li>
|
||||
<li>(Added support for NXP)</li>
|
||||
<li>(##Added support for FAT FS on SD/MMC Cards## {may not come in the
|
||||
next minor release yet})</li>
|
||||
<td align="center" style="color: rgb(255, 102, 0);">0.7</td>
|
||||
<td align="center">??.??.20??</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Added the <a href="http://lua-users.org/wiki/EmergencyGarbageCollector">Lua EGC</a> (Emergency Garbage Collection) patch</li>
|
||||
<li>Added generic and portable SD/MMC Card FAT File System support</li>
|
||||
<li>Added <a href="http://fanplastic.org/2009/05/11/lua-rpc/">LuaRPC</a> support. Remote procedure calls in the embedded world</li>
|
||||
<li>New eLua shell cat/type command, lists text file contents</li>
|
||||
<li>Added support for <a href="http://www.olimex.com/dev/str-e912.html">Olimex STR-E912</a> board, ST Electronics STR912FW44X MCU</li>
|
||||
<li>Added support for the <a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">PUC-Rio eLua</a> board, NXP LPC2468 MCU</li>
|
||||
<li>More portuguese content translations</li>
|
||||
<li>ADC module and doc enhancements</li>
|
||||
</ul>
|
||||
</td>
|
||||
<tr>
|
||||
@ -36,6 +34,7 @@ $$HEADER$$
|
||||
<li>Documentation available offline</li>
|
||||
<li>Added support for AVR32 CPUs</li>
|
||||
<li>Added support for STM32 Cortex-M3 CPUs</li>
|
||||
<li>Added support for LM3S9Bxx Cortex-M2 CPUs</li>
|
||||
<li>Added ADC module with support for moving average filters</li>
|
||||
<li>Added support for multiple toolchains</li>
|
||||
<li>Added an ls (or dir) shell command</li>
|
||||
|
BIN
doc/images/barlineleft.png
Executable file → Normal file
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 97 B |
BIN
doc/images/barlineright.png
Executable file → Normal file
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 95 B |
BIN
doc/images/blank.png
Executable file → Normal file
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 66 KiB |
BIN
doc/images/flashmagic.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
doc/images/ft_prog_power.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
doc/images/ft_prog_strings.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
doc/images/hideall.png
Executable file → Normal file
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 101 B |
BIN
doc/images/hideall_over.png
Executable file → Normal file
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 123 B |
BIN
doc/images/lng_en.png
Executable file → Normal file
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 116 B |
BIN
doc/images/lng_en_over.png
Executable file → Normal file
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 143 B |
BIN
doc/images/lng_es.png
Executable file → Normal file
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 121 B |
BIN
doc/images/lng_es_over.png
Executable file → Normal file
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 136 B |
BIN
doc/images/lng_pt.png
Executable file → Normal file
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 117 B |
BIN
doc/images/lng_pt_over.png
Executable file → Normal file
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 132 B |
BIN
doc/images/minusnode.png
Executable file → Normal file
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 121 B |
BIN
doc/images/minusnodelast.png
Executable file → Normal file
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 121 B |
BIN
doc/images/next.png
Executable file → Normal file
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 150 B |
BIN
doc/images/next_over.png
Executable file → Normal file
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 157 B |
BIN
doc/images/node.png
Executable file → Normal file
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 97 B |
BIN
doc/images/nodelast.png
Executable file → Normal file
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 96 B |
BIN
doc/images/plusnode.png
Executable file → Normal file
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 125 B |
BIN
doc/images/plusnodelast.png
Executable file → Normal file
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 125 B |
BIN
doc/images/previous.png
Executable file → Normal file
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 151 B |
BIN
doc/images/previous_over.png
Executable file → Normal file
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 156 B |
BIN
doc/images/sepblank.png
Executable file → Normal file
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 83 B |
BIN
doc/images/sepnode.png
Executable file → Normal file
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 109 B |
BIN
doc/images/sepvertline.png
Executable file → Normal file
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 92 B |
BIN
doc/images/showall.png
Executable file → Normal file
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 112 B |
BIN
doc/images/showall_over.png
Executable file → Normal file
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 765 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 589 B |
BIN
doc/images/sync.png
Executable file → Normal file
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 162 B |
BIN
doc/images/sync_over.png
Executable file → Normal file
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 166 B |
BIN
doc/images/title_background.png
Executable file → Normal file
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 39 KiB |
BIN
doc/images/vertline.png
Executable file → Normal file
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 92 B |
BIN
doc/images/webbook.png
Executable file → Normal file
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 352 B |
BIN
doc/images/webbook_over.png
Executable file → Normal file
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 359 B |
36
doc/pt/building_unix.html
Normal file
@ -0,0 +1,36 @@
|
||||
$$HEADER$$
|
||||
<h3>Building eLua in Linux</h3>
|
||||
<p>Building <b>eLua</b> in Linux is fairly easy. This tutorial assumes that Ubuntu is used for building, however any distro should be fine, you just need to
|
||||
convert the "apt-get" calls to your distro's package manager equivalent. You need a few packages installed to build <b>eLua</b>:</p>
|
||||
<ul>
|
||||
<li><b>a toolchain</b>: check <a href="toolchains.html">the toolchains page</a> for
|
||||
toolchain instructions. Please note that even if you already have a
|
||||
compiled toolchain, the differences in the Newlib configure flags
|
||||
(mainly the --disable-newlib-supplied-syscalls flags) might prevent <b>eLua</b>
|
||||
for building properly on your machine.</li>
|
||||
<li><b>Python</b> : it should be already installed. If it's not, use
|
||||
apt-get to install it:
|
||||
<pre><code>$ sudo apt-get install python</code></pre>
|
||||
</li>
|
||||
<li><b>scons</b> - <b>eLua</b> uses scons instead of make
|
||||
and makefiles, because we find scons much more "natural" and easier to
|
||||
use than make. To install it:
|
||||
<pre><code>$ sudo apt-get install scons</code></pre>
|
||||
</li>
|
||||
<li>your toolchain's "bin" directory (this is generally
|
||||
something like /usr/local/cross-arm/bin, where /usr/local/cross-arm is
|
||||
the directory in which you installed your toolchain) must be in $PATH.
|
||||
</li>
|
||||
<li>if you're building for the i386 platform, you'll also need
|
||||
"nasm":
|
||||
<pre><code>$ sudo apt-get install nasm</code></pre>
|
||||
</li>
|
||||
<li><b>gcc</b>: if you want to use the ROMFS precompile feature (see <a href="arch_romfs.html#mode">here</a> for details) you need to build an image of the <b>eLua</b> cross compiler, and you need an i386
|
||||
toolchain for this. It should be already installed, but if you want to be on the safe side do this:
|
||||
<pre><code>sudo apt-get install build-essential</code></pre>
|
||||
Then build the <b>eLua</b> cross compiler by executing this command:
|
||||
<pre><code>scons -f cross-lua.py</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>After you setup your build environment as described above, follow <a href="building.html#configuring">this tutorial</a> to build your <b>eLua</b> image.</p>
|
||||
$$FOOTER$$
|
35
doc/pt/building_win.html
Normal file
@ -0,0 +1,35 @@
|
||||
$$HEADER$$
|
||||
<h3>Building eLua in Windows</h3>
|
||||
<p>Starting with version 0.7, building <b>eLua</b> in Windows is officialy supported. The following instructions were tested in Windows 7 Professional, but they
|
||||
should work with little or no modification in any version of Windows 7, Vista or XP. You need to download and install a few things first:</p>
|
||||
<ul>
|
||||
<li><b>a toolchain</b>: building a GCC-based toolchain under Windows is possible, but not easy. We found that the easiest thing to do is to download a pre-built toolchain
|
||||
and install it. Currently, all the targets supported by <b>eLua</b> (except i386) have at least one toolchain that runs under Windows:
|
||||
<ul>
|
||||
<li>For ARM7, ARM9 and Cortex-M3 targets, you can download and install the CodeSourcery Lite Edition (supported by <b>eLua</b> out of the box) from
|
||||
<a href="http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite">here</a>. For reference, the version used in this tutorial is
|
||||
"Sourcery G++ Lite 2009q3-68 for ARM EABI". Future (and some previous) versions of this toolchain should also work. Remember to specify
|
||||
<code>toolchain=codesourcery</code> when using this toolchain (see <a href="building.html#buildoptions">here</a> for details).</li>
|
||||
<li>AVR32 has its own Windows based GNU toolchain that can be downloaded from Atmel <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4118">here</a>.</li>
|
||||
</ul></li>
|
||||
<li><b>Python</b>: my favourite Windows distribution of Python is <a href="http://www.activestate.com/activepython/">ActivePython</a>. Simply download it and install it. ActivePython
|
||||
2.6.4.8 will be used in this tutorial. Other Python distribution might work equally well.</li>
|
||||
<li><b>scons</b>: download the Windows installer package from <a href="http://www.scons.org/download.php">here</a>. For this tutorial, scons 1.2.0 will be used. Remember to install
|
||||
scons <b>after</b> you install Python. </li>
|
||||
<li><b>lua</b>: a very good and versatile Lua distribution for Windows is "Lua for Windows", it can be downloaded from <a href="http://luaforwindows.luaforge.net/">here</a>. Besides
|
||||
Lua itself, it includes a lot of very useful Lua modules, so I highly recommend it. Version 5.1.4.30 of Lua for Windows will be used in this tutorial.</li>
|
||||
<li><b>svn</b>: if you need to checkout the <b>eLua</b> source code from the SVN repository, you need to install SVN for windows. There are a few precompiled SVN packages for
|
||||
Windows available, I'm using the Tigris binaries that can be downloaded from <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100">here</a>. In this
|
||||
tutorial I'll use version 1.6.6. If you require developer access (svn+ssh), additional steps are needed to make "svn+ssh" work in Windows. A lot of tutorials
|
||||
that cover this topic are available, check for example <a href="http://agateau.wordpress.com/2007/07/03/windows-svnssh-and-the-subversion-command-line-client/">this one</a>.</li>
|
||||
<li><b>gcc</b>: if you want to use the ROMFS precompile feature (see <a href="arch_romfs.html#mode">here</a> for details) you need to build an image of the <b>eLua</b> cross compiler, and you need an i386
|
||||
toolchain for this. I'm using MinGW for this task, it can be downloaded from <a href="http://www.mingw.org/">here</a>. This tutorial uses MinGW version 5.1.6. Note that you
|
||||
don't need to install MSYS, MinGW should be enough. Cygwin should work equally well, or even Microsoft's Visual Studio (not tested). To build the cross compiler, run
|
||||
this command from the command line:
|
||||
<pre><code>scons -f cross-lua.py</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Make sure that all the programs listed above are added to %PATH%. Most of them do this automatically, or have an option to do this automatically, but some
|
||||
(for example MinGW) do not and you need to add them to %PATH% manually.</p>
|
||||
<p>After you setup your build environment as described above, follow <a href="building.html#configuring">this tutorial</a> to build your <b>eLua</b> image.</p>
|
||||
$$FOOTER$$
|
@ -27,7 +27,7 @@ contribuidores:</p>
|
||||
<li>Everson Denis and Flávio Nogueira - Tradução para português do site e
|
||||
da documentação</li>
|
||||
<li>Fréderic Thomas - Site hosting, melhorias para LM3S</li>
|
||||
<li>James Snyder - Módulos ADC, CAN, LuaRPC (<a href="http://q12.org/lua/index.html">originalmente por Russell Smith</a>), testes</li>
|
||||
<li>James Snyder - Módulos ADC, CAN, LuaRPC (<a href="http://q12.org/lua/index.html">originalmente por Russell Smith</a>), CSS do menu da doc/site, testes, ...</li>
|
||||
<li>Mike Panetta - Suporte a STM32</li>
|
||||
<li>Pedro Bittencourt - Módulo para display RIT OLED para LM3S, <a href="http://code.google.com/p/vhews/">VHeHS</a>, Testes</li>
|
||||
<li>Raul Nunes - Sustentabilidade e o apoio fundamental da <a href="http://www.puc-rio.br">PUC-Rio</a>.</li>
|
||||
|
38
doc/pt/elua_egc.html
Normal file
@ -0,0 +1,38 @@
|
||||
$$HEADER$$
|
||||
<h3>Using the EGC patch with eLua</h3>
|
||||
<p>The EGC (Emergency Garbage Collector) patch is a patch written originally for Lua by Robert Jakabosky, who was kind enough to port it to <b>eLua</b>. You can find the author's detailed
|
||||
description of the patch <a href="http://lua-users.org/wiki/EmergencyGarbageCollector">here</a>. In short, what it does is that it lets you run a garbage collection cycle in Lua in a low memory
|
||||
situation, from inside Lua's memory allocation function (something that the current version of Lua can't do out of the box). By forcing a garbage collection cycle, Lua can reclaim memory that's
|
||||
not in use anymore, thus making more memory available for your program. The downside is reduced execution speed, as a direct result of running the gargabe collector when needed. For some
|
||||
applications, reducing the execution speed to fit the application in memory might be acceptable, and for other applications it might not. As usual, it all depends on your application. As a generic
|
||||
guideline, if your application isn't concerned with realtime processing, you should be fine with sacrifing execution speed to get more memory in many real life scenarios.</p>
|
||||
<p>In <b>eLua</b>, the EGC patch can be configured to run in 4 different modes:</p>
|
||||
<ol>
|
||||
<li><b>disabled</b>: EGC inactive, no collection cycle will be forced in low memory situations.</li>
|
||||
<li><b>run on allocation failure</b>: try to allocate a new block of memory, and run the garbage collector if the allocation fails. If the allocation fails even after running the garbage
|
||||
collector, the allocator will return with error. </li>
|
||||
<li><b>run on memory limit</b>: run the garbage collector when the memory used by the Lua script goes beyond an upper limit. If the upper limit can't be satisfied even after running
|
||||
the garbage collector, the allocator will return with error.</li>
|
||||
<li><b>run before each allocation</b>: run the garbage collector before each memory allocation. If the allocation fails even after running the garbage collector, the allocator will
|
||||
return with error. This mode is very efficient with regards to memory savings, but it's also the slowest.</li>
|
||||
</ol>
|
||||
<p><b>eLua</b> lets you use any of the above modes, or combine modes 2-4 above as needed. The C code API for EGC interfacing is defined in <i>src/lua/legc.h</i>, shown partially below:</p>
|
||||
<p><pre><code>// EGC operations modes
|
||||
#define EGC_NOT_ACTIVE 0 // EGC disabled
|
||||
#define EGC_ON_ALLOC_FAILURE 1 // run EGC on allocation failure
|
||||
#define EGC_ON_MEM_LIMIT 2 // run EGC when an upper memory limit is hit
|
||||
#define EGC_ALWAYS 4 // always run EGC before an allocation
|
||||
|
||||
void legc_set_mode(lua_State *L, int mode, unsigned limit);</code></pre></p>
|
||||
<p>To set the EGC operation mode, call <i>legc_set_mode</i> above with 3 parameters:</p>
|
||||
<ul>
|
||||
<li><b>L</b>: a pointer to a Lua state structure.</li>
|
||||
<li><b>mode</b>: EGC operation mode, as described by the <b>#define</b> section above. You can specifiy a single mode, or a bitwise OR combination between <b>EGC_ON_ALLOC_FAILURE</b>,
|
||||
<b>EGC_ON_MEM_LIMIT</b> and <b>EGC_ALWAYS</b>.</li>
|
||||
<li><b>memlimit</b>: the upper memory limit used by the <b>EGC_ON_MEM_LIMIT</b> mode. Must be higher than 0 for this mode to run properly, can be 0 for any other mode.</li>
|
||||
</ul>
|
||||
|
||||
<p>The functionality of this C function is mirrored by the <b>elua</b> generic module <b>egc_setup</b> function, see <a href="refman_gen_elua.html#elua.egc_setup">here</a> for more details.
|
||||
Also, see <a href="building.html#static">here</a> for details on how to configure the default (compile time) EGC behaviour.</p>
|
||||
$$FOOTER$$
|
||||
|
20
doc/pt/fatfs.html
Normal file
@ -0,0 +1,20 @@
|
||||
$$HEADER$$
|
||||
<h3>The FAT file system</h3>
|
||||
<p>The FAT file system implementation in <b>eLua</b> uses Elm Chan's excellent FatFS package, available <a href="http://elm-chan.org/fsw/ff/00index_e.html">here</a>. It can handle FAT12, FAT16
|
||||
and FAT32 file systems in read/write mode, and it packs a lot of functionality in a low footprint. Like the ROM filesystem it is integrated with the C library, so similar POSIX file manipulation will work in addition to accessing the filesystem via the Lua <b>io</b> module. <b>eLua</b> adds a platform abstraction layer on top of FatFS which makes it very easy to
|
||||
port the FAT file system implementation between different <b>eLua</b> targets. Since most SD/MMC cards can be accessed using the very common SPI interface, and since <b>eLua</b> already provides
|
||||
a <a href="arch_platform_spi.html">SPI platform interface</a>, porting the FAT file system to an <b>eLua</b> board is a fairly simple process.</p>
|
||||
<p>To use the FAT file system on your <b>elua</b> board (that has the proper hardware to access SD/MMC cards), first make sure that there is a working implementation of the
|
||||
<a href="arch_platform_spi.html">eLua SPI platform interface</a> on your platform (as currently <b>eLua</b> can access SD/MMC cards only via SPI). Then you need to enable the FAT file system module (MMCFS)
|
||||
in your <b>eLua</b> binary image, as described on the <a href="building.html">building page</a>.</p>
|
||||
<h2>Using the FAT file system</h2>
|
||||
<p>To use the FAT filesystem with an SD or MMC card, first ensure that the card has been properly formatted as a FAT filesystem (many come preformatted with this file system).</p>
|
||||
<p>Next, connect the card to your board such that the SD card's DAT3/CS PIN is connected to the CS pin you selected in the building section. In addition, for the selected SPI port, the controller's SPI DO pin should be connected the the card's CMD/DI pin, the SPI DI pin should be connected to the card's DAT0/DO pin, and the SPI SCLK should connect to the cards CLK pin. For more more information, see Elm Chan's page on <a href="http://elm-chan.org/docs/mmc/mmc_e.html">SD/MMC with SPI</a>.</p>
|
||||
|
||||
<p>Once configured, connected, and <b>eLua</b> has started up, you are ready to work with the files on your card. To open a file on the SD/MMC card, all you need to do is to prefix its name with <i>/mmc/</i>, like this:</p>
|
||||
<p><pre><code># lua /mmc/info.lua </code></pre></p>
|
||||
<p>Similarly, if you wanted to access a text file <b>a.txt</b> from your card, you could use fopen like this:</p>
|
||||
<p><pre><code>f = fopen( "/mmc/a.txt", "rb" )</code></pre></p>
|
||||
$$FOOTER$$
|
||||
|
||||
|
10
doc/pt/filesystems.html
Normal file
@ -0,0 +1,10 @@
|
||||
$$HEADER$$
|
||||
<h3>eLua file systems</h3>
|
||||
<p>You can compile and use more than one file system in <b>eLua</b>, as listed below:</p>
|
||||
<ul>
|
||||
<li><b>the ROM file system</b>: a very simple, very low footprint read-only file system that can be included in the <b>eLua</b> binary image. Check <a href="arch_romfs.html">here</a> for details.</li>
|
||||
<li><b>the FAT file system</b>: a read-write FAT filesystem implementation (platform independent) that can currently be used with SD/MMC memory cards. Check <a href="fatfs.html">here</a> for
|
||||
details. <b>(new in 0.7)</b></li>
|
||||
</ul>
|
||||
$$FOOTER$$
|
||||
|
55
doc/pt/installing_lpc2468.html
Normal file
@ -0,0 +1,55 @@
|
||||
$$HEADER$$
|
||||
<h3>Installing <b>eLua</b> on the LPC2468 CPU from NXP</h3>
|
||||
<p>The <a href="http://ics.nxp.com/products/lpc2000/lpc24xx/">LPC2468 CPU</a> from <a href="http://www.nxp.com">NXP</a> is one of the CPUs on which <b>eLua</b> is very happy to run, because of its
|
||||
very generous resources: 512k of Flash and 96k of SRAM on-chip memory, loads of peripherals, up to 72MHz operating frequency, external memory bus and other goodies. <b>eLua</b> is so happy with
|
||||
this chip, in fact, that a board designed specifically for <b>eLua</b> was built around it. You can find the full specifications of the board
|
||||
<a href="http://www.giga.puc-rio.br/site/embedded/eluademoboard">here</a>. This is the board that we're going to use in this tutorial.</p>
|
||||
<h3>Prerequisites</h3>
|
||||
<p>Before you'll be able to use <b>eLua</b> on the LPC2468 CPU, make sure that:</p>
|
||||
<ul>
|
||||
<li>you're using Windows. Using this board under Linux or other operating systems should be possible, but we're going to cover only Windows here.</li>
|
||||
<li>you downloaded the latest FTDI VCP drivers from <a href="http://www.ftdichip.com/Drivers/VCP.htm">here</a>.</li>
|
||||
<li>you downloaded and installed the FTDI FT_PROG tool from <a href="http://www.ftdichip.com/Resources/Utilities.htm">here</a>.</li>
|
||||
<li>you downloaded and installed the Flash Magic programming software from <a href="http://www.flashmagictool.com/">here</a>.</li>
|
||||
<li>you already have your <b>eLua</b> image for the LPC2468 CPU (<a href="building.html">built</a> or <a href="downloads.html">downloaded</a>).</li>
|
||||
</ul>
|
||||
<h3>Burning <b>eLua</b> to the LPC2468 using the Flash Magic software</h3>
|
||||
<p>Before actually downloading the <b>eLua</b> image to the CPU, the board must be configured for proper USB operation (note that this should be done only once, not everytime you need to program
|
||||
a new <b>eLua</b> image). The steps for this procedure are listed below:</p>
|
||||
<ol>
|
||||
<li>make sure that jumper JP1 on the board is set to position "USB" (2-3) if you want to power your board from the USB bus.</li>
|
||||
<li>connect your board to the PC using an USB cable.</li>
|
||||
<li>if needed, install the FTDI drivers you downloaded earlier.</li>
|
||||
<li>once the drivers are properly installed, start the FTDI FT_PROG software downloaded earlier and choose "Devices", "Scan and Parse". If everything is OK, your device should show up in the
|
||||
left part of the FT_PROG window, under "Device Tree".</li>
|
||||
<li>in "Device Tree", select "USB_Config_Descriptor", then enter "500" in the "Max Bus Power" field in the upper right part of the FT_PROG window. It should look like below:
|
||||
<img src="images/ft_prog_power.png" alt="FT_PROG power settings" style="margin-top: 10px;" />
|
||||
</li>
|
||||
<li><b>(optional)</b> now it's a good time to give your <b>eLua</b> board a good description :) In "Device Tree", select "USB_String_Descriptors", then enter "eluaproject.net" in the
|
||||
"Manufacturer" field in the upper right part of the FT_PROG window, and "eLua demo board" in the "Product Description" field. It should look like below:
|
||||
<img src="images/ft_prog_strings.png" alt="FT_PROG strings" style="margin-top: 10px;" />
|
||||
</li>
|
||||
<li>choose "Devices", "Program". The new settings will be written to the FTDI chip internal memory, and the board will automatically re-enumerate.</li>
|
||||
</ol>
|
||||
<p>Once your board is properly configured (remember, you only need to do this ONCE!), follow the next steps to program your <b>eLua</b> image to the board as many times as you need to:</p>
|
||||
<ol>
|
||||
<li>make sure that jumper JP1 on the board is set to position "USB" (2-3) if you want to power your board from the USB bus.</li>
|
||||
<li>make sure that JP2 (ISP), JP3 (RST), JP6 (RDX0) and JP7 (TDX0) are connected on the board.</li>
|
||||
<li>connect the board to the PC using an USB cable.</li>
|
||||
<li>find the serial port used by the board. Open "Device Manager" in Windows, go to "Ports (COM & LPT)" and look for a serial port named "USB serial port" or something similar. If unsure,
|
||||
simply unplug the board. The serial port that disappears from the list after unplugging the board is your board's serial port.</li>
|
||||
<li>start Flash Magic and click on "Select Device" under "Step 1 - Communications". In the "Device Database" window that appears, select "ARM7" and then double click on "LPC2468"
|
||||
(<b>NOT</b> "LPC2468 Ethernet").</li>
|
||||
<li>select the COM port from step 4 in "COM Port", set the baud rate to 230400, "Interface" to "None (ISP)", and "Oscillator (MHZ)" to 12.</li>
|
||||
<li>under "Step 2 - Erase", select "Erase blocks used by Hex File".</li>
|
||||
<li>under "Step 3 - Hex File", select your LPC2468 </b>eLua</b> hex file.</li>
|
||||
<li><b>(optional)</b> under "Step 4 - Options", select "Verify after programming" if you want to verify your downloaded image.</li>
|
||||
</ol>
|
||||
<p>After all the steps above, the Flash Magic windows should look similar to the image below (my LPC2468 serial port is COM14):</p>
|
||||
<img src="images/flashmagic.png" alt="Flash Magic Settings" style="margin-left: 10px;" />
|
||||
<p>All that's left to do is hit the "Start" button, and wait (the whole process takes a while). When it's finished, close Flash Magic and remove the JP2 (ISP) and JP3 (RST) jumpers from the
|
||||
board, then reset it.</p>
|
||||
<p>That's it! You now have <b>eLua</b> programmed on your board, so you can start your terminal emulator and enjoy it, as described in <a href="using.html">using eLua</a>.</p>
|
||||
|
||||
$$FOOTER$$
|
||||
|