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

131 Commits

Author SHA1 Message Date
Bogdan Marinescu
d190763c7c added board EK-LM3S9D92 from TI (LM3S9D92) 2012-06-27 00:45:04 +03:00
Sokolov Yura
1a5b04e2c3 NaN packing for TValues
From the Lua Power Patches page:

"Use NaN packing for TValue on x86 to reduce memory usage
and tiny performance gain (same as in LuaJIT i2).
It's fully ABI compatible with standard Lua libraries.
On one test script memory consumption reduced from 28Mb
to 21Mb and performance improved about 3.5-5%"

Added support for big endian architectures and LTR compatibility.
2012-04-19 00:04:10 +03:00
James Snyder
f3e0620c98 Merge branch 'include_git_rev' 2012-03-08 12:07:56 -06:00
Martin Guy
55b78b50ac Build system changes to allow building with UIP_CONF_IPV6
These changes allow you to "#define UIP_CONF_IPV6 1" in uip-conf.h
for an IPV6-capable network layer.
This also removes a pointless inclusion in avr32/uip-conf.h
The changes to the other three .c files (from "build.h" to "platform_conf.h")
are just orthogonal future-proofing.
2012-02-19 18:25:37 +01:00
Martin Guy
d0ac60c65b AVR32 config changes fot default CPU, allocator and memory use
Changes the default Mizar32 CPU to the 256K model,
the default allocator for the 128K Mizar32 to simple (the smallest)
the default allocator for other Mizar32s to multiple to avoid newlib's
  dlmalloc bug
and only use one memory region on AVR32 platforms when newlib or simple
  for the same newlib dlmalloc bug and because simple can only handle
  one region
2012-01-21 12:24:35 +01:00
James Snyder
ed9793a42e Add support for git version determination to SCons build system 2012-01-20 18:15:53 -06:00
James Snyder
f0047b1446 Added options to build systems to filter out certain file name patterns for ROMFS. 2011-11-20 20:36:44 -06:00
Bogdan Marinescu
f17b2a3bb2 Lua long long preliminary support 2011-10-18 15:52:37 +03:00
James Snyder
f5417716d6 add soldercore port to scons build system 2011-07-19 15:15:51 -05:00
Martin Guy
e45faec6f9 Complete the support for versions of Mizar32 with 256KB and 512KB of flash 2011-06-25 03:26:38 +02:00
Bogdan Marinescu
7a72d58d74 Fixed invalid 'romfs/' prefix for files in ROMFS 2011-06-23 11:50:58 +03:00
Bogdan Marinescu
d7becf0d83 Automatically include files in romfs/ in the ROM filesystem
Now the build system will automatically include all the files in
romfs/ (except .gitignore) in the ROM filesystem. Remember that the
files in romfs/ should NOT be under source control.
2011-05-27 17:48:54 +03:00
Martin Guy
fe4c8d86f7 Integrated Martin Guy's emBLOD bootloader patch in eLua. Original patch message:
emBLOD is Marcus Jansson's second-stage boot loader for AVR32UC3A
parts as used in the EVK1100 and Mizar32 boards, designed to allow
firmware images larger than the on-chip flash memory by loading the
eLua binary from SD card into SDRAM and executing it there.

The source for the emBLOD loader is here https://github.com/cmp1084/emBLOD

When compilation option  bootloader=emblod is given to scons, a special
version is compiled that
- locates the program at the start of SDRAM
- doesn't initialize the system clocks and SDRAM controller, as these
are already set up by emBLOD.

If the bootloader= option is not given, eLua is compiled exactly as before.

The changes I've made to Marcus' originally posted patches are to put
DATA and BSS in internal static RAM, the same as before, since in the
best case (memcpy) the SDRAM is three times slower than access to
static RAM
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=80657

This also has an impact on code speed: the interpreter runs 9 times
slower in external SDRAM than it does in internal flash.

Tested and working on Mizar32
2011-04-07 22:35:10 +03:00
James Snyder
5dd26401bd allow avr32-unknown-none variant of avr32 toolchain created by crosstools-ng for avr32 2011-02-27 04:27:29 +00:00
Bogdan Marinescu
f9fbead54c merged pre0.8 branch back to trunk 2011-02-02 17:52:12 +00:00
Bogdan Marinescu
edc33fdd83 MMCFS is now enabled by default on Mizar32; also the default allocator for Mizar32 is now 'newlib' instead of 'multiple' 2011-01-16 15:12:01 +00:00
Bogdan Marinescu
81e7f040fc merged remotefs_int branch on trunk, not fully tested yet 2011-01-16 00:23:19 +00:00
Dado Sutter
2bc5586ff9 - Removing examples from SConstruct ROMFS tables
- Tested only for EK-LM3Sxxxx
2011-01-10 00:08:13 +00:00
Dado Sutter
41fbfb8b9f - fix (added) missing reference to build to Netduino platform 2011-01-06 19:09:37 +00:00
Dado Sutter
c9165aec8e - Added support for the Netduino platform on the build options (board=netduino)
- Minor notes added to LM3Sxxxx platform initialization functions
2010-12-27 12:10:23 +00:00
Bogdan Marinescu
772b33c975 linenoise support for eLua. linenoise is a readline replacement which makes using the Lua interpreter much easier and also adds support for saving the 'history' of lines types in the interpreter. Documentation updated. Thanks go to James for suggesting this in the first place. 2010-11-16 22:53:06 +00:00
Bogdan Marinescu
5978c7b680 - Changed interrupt support infrastructure. No docs yet (will be added later), but check src/platform/lpc24xx/platform_int.c for a quick glimpse of the concept.
- Added direct access to interrupt flags; an interrupt doesn't have to trigger a handler anymore, its flag(s) can be checked instead (platform_cpu_get_interrupt_flag).
- Added experimental C interrupt handlers support (NOT TESTED). It can be compiled and used separately from the Lua interrupt support implementation. Hint: src/elua_int.c, elua_int_set_c_handler and elua_int_get_c_handler, also BUILD_C_INT_HANDLERS (as opposed to BUILD_LUA_INT_HANDLERS).
- Added tmr.set_match_int function that sets a match interrupt on a timer (one-shot or cyclic). Also works on virtual timers. In fact, it currently works only on virtual timers, as none of the platforms have support for this operation with hardware timers.
-Added more interrupt support functions in the CPU module.

All of the above were implemented and tested on the ELUA-PUC board, and nothing else. As a side effect, THIS COMMIT BRAKES THE STR912 PORT! The port will be modified to take advantage of the new interrupt structure soon; until then, please don't update it.
2010-11-03 23:57:27 +00:00
James Snyder
94036f6c9f Enable adcscope for STR9. 2010-10-14 21:11:25 +00:00
Bogdan Marinescu
e0e1c2c4fe added AVR32 without FOSC32 patch and MIZAR32 board support patch (Martin Guy) 2010-10-01 12:11:37 +00:00
Bogdan Marinescu
78cab3b3ad - interrupt support in Lua
- ASM interrupt support for ARM targets which eliminates the need for buggy GCC __attribute__ ((interrupt ("IRQ"))) functions
- code refactoring
2010-09-26 18:54:18 +00:00
Bogdan Marinescu
ae54bffb5d further fix to romfs=compile under Win32 2010-09-15 17:15:43 +00:00
Bogdan Marinescu
76e79329f4 patch for EK-LM3S1968 from Tiziano Trevisan 2010-09-05 18:20:27 +00:00
James Snyder
297048b2a8 Enable reflect ADC support on lpc24xx by adjusting romfs examples and SConstruct to include adc examples on romfs. 2010-09-02 15:19:34 +00:00
Bogdan Marinescu
2619c80d4a added EVK1100 and SPI support for AVR32 2010-08-04 13:18:39 +00:00
James Snyder
e961350299 Disable scons variable cache. 2010-07-29 03:34:21 +00:00
Bogdan Marinescu
6b3f038db3 added support for the I2C interface. UNTESTED, for now enabled only for the STR9 platform. Documentation will follow shortly 2010-07-21 20:21:55 +00:00
James Snyder
851f7c16ba ADC for MBED/LPC1768.
Note: MBED P15->P20 == adc dev ids 0->5
2010-07-12 20:56:54 +00:00
James Snyder
e902d9b7f5 Fix romfs=compile build option.
Command line argument checker was looking for romfs=compiled (incorrect) and target lookup wasn't looking in the correct place.
2010-06-24 23:20:00 +00:00
Dado Sutter
0cf7f2ccb6 - Fixing (or trying to) the require from sd/mmc fs issue 2010-06-22 14:13:05 +00:00
James Snyder
152fe00626 Workaround for MSVC detection issue on Windows. 2010-06-14 20:28:32 +00:00
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