- "using.html" converted to AsciiDoc mode
- the shell documentation was split in a separate file and divided into
two parts: docs for the simple shell and for the advanced shell
(yet to be written)
The MMCFS implementation can now handle more than one MMC card. To
use this feature, define these macros in platform_conf.h:
MMCFS_NUM_CARDS - the total number of cards
MMCFS_CS_PORT_ARRAY - array of CS ports
MMCFS_CS_PIN_ARRAY - array of CS pins
MMCFS_SPI_NUM_ARRAY - array of SPI port numbers
For example:
#define MMCFS_NUM_CARDS 2
#define MMCFS_CS_PORT_ARRAY { 7, 2 }
#define MMCFS_CS_PIN_ARRAY { 0, 5 }
#define MMCFS_SPI_NUM_ARRAY { 0, 0 }
defines a system with 2 MMC cards. The first one uses SPI0 and has its
CS on PG0. The second one also uses SPI0 (this is perfectly possible)
but has its CS on PC5. This was the configuration used to test this
feature on a EK-LM3S8962 board.
The build system now accepts a single C file as a target and compiles that
file only. For example:
$ lua build_elua.lua board=ek-lm3s8962 src/main.c
Two other switches were added to the build sysem (both of which work only
with the single file target shown above):
"-E": preprocess file instead of compiling it
"-S": generate assembler source for the file instead of compiling it
Get rid of the "reserved" byte in the TString data type. Might actually
save more than one byte, depdending on the compiler structure alignment
rules (and the architecture). Tested with the Lua 5.1 test suite.
There is a new command in the shell ('mv' - move/rename files).
Also, the shell code was refactored into its own directory (src/shell).
The 'help' command in the shell was updated and supports 'help <command>'.
There is a new BUILD_ADVANCED_SHELL build time macro that enables the
advanced shell features (currently 'cp' with recursion (and other improvements),
'mv' and 'rm').
- For now only supported for MMCFS
- 'dir' function in shell augmented to show directories and
to traverse a path recursively if requested
- new command 'mkdir' in shell
Newer Newlib versions use different functions to implement integer-only versions
of printf/scanf. Our stubs were modified to take advantage of these changes and
keep the code size low in integer-only versions of eLua.
Fixed bug reported by Tim Van der Hulst:
-------------------------------------------------------------------------------
dofile('/mmc/test.lua') -- OK
require('test') -- Fail!!
-------------
/mmc
test.txt 5 bytes
gprs.lua 2910 bytes
util.lua 385 bytes
test.lua 385 bytes
Total on /mmc: 3685 bytes
-------------
Error: [string "xmodem"]:23: module 'test' not found:
no field package.preload['test']
no file '/mmc/test.lua;/mmc/test.lc;/rom/test.lua;/rom/test.lc'
no file '/mmc/test.lc;/rom/test.lua;/rom/test.lc'
no file '/rom/test.lua;/rom/test.lc'
no file '/rom/test.lc'
-------------------------------------------------------------------------------
The problem was actually in the way read-only strings were created. If a read-only
string creation call specified a size which was different than the actual (C) size
of the string, the string didn't get null-terminated, which in turn led to some
interesting errors (like the one above).