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

96 Commits

Author SHA1 Message Date
James Snyder
09620bc22a Fix logic for user specifying particular toolchain. 2010-05-12 16:59:30 +00:00
James Snyder
df8c814ab8 Fix defines that were needed by platform data module. 2010-05-11 21:34:09 +00:00
James Snyder
c5e5ece1cd Now uses scons flags variables to construct compiler/linker commands.
Builds for avr32, sim & i386 should build, but have not been tested.
2010-05-10 23:06:09 +00:00
James Snyder
ea64e2b7d3 Use more of SCons handling for adding preprocessor defines & validation. 2010-05-10 23:05:55 +00:00
James Snyder
c1d27e76ee Initial work towards making the SCons build more parameterized.
- automatically searches for compatible toolchain (and checks that it at least runs)
- running "scons -h" now shows descriptions of command line options and enumerates valid values
- caches last specifically requested configuration

More to come...
2010-05-06 01:09:40 +00:00
James Snyder
bac2b927ba Start of SConscript conversion 2010-05-06 01:09:21 +00:00
James Snyder
5f5e01fd3b Add support for Semihosting filesystem operations
- enable file creation, reading, writing on mbed for the built-in filesystem
- implementation currently lacks support for directory listings, this will be
  added when mbed implementation details are available.

Note: this should work with other ARM arm ports that are connected to a JTAG
debugger that implements semihosting, though I have not tested it.
2010-03-08 20:08:07 +00:00
James Snyder
dee997d856 Adjust mmcfs to enable long filename support and correct directory listing
bug.
2010-02-22 03:39:47 +00:00
James Snyder
f825e2c39e Use all RAM on mbed. Adjust life.lua to show memory usage information, and use
a bit smaller grid.
2010-02-20 01:15:16 +00:00
James Snyder
271dcc15e1 Enable PWM support for lpc17xx/mbed.
Note: pin functions need to be configured on this platform for output to go to
a given pin.
2010-02-20 00:27:33 +00:00
James Snyder
9a1536b959 Fix LM3S6965 bug related to using lm3s module.
Add tetrives back on LM3S6965.
2010-02-15 22:26:15 +00:00
Dado Sutter
d890fd3c50 - Fixed LM3S games and aux modules
- Updated lm3s games versions merged with trunk
- Tetrives game added to default LM3S8962 build on SConstruct
2010-02-03 12:32:18 +00: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
James Snyder
c31efa276a Switch SCons decider, crunch PNG screenshots.
SCons decider for main build and luarpc have been switched to MD5-timestamp,
which will prevent scons from re-digesting files it has cached unless
timestamp has changed (should shave a little off of build times, but be safe).

Some of the PNG screenshots that didn't get crunched before the 0.7 release
have been run through optipng, advpng and pngout to wring out as many bytes as
possible without losing data/quality.
2010-01-28 19:17:22 +00:00
James Snyder
51221f8b4c Merge 0.7 changes to trunk. 2010-01-25 23:43:05 +00:00
James Snyder
9c6062a632 Initial basic mbed (LPC1768) support. 2010-01-05 03:40:12 +00:00
James Snyder
c85e3a1d2d Starting Cleanup of LuaRPC for 0.7 release.
- added some more documentation (not yet done)
- alternate uarts can be selected (boot mode defaults to console uarts)
- renamed "remote" references to "rpc" (may as well keep the original name)
- switch default error handler to luaL_error (presumably wasn't available for
  old 4.x LuaRPC)
- tweaks to exception handling to make things more consistent (hopefully)
2009-12-04 01:46:47 +00:00
Bogdan Marinescu
e935ae52e7 mostly cosmetic changes for the new romfs compress/compile feature 2009-12-03 11:29:33 +00:00
James Snyder
df1ab9e534 Fixes for experimental "compress" mode for romfs. 2009-12-02 21:22:41 +00:00
Bogdan Marinescu
26361ea4cd EXPERIMENTAL FEATURE: romfs compression/precompilation.
Added another "romfs" parameter to SConstruct. It can take one of 3 values:

- "verbatim" (default): copy all the files from the eLua romfs/ directory to the binary image (exactly what happened until now)
- "compress": use LuaSrcDiet (http://luaforge.net/projects/luasrcdiet, now included in the eLua distribution) to "compress" the source code by using different tricks (shorter identifiers, removing comments and EOLS, and so on). The output is still a compilable Lua file (although in most case it looks completely different from the original) which is copied in the eLua binary image instead of the original Lua file. The compression obtained by using this method seems to be very good in practice, thus it will save flash when needed.
- "compile": use the eLua cross compiler (that must be built first by running 'scons -f cross-lua.py') to precompile the Lua files to bytecode, and write the bytecode to the image instead of the source file. This way, one can save both time (the scripts don't need to be compiled anymore) and RAM (for the same reason, especially since the Lua parser uses the stack a lot, which can lead to very nasty and hard to diagnose stack overflow bugs). It will be even more useful in the future, when (hopefully) more and more Lua bytecode data structures will be available directly from Flash (without having to copy them RAM as it happens now). It might also decrease the romfs memory footprint, but then again, it might not; it pretty much depends on the Lua programs included in the romfs.
2009-12-02 19:33:03 +00:00
Dado Sutter
6172f55b76 Snake added to SConstruct ROMFS build table.
It was NOT added to the default builds of the LM3S boards.
2009-11-20 12:15:20 +00:00
James Snyder
a66a9fed6d Add hard fault handler for STM32 that dumps register contents to aid in
debugging.

Might be nice to have a generalized form of something like this to help in
pointing in the right direction when one doesn't have a JTAG debugger.
2009-11-07 00:24:02 +00:00
Dado Sutter
22dc664737 - Scontruct: autorun.lua file, if found in /romfs, is now included in eLua builds for
any platform. No need to specify it in the file_list table.
- minor comments added to SConstruct
- LM3S platform specific modules commented
- Minor comments in Pong
- Debugging prints removed from Tetrives
2009-11-02 17:44:35 +00:00
Bogdan Marinescu
f1d8594ea2 added PWM to the LPC24xx platform (and also pwmled.lua) 2009-10-31 16:52:40 +00:00
Bogdan Marinescu
8476b93446 merged branch lpc24xx (r492:507) to trunk 2009-10-31 11:41:34 +00:00
Bogdan Marinescu
cf48728115 - added support for the STR-E912 board from Olimex
- PWM module for STR9
- STR9 port fixes 
- STR9 platform-specific module: str9.pio (the STR9 GPIO subsystem is quite uncommon).
- small LM3S fixes
2009-10-18 01:27:33 +00:00
James Snyder
c404753efa Merge fix for list of ROMFS files. 2009-10-13 23:56:40 +00:00
James Snyder
bd1465ca50 Merge 0.6 branch to trunk.
Conflicts:
	SConstruct
	doc/en/arch_platform.html
	doc/en/comunity.html
	doc/en/overview.html
	doc/en/refman.html
	doc/en/refman_gen.html
	doc/en/status.html
	doc/en/tut_bootstick.html
	doc/images/lng_pt.png
	doc/images/minusnode.png
	doc/images/next.png
	doc/images/node.png
	doc/images/nodelast.png
	doc/images/plusnode.png
	doc/images/plusnodelast.png
	doc/images/previous.png
	doc/images/showall.png
	doc/images/sync.png
	doc/images/vertline.png
	doc/pt/arch.html
	doc/pt/arch_coding.html
	doc/pt/arch_con_term.html
	doc/pt/arch_newport.html
	doc/pt/arch_overview.html
	doc/pt/arch_platform.html
	doc/pt/arch_tcpip.html
	doc/pt/building.html
	doc/pt/comunity.html
	doc/pt/dl_binaries.html
	doc/pt/dl_old.html
	doc/pt/dl_sources.html
	doc/pt/downloads.html
	doc/pt/examples.html
	doc/pt/faq.html
	doc/pt/installing_i386.html
	doc/pt/installing_lm3s.html
	doc/pt/news.html
	doc/pt/overview.html
	doc/pt/refman_dep.html
	doc/pt/refman_gen.html
	doc/pt/status.html
	doc/pt/tc_386.html
	doc/pt/toolchains.html
	doc/pt/tut_openocd.html
	doc/pt/using.html
	romfs/LM3S.lua
	romfs/led.lua
	romfs/morse.lua
	romfs/pong.lua
	src/lua/linit.c
	src/modules/auxmods.h
	src/platform/lm3s/platform.c
	src/platform/lm3s/platform_conf.h
	src/platform/sim/platform_conf.h
2009-10-13 02:14:27 +00:00
Bogdan Marinescu
ddf0d9e2e6 removed dependency on 'rm' and 'mv' 2009-09-25 20:35:51 +00:00
James Snyder
697bba925b Shorten a few other LuaRPC strings. 2009-09-06 23:41:08 +00:00
Bogdan Marinescu
2dfb889e8d integrated logo and bitarray to the trunk, small additional fixes 2009-08-19 19:18:45 +00:00
James Snyder
9eaa3ceb03 Simple RPC-only boot mode settable by boot=luaremote with scons 2009-08-17 18:38:35 +00:00
James Snyder
0cd9644745 eLua now running on LM3S9B92. Some kinks and bugs to work out remain
- ADC always returns zero
- many modules remain untested
2009-08-03 18:39:06 +00:00
James Snyder
9eddff8847 Updated driver library (except for UART/USART). 2009-08-03 18:37:38 +00:00
James Snyder
4b7169fdda PWM support for STM32 working (4 channels running off of TIM8). 2009-07-08 23:40:12 +00:00
James Snyder
907de5b818 Working CAN support for STM32. 2009-06-26 23:38:02 +00:00
James Snyder
8939b99545 Commit of initial working RPC.
- disabled by default (enable on a target-by-target basis) so it shouldn't
  cause much breakage for non-rpc users
- some modifications to the binary chunk reader which should allow reading of
  chunks encoded on various platforms (with certain limitations like lualong
can't read float lua bytecode, one must generate lualong bytecode from a float
lua)
- other misc changes.
2009-06-22 23:49:21 +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
Bogdan Marinescu
df121b222e added the 'linux' platform as an emulation target, thanks go to Robert Jakabosky for providing this 2009-05-11 21:35:42 +00:00
Bogdan Marinescu
a4c0c72977 fixed an issue in SConstruct that prevented eLua compilation in Windows, now it compiles fine using the CodeSourcery toolchain 2009-03-31 11:19:50 +00:00
Bogdan Marinescu
9c15d2e4fc - XMODEM and term code moved from main.c to common.c
- added full term support to the i386 platform (I was bored with all the docs ... :) )
- documentation updated
2009-03-23 21:07:49 +00:00
James Snyder
94438ff64b ADC for STM32 + Misc Fixes & Build Adjustments
- ADC adjusted to work with sequenced acquisition setups.  It should now
  accomodate both sequenced and non-sequenced approaches on the backend.
  A few more adjustments should be made to handle multiple sequencers
  but right now neither LM3S or STM32 platforms use more than one sequencer.

- Added adcpoll.lua to demonstrate a simple approach for using clocked
  acquisition and displaying results as they become available.

- ADC now works for STM32 (all 16 channels!). This should receive more
  extensive testing, but everything should be working at this stage.

- the build system now pays attention to changes in header files meaning that
  if any headers change or if the romfs changes (since it is generated as a
  header) these changes will get recompiled without having to do a clean.
2009-03-21 19:59:49 +00:00
James Snyder
8c454b1295 Enabled hangman for ET-STM32, term seems to work. 2009-03-09 18:54:37 +00:00
James Snyder
303d97561d Make devkitarm an alias to arm-eabi-gcc. 2009-03-05 22:48:08 +00:00
James Snyder
041701045c Add devkitarm toolchain option. devkitarm seems to generate somewhat larger
code than the other toolchains I have experimented with.
2009-03-05 22:47:58 +00:00
Dado Sutter
736bdf4f50 stringdraw renamed to print on disp module
imagedraw renamed to draw on disp module
overall functionality maintained for now
Minor comments edited on SConstruct, for romfs building system
2009-02-27 10:57:58 +00:00
Bogdan Marinescu
6e1b46d3d7 - Added per-board "using eLua" documentation from the old site (with some additions). Still have to work on the AVR32 and STM32 docs.
- The Eagle 100 binary image now starts at 0x2000 by default (instead of the regular 0x0) to allow users to take advantage of the provided Ethernet bootloader.
- deleted the old docs/ directory. The "real" documentation is in the doc/ directory
2009-02-25 21:29:40 +00:00
James Snyder
db043887b0 Fix for syntax error. 2009-02-25 00:25:22 +00:00
Bogdan Marinescu
d0657f08ff More work on the docs:
- "building" page completely rewritten
- a new page about the toolchains used in eLua
- a graphical representation of the system architecture (doc/wb_img/elua_arch.png) that will be used in a soon to come page about the eLua architecture

Also:

- validate.h updated with some new tests (still needs more work)
- "arm-gcc-eabi" toolchain name changed to "codesourcery", since this is obviously way more intuitive :)
2009-02-24 22:09:22 +00:00
Bogdan Marinescu
99c24861f4 Integrated support for Micromint Eagle 100 board (LM3S6918 Cortex-M3).
Fixed the cross compilation script.
Some DOS to UNIX EOL conversions.
2009-02-23 15:28:56 +00:00