Sedona

Setup

Overview

The root directory of your Sedona Framework installation is referred to as Sedona home. Relative directories specified by this documentation are assumed relative to the Sedona home directory. Sedona home is organized into the following sub directories:

Sedonac

Windows

Sedona Framework development primarily centers around the "bin/sedonac.exe" executable. If using the command line, you probably want to ensure that bin is in your path.

The compiler requires a Java Runtime of 1.4 or greater. The "sedonac.exe" launch executable will look in the registry to find where your current VM is installed. If you need to debug the launcher you can run "sedonac --v" (that's two dashes before the 'v'), which will trace the registry access and jvm.dll load.

To verify sedonac is correctly installed, run with the "-ver" option:

D:\sedona\pub\src>sedonac -ver
Sedona Compiler 1.0.35
Copyright (c) 2007-2009 Tridium, Inc.
sedona.version = 1.0.35
sedona.home    = D:\sedona\pub
java.home      = C:\Program Files\Java\jre1.6.0_05
java.version   = 1.6.0_05

Unix

There is a bash shell script in "adm/unix" that you can use and modify to initialize your Sedona Framework development environment. It is called init.sh. In order to use this script, you must first

  1. export JAVA_HOME in your login script.
  2. create a symbolic link in your home directory called "sedonadev" that points to your actual Sedona home directory. For example,
    ~/sedonadev -> ~/repos/sedona-1.0/pub
    If you don't want to use this symbolic link, edit init.sh to explicitly set the sedona_home environment variable.

After doing the above configuration, change your login script to run "init.sh". This script will make sure some key programs are in your PATH, make sure that all the python scripts have executable permissions, and create some useful aliases.

There are two UNIX specific commands that you should use for building in a UNIX environment

Java Command Line

If you need to invoke Sedonac directly you can launch it directly with Java:

For example:

java -cp {lib}sedona.jar;{lib}sedonac.jar -Dsedona.home={home} sedonac.Main

Environment

You can rebuild from source using the python scripts in the adm directory. These scripts are used to rebuild the compiler itself and the SVM. In order to use the python scripts, you will need to install Python (version 2.7 or better). Also the following environment variables must be defined:

To verify your environment you can run the "adm/env.py" script, which will print all the files and directories being used with your current setup.

Common Commands

The following commands are commonly used when building and running the Sedona Framework:

Note that any command that builds the SVM will need to have the appropriate target toolchain set up first.