Building eLua in Windows

Building eLua in Windows

Starting with version 0.7, building eLua in Windows is officially supported. The following instructions were tested in Windows 7 Professional, but they should work with little or no modification in any version of Windows 7, Vista or XP. You need to download and install a few things first:

  • a toolchain: building a GCC-based toolchain under Windows is possible but not easy. We found that the easiest thing to do is to download a pre-built toolchain and install it. Currently, all the targets supported by eLua (except i386) have at least one toolchain that runs under Windows:
    • For ARM7, ARM9 and Cortex-M3 targets, you can download and install the CodeSourcery Lite Edition (supported by eLua out of the box) from here. For reference, the version used in this tutorial is "Sourcery G++ Lite 2009q3-68 for ARM EABI". Future (and some previous) versions of this toolchain should also work. Remember to specify toolchain=codesourcery when using this toolchain (see here for details).
    • AVR32 has its own Windows based GNU toolchain that can be downloaded from Atmel here.
  • Python: my favourite Windows distribution of Python is ActivePython. Simply download it and install it. ActivePython 2.6.4.8 will be used in this tutorial. Other Python distribution might work equally as well.
  • scons: download the Windows installer package from here. For this tutorial, scons 1.2.0 will be used. Remember to install scons after you install Python.
  • lua: a very good and versatile Lua distribution for Windows is "Lua for Windows", it can be downloaded from here. Besides Lua itself, it includes a lot of very useful Lua modules, so I highly recommend it. Version 5.1.4.30 of Lua for Windows will be used in this tutorial.
  • svn: if you need to checkout the eLua source code from the SVN repository, then you will need to install SVN for Windows. There are a few pre-compiled SVN packages for Windows. I'm using the Tigris binaries that can be downloaded from here. In this tutorial I'll use version 1.6.6. If you require developer access (svn+ssh), additional steps are needed to make "svn+ssh" work in Windows. A lot of tutorials that cover this topic are available, for example this one.
  • gcc: if you want to use the ROMFS pre-compiled feature (see here for details), then you will need to build an image for the eLua cross compiler, and you will need an i386 toolchain for this. I'm using MinGW for this task. It can be downloaded from here. This tutorial uses MinGW version 5.1.6. Note that you don't need to install MSYS; MinGW should be enough. Cygwin should work equally as well, or even Microsoft's Visual Studio (not tested). To build the cross compiler, run this command from the command line:
    scons -f cross-lua.py

Make sure that all the programs listed above are added to %PATH%. Most of them do this automatically, or have an option to do this automatically, but some (for example MinGW and SCons) do not and you will need to add them to %PATH% manually.

After you setup your build environment as described above, follow this tutorial to build your eLua image.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值