Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

SDK User Guide

Lorenzo Tessiore edited this page Nov 1, 2015 · 7 revisions

Llilum SDK

The Llilum SDK is a set of tools that will allow users to get started working with Llilum

Prerequisites

As of right now, the prerequisites for building and using the SDK are:

Components

  1. The Llilum Compiler
  2. LLVM Tools (referenced, not included in SDK)
  3. GCC for ARM (referenced, not included in SDK)
  4. Make for Windows (not needed for VS project)
  5. mBed Libraries for LPC1768 and K64F boards
  6. A basic "blinky" test project (not needed for VS project)
  7. Scripts for creating the binary to deploy on a device
  8. Visual Studio Llilum template and project type

Creating the SDK

In order to create the SDK, the user must first go through the setup steps. Be sure to actually build the entire Llilum Solution!

  1. Open <repo_root>\VisualStudio\LlilumProjectType\LlilumApplication.sln right click on the solution, and click rebuild.
  2. Open a command prompt to the repository root, run setenv.cmd, CD into "<repo root>\Scripts"
  3. Run CreateSDKDrop.bat from the Scripts directory. If all goes well, no errors will be shown, and a folder called SDKDrop will be created and filled in the Scripts directory. To keep your repo clean, call CreateSDKDrop.bat <path> where path is the location of where to place the SDK.

Installing Llilum SDK for VS2015

  1. If you have previously installed the Llilum SDK, open Visual Studio and go to Tools -> Extensions and Updates and remove the Llilum application VSIX.
  2. Close all instances of Visual Studio to avoid having to restart your machine
  3. Copy the SDK folder to a location without spaces i.e. C:\SDK. If you have previously installed this SDK, it would help to place the SDKDrop folder in the same place as you previously had it
  4. Open an administrative command prompt, CD to the SDKDrop directory, and run InstallVSTools.cmd <ARM GCC path> <LLVM path>
  • The ARM GCC path should include the version and resemble the following: C:\ARM_GCC\4.9\
  • The LLVM path should include the version and resemble the following: C:\LLVM\3.6.1\

If you are still unsure, verify the following:

  • The ARM GCC directory contains "bin", "lib", and "arm-none-eabi" folders
  • The LLVM directory contains the following folder structure LLVM_DIR\build\x64\Debug\bin

Device setup

Creating a Llilum project

  1. Open Visual Studio 2015 and open the New Project Dialogue
  2. If the SDK installed properly, there should be a LlilumApplication project type a. NOTE: This project needs to be in a directory without spaces!
  3. When the project opens, right click on the Native project and click properties. Click Llilum Configuration, select your board from the dropdown, and click apply.
  4. Right click solution->Rebuild Solution, and it should start building! If an error dialogue appears, it means that the environment variables were not updated. Solutions include:
  • Option 1 - Log out and back in
  • Option 2 - Open the Native project settings, go to Llilum Configuration, and set up all "General" section settings manually
  • Option 3 - Close all instances of Visual Studio, open task manager, right click on the explorer process, and click Restart (not guaranteed to work)
  1. If the solution doesn't build, right click on the solution, go to project dependencies, select "Native" from the dropdown, check Managed in the list below, then click Apply

Deploying and Debugging

  1. To manually deploy, plug in the mBed device, go to <solution directory>\ARM\Debug and copy the .bin file to the drive letter of the mBed device.
  2. To deploy and debug in Visual Studio, click F5, or click the green play button.
  3. A prompt may come up asking to permit the debugger execution. Click Allow
  4. If debugging does not appear to be working, go to Native project properties, click the Debugging section, change the "Use flash tool" field to "No", and restart debugging.

Note: The green play button should have "Llilum Debugger" written next to it

Troubleshooting

Prior to troubleshooting, ensure 2 things: the path to the SDK has no spaces and the path to your project has no spaces. Current limitations do not allow for this. This will be fixed in a future iteration.

Building doesn't work

  • Build output says <solution name>.exe was not found: Make sure to set solution dependencies so Native project has a dependency on Managed project
  • Build output shows missing header file: Be sure to select your board under Native -> Properties -> Llilum Config
  • Build output still shows missing header file: Check the paths in Llilum Config properties. Make sure they exist and point to the most current SDK

When starting debugging, an error dialog comes up
In this situation, close all instances of py_ocd and arm-gdb. These can be found in the task manager. If issue persists, restart Visual Studio, and do a clean build.

Debugging session starts, but breakpoints don't work
The most common cause is loading the wrong symbols (or incorrectly) for your current machine. Right click on the Native project, and go to Debugging section, and change "Use Flash Tool" to No. Try to re-deploy. If that doesn't work, reset your development board, check all paths in the Debugging section, and ensure that Llilum Debugger is the selected debugger.

Clone this wiki locally