lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12/10/2013 6:48 PM, John Hind wrote:
This is interesting:

http://micropython.org/

If only it was Lua! I know there has been some work on this sort of thing (i.e. http://www.eluaproject.net/) but nothing as elegant as this hardware implementation of Python. Just plug it into any USB host computer and edit the scripts as if on a flash drive, whilst a virtual com port gives you a console channel over the same USB.

The main issue for these single chip systems is RAM - typically at the highest end you are working with 100-200KiB of RAM and 1-2MiB of Flash. This is plenty for a basic "bare metal" Lua implementation running a test script, but not enough RAM to do really serious work. Problem is there is a huge complexity step between the top end of on-chip RAM and boards with separate RAM chips such as the Raspberry Pi and Beaglebone Black - the RAM interface requires a lot of chip pins reducing the IO availability, and much more complex PCB routing. In practice a large RAM approach only becomes cost effective with very big production runs.

It's inching upwards though... At a glance there are a bunch of chips >256KB RAM at Farnell but most are BGA. But wait a few quarters and you should be able to get PIC32MZ at 512KB RAM (but look carefully at the errata list!) from as small as TQFP64. SKU entries for some dev boards are already appearing at Farnell.

[snip snip]
I realise that Lua was not designed with precisely these priorities, but neither was Python. I'm interested in views of the feasibility of adapting Lua in the same direction that Damian has adapted Python.

It would be interesting to see how popular micropython can become. It may suit the demographic who happily use dev boards for one-off projects. However, there are a lot of things that need more performance than interpreted code can offer, so personally I haven't embedded any Lua in any MCU, I have only used Lua through USB HID to test or do things quickly.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia