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

98 Commits

Author SHA1 Message Date
Bogdan Marinescu
cac25a575e OK, NOW the baudrate is indeed 38400 for STR7 :) 2008-10-06 19:16:39 +00:00
Bogdan Marinescu
876d9771ae added timer and GPIO support to STR7. Also changed the baud rate for STR7 to 38400 baud from 115200, since my board can't handle 115200 properly 2008-10-06 19:14:30 +00:00
Bogdan Marinescu
539fb1764d added preliminary support for STR711FR2 (STR71x CPUs from ST) 2008-10-02 21:21:39 +00:00
Bogdan Marinescu
f73ad2d08d modified the info.lua sample to take into account that pd doesn't have a clock() method anymore 2008-09-26 20:41:56 +00:00
Bogdan Marinescu
d2c5756200 - added the "CPU" module. its role: access data directly (read/write) for 32/16/8 bits variables, and also provide access to CPU constants (should be defined in platform_cpu.h, see lm3s code)
- the "clock" method is now part of the CPU module, thus is out of the platform data module. pd becomes a fully platform independent module.
2008-09-26 20:41:11 +00:00
Bogdan Marinescu
a10ac9c656 removed uip-split.c from the build, since it's not used anymore. And yey, we're at SVN revision 100 :) 2008-09-23 19:41:20 +00:00
Bogdan Marinescu
05ddf01cf3 - fixed a serious bug in the implementation of the eLua UIP support code. Now one can have multiple TCP/IP connection _without_ mixing the data buffers between them :)
- added the resolver application (src/uip/resolv.*) to eLua (configurable by BUILD_DNS in build.h) to allow DNS lookups
- more functions in the "net" module, more tests, it seems to work fine now in both "server mode" and "client mode"
- console over TCP works once again, or should I say "now works". It turns out that it never worked with the code in SVN, because I committed a wrong file a while ago.
2008-09-23 19:39:14 +00:00
Bogdan Marinescu
9ab61f0e56 the latest 'net' module broke support for console over TCP. Still investigating why. Until then I'll commit a version that at least compiles with BUILD_CON_TCP enabled 2008-09-22 22:09:12 +00:00
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
97d7025992 removed a useless commented block in term.c 2008-09-21 16:15:06 +00:00
Bogdan Marinescu
88d035e393 use metamethods instead of table keys to access constants in PIO and term 2008-09-21 16:12:31 +00:00
Bogdan Marinescu
76396d6d7e fixed a build error when BUILD_DHCPC was not enabled 2008-09-20 16:03:12 +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
810b787ec3 added cross-compile support 2008-09-19 20:13:30 +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
ce43956dc7 deleted two object files added by accident 2008-09-15 21:54:46 +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
89cd955362 corrected the changelog 2008-09-10 18:56:10 +00:00
Bogdan Marinescu
b2ca4c14ec getting ready to release 0.4.1 2008-09-10 18:52:26 +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
6e62b7a477 removed a 'test' printf from main.c 2008-09-10 18:03:08 +00:00
Bogdan Marinescu
a775de5032 updated the build script to work with the new directory structure 2008-09-10 18:01:26 +00:00
Bogdan Marinescu
176f9cf23f renamd lualong to lua, so the lua directory now contains the lualong patch, but it can also build the original (unmodified) lua 2008-09-10 18:00:12 +00:00
Bogdan Marinescu
9d7b813d38 remove lua, we'll rename lualong to lua and build both versions from this directory 2008-09-10 17:58:57 +00:00
Bogdan Marinescu
c66273ca92 updated to Lua 5.1.4 2008-09-10 17:57:24 +00:00
Bogdan Marinescu
45eee1c83a modified the CHANGELOG to look better :) 2008-09-02 14:04:38 +00:00
Bogdan Marinescu
b54c4503f7 bumped version number 2008-09-02 10:55:52 +00:00
Bogdan Marinescu
dadbc85bfc documentation updated. phew :) 2008-09-02 10:55:35 +00:00
Bogdan Marinescu
95e5875b82 getting ready for 0.4 2008-09-01 20:32:43 +00:00
Bogdan Marinescu
e0ae30c61e moved the files from examples in the ROM file system 2008-09-01 16:26:20 +00:00
Bogdan Marinescu
9bac0ecef5 changed ignore property for the new inc/romfiles.h file that replaces the previous inc/luatest.h file 2008-09-01 16:03:33 +00:00
Bogdan Marinescu
fc70505266 renamed files to romfs, now it's much less confusing hopefully 2008-09-01 13:32:05 +00:00
Bogdan Marinescu
0c6731db5b modified the build system. Also removed the 'mem' command from the shell, as it was very confusing 2008-09-01 13:21:06 +00:00
Bogdan Marinescu
86ecb7bbe2 reverted some changes 2008-08-28 19:44:16 +00:00
Bogdan Marinescu
4ef9235006 - platform_pio_op can now return an error (for operations like pullup, pulldown, nopull) which will be translated by the PIO module to a Lua error
- fixed an error in the "pio_pin_get" function from the PIO module
- fixed an error in the platform_pio_op implementation of AT91SAM7X
2008-08-28 19:41:58 +00:00
Bogdan Marinescu
4adda7ddaa piano.lua with correct line endings 2008-08-27 20:09:13 +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
a5e453854d call the correct version of mallinfo() 2008-08-27 13:48:28 +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
f657e55b02 Now the shell can receive and execute both source code and compiled chunks. Also a small fix in the term module 2008-08-25 21:42:54 +00:00
Bogdan Marinescu
71bbc1e7e0 piano.lua added to repository 2008-08-25 20:19:15 +00:00
Bogdan Marinescu
edf326cffd added the piano example (so far only for LM3S8962) and modified the term interface a bit 2008-08-25 20:18:50 +00:00
Bogdan Marinescu
86386ae363 fixed a few unsigned->signed overflows 2008-08-19 20:21:10 +00:00
Bogdan Marinescu
38be9bec88 preliminary support for PWM on AT91SAM7X256/AT91SAM7X512 2008-08-19 19:23:47 +00:00
Bogdan Marinescu
7537414c3f added a TVBGone implementation using the PWM module, currently it only works on the LM3S platform 2008-08-18 21:00:40 +00:00
Bogdan Marinescu
3379b15660 added LHF's lpack module 2008-08-18 17:43:26 +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
b38e258040 fixed an obsolete comment in stubs.c 2008-08-16 22:29:11 +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