This commit allows the build system to be used with directories outside of the eLua tree,
using the new "conf" and "extraconf" arguments to the builder.
This commit contains code from both @jsnyder and @darren1713.
It is now possible to configure each individual command that will be compiled in the shell:
```
shell = { commands = {'ls', 'ver', 'type' } }
```
If not specified, all the available commands will be compiled (which is backwards compatible).
Also, the `advanced_shell` attribute is gone, replaced with an `advanced` key in the shell
configuration. So write this:
```
shell = { advanced = true }
```
instead of this:
```
advanced_shell = true
```
- Use the proper suffix in Windows for cross-compilation
- Add a boolean attribute type
- Increased number of virtual UARTs
- Updated README.asciidoc with more information on how to cross-compile
in Windows
This PR updates the Linux version of eLua (aka "the simulator") to
compile with a more recent toolchain. The changes shouldn't affect the
other eLua targets.
With a recent version of the GNU ARM Embedded toolchain
(7-2017-q4-major), compilation for ARM targets fails with this message:
```
[COMPILE] .build/ek-lm3s8962/src__fatfs__ff.o
src/fatfs/ff.c:288:9: error: conflicting types for 'sync'
FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
^~~~
In file included from
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/reent.h:13:0,
from
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/reent.h:93,
from inc/newlib/devman.h:7,
from src/fatfs/ffconf.h:14,
from src/fatfs/ff.h:20,
from src/fatfs/ff.c:79:
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/unistd.h:289:9:
note: previous declaration of 'sync' was here
void _EXFUN(sync, (void));
^
[builder] Error building target
```
This PR fixes this build issue by renaming the internal "sync" function
in ff.c to "ff_sync".
Improved bit module and cpu module memory r/w functions to accept all
numbers and scale them down to the 2^32 number range. It now works
analogous to the bit32 module of lua 5.2.
Changed patches in commom_tmr.c according to Bogdans recommendations
The bit module did not work correctly with numbers where bit 32 was set,
because the conversion between the eLua floating point numbers from/to
integer was using signed integers.
For example
print(string.format("%x",bit.band(0x80000000,0x80000000))) resulted
output "7fffffff" instead of 80000000.
The patches in this commit ensure that all conversions are done with
unsigned integers.