-
Notifications
You must be signed in to change notification settings - Fork 52
setup
- Visual Studio 2015 (RTM)
- LLVM 3.8.1 Release Distribution [ download ] or clone the LLVM [repo] (https://github.com/llvm-mirror/llvm) and build it for Visual Studio 2015
- Python 2.7.4 installed and added to PATH
- ARM GCC installed and added to PATH
- Make for Windows to build mBed sample code for target devices with GCC
To build the Llilum source code you will need to download the 3.8.1 sources of LLVM and Clang sources.
NOTE: Use the links provided here to get the LLVM source code as alternate sites, including the Mirror on GitHub may not be the correct version. In fact, the GitHub Mirror will NOT be as it tracks the head of the development branch for the currently unreleased version rather than the latest stable released version.
Put Clang sources to <LLVM_SRC_ROOT>\tools\clang
(e.g. C:\LLVM\3.8.1\tools\clang
)
To build LLVM source code, you need to install CMake and add it to your system's PATH environment variable.
To build LLVM, you may follow instructions here or here, but it is best to use the BuildLlvmWithVS.cmd script file provided in the Zelig repository.
- Simply copy
BuildLlvmWithVS.cmd
(located under<repo>\Zelig\Zelig\CompileTime\Llvm.NET\LibLLVM\
) into the root of your LLVM source tree for version 3.8.1 - run
BuildLlvmWithVS.cmd
- This will build LLVM for multiple platform and configuration combinations (< x86 | x64 > + < Debug | Release | MinRelDebInfo> ).
- Depending on your hardware this can take anywhere from 3-6 hours to run and creates ~20GB of binaries. Thus, for teams it is recommended to do it once and share the LLVM source root on your network so everyone doesn't need to do that and store all the results.
- The BuildllvmWithVs.cmd script will perform the following steps:
- Run cmake to generate the necessary VS project and solution files
- Build the solutions with the various configurations
- Create a registry entry (under the per user registry HKEY_CURRENT_USER) to mark the location of the LLVM source root for this version of LLVM (that option requires running script with administrator privileges).
- This is used to allow the LlvmApplication.props property sheet find the LLVM distribution to use. You can also set environment variable(s) to customize the paths used for LLVM if you choose to build it in a different manner. For details see the LlvmApplication.props property sheet.
* If you are using a common shared folder for the LLVM binaries you can run
BuildllvmWithVs.cmd -g- -b-
to skip the cmake and build phases and just create a registry entry for your local machine that points to the shared location. Note: This only works for mapped drives as you can't open a command prompt to a UNC network share. Alternatively you may choose to set environment variables for the location of the LLVM files. The most common one is LLVM_SRCROOT_DIR which should point to the root of your LLVM source tree wherever it was installed. If you build LLVM binaries in some fashion other than the provided BuildllvmWithVs.cmd script you will likely need to provide additional Environment variables for the tools to build. (For details see the LlvmApplication.props property sheet. ) The goal here is to allow the flexibility of fine control, if needed, or desired, while covering the 90+% use case automatically.
- Clone the entire repo with:
git clone https://github.com/NETMF/llilum.git
into directory<repo>
, e.g.c:\src\llilum\
>" - Install GCC from link above and define a
GCC_BIN
environment variable to point to the arm-none-eabi-xxx tools, e.g.set GCC_BIN=e:\tools\compilers\gcc\4_9_2015q2\bin
- Open the Zelig solution
<repo>\Zelig\Zelig\Zelig.sln
NOTE: please note that the SDK projects in the Test folder can only load if the LLILUM SDK for Visual Studio is installed. Building and deploying those projects is disabled by default, so after installing the SDK one still needs to modify the solution configuration to enable building the Simple managed project and deploying the Native project located here. Please use the menu Build => Configuration Manager to activate such options. - Build the solution ( Build | Build Solution ). The property sheet should allow Visual Studio to find the LLVM binaries.
- You are now ready to try the system on a real device!
To build a sample application manually, see Build and Run Test Demo
To get started with Visual Studio and the Llilum SDK, see SDK User Guide