1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

122 Commits

Author SHA1 Message Date
Bogdan Marinescu
c1c5e58904 added the 'net' module for eLua, ONLY VERY BRIEFLY TESTED. Finally, we have TCP/IP from eLua 2008-09-22 21:17:44 +00:00
Bogdan Marinescu
c28cbf108c added support for dynamic IP configuration (DHCP), enabled by default (so far) on LM3S 2008-09-20 15:14:05 +00:00
Bogdan Marinescu
4793225724 eLua now works over TCP/IP instead of serial connection. This is basically printf/scanf over TCP/IP instead of UART, so it should look&feel just like "regular" Lua, except that you don't have
ANSI terminal support (yet) and "recv" doesn't work anymore because XMODEM doesn't work over TCP/IP. Only for LM3S8962/LM3S6965 for now, but it should straightforward (not easy though)
to port it to other platforms. Only static IP for now. More TCP/IP functions need to be implemented (and an eLua module must be written to access them). To enable console over TCP:

- enable "BUILD_CON_TCP" in build.h, also disable "BUILD_XMODEM" and "BUILD_TERM" in build.h (you'll get an error if you don't)
- disable "BUILD_CON_GENERIC" in build.h (you'll get an error if you don't)
- edit your network settings in build.h
- build the image&burn it
- telnet to the address configured in build.h. Be sure to use a decent telnet client, like the one in Linux or putty. Don't try with telnet from Windows, as it surely won't work. Also, it might
  not work with the telnet client from Tera Term Pro (didn't test this).
- type 'exit' from shell to terminate the connection.

Also, note that from this point on you'll need a newer version of binutils to compile for Cortex. I'm using binutils-2.19.50.tar.bz2 (from the snapshots page). 2.18 might work too, but I didn't
test it.
2008-09-18 20:22:15 +00:00
Bogdan Marinescu
e80bed4b04 _PRELIMINARY_ TCP/IP support, for now only on Cortex, only with uIP, only ping (ICMP) handling, no actual TCP/IP data transfer. 2008-09-15 21:54:14 +00:00
Bogdan Marinescu
747da02673 - made the math lib configurable with the "platform libs" mechanism. This way one can have a floating point Lua (thus being able to use fundamental floating point operations), but without the
mathlib (sin, cos, tan and all the other functions from there).
- corrected "pwmled.lua" (removed a debug print)
- bumped version number to minor versn 0.4.1
2008-09-10 18:41:31 +00:00
Bogdan Marinescu
b54c4503f7 bumped version number 2008-09-02 10:55:52 +00:00
Bogdan Marinescu
b5f59efa8e - added "board" as a compile time parameter, it will specify a name for the board on which eLua works. This helps if the same CPU is used on more than one board with different
I/O setup. 
- the pd() module has a new method (board) and gets it CPU, platform and board name directly from the build system (command line macros). It's much easier to work like this.
- the samples (examples/) were updated to check pd.board() rather than pd.platform()/pd.cpu(), which is a much more logical way to do things, since it ties the sample to a 
  specific I/O configuration, not with a CPU.
- updated PWM code for AT91SAM7X, now the "piano" example works for both LM3Sxxxx and AT91SAM7X256.
- added 3 new methods to the PIO module: pullup(), pulldown(), ad nopullup(), their meaning is obvious.
2008-08-27 20:05:09 +00:00
Bogdan Marinescu
b6e7ade77c - malloc.c/.h are now dlmalloc.c/.h
- new shell command: mem
- new module: bit (for bit operations)
- removed UARTx, TMRx, SPIx, PWMx constants from the respectives modules, as they only waste memory space. But now the same
  modules will return an error (via luaL_error) if an invalid resource ID is used. Note that this does not apply to PIO, since
  PIO uses special encodings for ports/pins.
- new methods in pio: port and pin to return the port/pin encoded in a pio value.
2008-08-27 13:39:10 +00:00
Bogdan Marinescu
86386ae363 fixed a few unsigned->signed overflows 2008-08-19 20:21:10 +00:00
Bogdan Marinescu
3ce5487a73 added the PWM module, so far supported only on LM3S 2008-08-18 16:29:09 +00:00
Bogdan Marinescu
7f7315adfd Finally added support for multiple memory spaces (preliminary). It works on my
LPC2888 board. The allocator used is dlmalloc, just as in Newlib, but it's a 
newer version than can handle non-contiguous memory spaces (2.8.3, as opposed
to 2.6.4 in Newlib 1.16.0, I really have no idea why they're using such an
ancient version of dlmalloc). To use it add "allocator=multiple" to your scons
command line (default for LPC2888).
2008-08-16 22:27:02 +00:00
Bogdan Marinescu
660418c23d Tried two different TLSF implementations, none of them works properly. Will try to
use a different dlmalloc version for multiple memory spaces. In any case, TLSF is
OUT.
2008-08-16 15:50:16 +00:00
Bogdan Marinescu
75311aec51 TLSF allocator from rtportal, not working properly 2008-08-14 07:38:30 +00:00
Bogdan Marinescu
09ac410a02 Added support for multiple RAM spaces using the TLSF allocator.
This takes care of my LPC2888 board (any many other board out there)
that have RAM both on the CPU itself and on a separate chip.
To use it add "allocator=tlsf" to your scons build command.
Even though the code for all the platform was modified, the new code
should not modify the "old" allocator behaviour.
Also added a new "mem" command to the shell, it gives information about
the current RAM state (total, used, free).
NOT YET TESTED !!! So use with care.
2008-08-13 13:42:57 +00:00
Bogdan Marinescu
0ec2230e8e bumped version number 2008-08-09 09:56:08 +00:00
Bogdan Marinescu
f52fc32230 added ESC to term keys 2008-08-07 11:45:43 +00:00
Bogdan Marinescu
a3b3d3f7dc added term module to Lua, various fixes 2008-08-05 19:58:19 +00:00
Bogdan Marinescu
4e6be0bc64 added prelimiary support for terminal functions 2008-08-04 13:45:38 +00:00
Bogdan Marinescu
095b4d42ae added conditional compilation for different components 2008-08-04 12:04:36 +00:00
Frédéric Thomas
4759965d3a Increase naming coherence in platform interface and module:
* platform()/cpu() returns the platform/cpu name, respectively 
  (instead of previously name()/cpu())           
* platform interface is platform_pd_get_<cpu/platform/cpu_clock>

pd.name() is still defined to keep compatibility with samples on the
web site. It would be best for sample programs to be part of the repository         
so they could be kept aligned with the code they demonstrate.
2008-08-03 13:56:22 +00:00
Bogdan Marinescu
632f4e1808 modified platform and pio modules 2008-08-02 18:01:01 +00:00
Bogdan Marinescu
3eb530b4eb initial import 2008-07-29 11:08:54 +00:00