Skip to content

Commit

Permalink
Merge 0.7 changes to trunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnyder committed Jan 25, 2010
1 parent d3e1ba9 commit 51221f8
Show file tree
Hide file tree
Showing 154 changed files with 8,244 additions and 2,431 deletions.
19 changes: 19 additions & 0 deletions 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>
Expand Down
35 changes: 21 additions & 14 deletions 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
Expand Down
11 changes: 11 additions & 0 deletions LICENSE.fatfs
@@ -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 changes: 32 additions & 0 deletions LICENSE.luarpc
@@ -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 changes: 11 additions & 7 deletions SConstruct
Expand Up @@ -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' ],
Expand Down Expand Up @@ -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
Expand All @@ -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'

Expand Down Expand Up @@ -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']
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions doc/buildall.lua
Expand Up @@ -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>
Expand Down Expand Up @@ -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 {
Expand Down
67 changes: 41 additions & 26 deletions doc/docdata.lua
Expand Up @@ -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" },
Expand Down Expand Up @@ -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" },
Expand All @@ -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" },
Expand All @@ -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" },
Expand All @@ -129,18 +130,32 @@ 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" } },
-- "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" }
}
},
Expand All @@ -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" }
}
},
Expand All @@ -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" }
}
}
}
Expand Down
11 changes: 8 additions & 3 deletions doc/eluadoc.lua
Expand Up @@ -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" }
}

-------------------------------------------------------------------------------
Expand Down Expand Up @@ -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 = {}
Expand Down
4 changes: 2 additions & 2 deletions doc/eluadoc/arch_platform_ll.lua
Expand Up @@ -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",
Expand Down Expand Up @@ -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$
Expand Down

0 comments on commit 51221f8

Please sign in to comment.