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

3 Commits

Author SHA1 Message Date
Bogdan Marinescu
f17b2a3bb2 Lua long long preliminary support 2011-10-18 15:52:37 +03:00
Bogdan Marinescu
e7702bb0e2 Manual merge of remotefs/ into trunk. Tested with the simulator and (partially) on a ET-STM32 board. Other changes:
- FAT changed to support the new opendir/readdir/closedir mechanism, and to use lseek directly instead of ioctl (also fixed a bug in FAT's lseek that always returned 0 instead of file position).
- ET-STM32 console moved to UART2@19200bps (to allow RFS to run on UART0). If UART0 is needee for console, remember to disable RFS.
- freed 700+ bytes of RAM by changing the devman implementation to keep pointers instead of actual DM_DEVICE structures
- other minor code changes and fixes
2010-02-01 18:47:41 +00:00
Bogdan Marinescu
278a68cdc4 Modified Robert's 'linux' platform:
- code cleanup
- the platform is now named 'sim'. You build it like this:

  $ scons cpu=linux

  The idea is to support more than one host OS by changing the "cpu" variable
  above (for example cpu=osx, or cpu=win32). Also, a crude "host interface" was
  defined in hostif.h. In theory, a host OS should only implement that interface
  in order to run the eLua simulator. The implementation must reside in a file
  called hostif_{os}.c (in this case hostif_linux.c). Too bad I don't have a MAC,
  I would've loved to try this :)
  REMEMBER: whem implementing a host interface, you CAN NOT rely on your regular
  libc! You'll have to rewrite the syscalls (see host.c for an example on how to
  do this in Linux).

- after you build it, don't start it directly, use the new "run_elua_sim.sh"
  script to run it. It will set the terminal to raw mode, no echo, so it will
  behave more like "traditional" eLua (even hangman.lua will run in this mode :) ).
  Remember to run in on an ANSI capable terminal (although most of them support
  ANSI emulation nowadays). 

- you can exit from the simulator with "exit". You can't do this with CTRL+C if
  you run it with "run_elua_sim.sh". 

All in all, this looks pretty good and it's an excellent test platform. It will
do wonders when we integrate our own libc and we won't be able to figure out why
it doesn't work :)
2009-05-12 14:09:29 +00:00