Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

Building a Synergy project from command line

Latest Updated:09/09/2016

Overview

Explains how to build a Synergy application on command line, without using the ISDE (E2Studio) as a build environment.

This is especially important for archiving a certain application release, as for specific version and release management policies that might be used in development.

Goal

After completing this how-to you will be able to store your synergy project in any local folder, and reproduce the build process offline.

For this you will not need E2studio installed on the PC used for the build.

Prerequisites

Begin by creating a Synergy project in E2Studio, make sure it builds successfully.

This is necessary to be done at least one time, to ensure that the makefile and all project dependencies have been configured and generated correctly.

Setup

  1. Copy the subfolder called "Utilities" of the E2Studio version you are using in a folder of your choice.
  2. Install the GCC compiler toolchain to be used with the SSP version of your project on the machine where you want to build. Please consult the SSP release notes to find out the exact compiler version you require
  3. Copy the Synergy project in the folder you want to use as a repository for the build.
  4. Store the associated Synergy license in a folder of your choice
  5. Create a DOS batch file to configure the minimal environment required to build the project.

The content of the batch file might look like the following:

ECHO off

REM -------------------------------------------
REM these are the needed environment variables
REM modify the paths below according to the installation folders on your machine
REM -------------------------------------------

REM location of the e2studio Utilities folder where make and isdebuild are located
set E2STUDIO_UTILITIES=c:\test\Utilities

REM GCC compiler should have been configured during isde installation but
REM we set it here too just in case
set GCC_COMPILER=C:\work\dev\toolchains\GNU\4.8.2014q3\bin

REM this is the path to the ams license for compiling
set AMS_LICENSE_PATH=c:\test\license\SSP_License.xml


REM -------------------------------------------
REM do not modify anything below this point
REM -------------------------------------------

if not exist "%GCC_COMPILER%" goto GCC_PATH_ERROR
if not exist "%E2STUDIO_UTILITIES%" goto E2STUDIO_PATH_ERROR
if not exist "%AMS_LICENSE_PATH%" goto SYNERGY_LICENSE_ERROR

SET PATH=%GCC_COMPILER%;%E2STUDIO_UTILITIES%;C:\MinGW\msys\1.0\bin;%PATH%

:PATH_SET
echo ===================================================================
echo Environment variables configured correctly.
echo GCC COMPILER : %GCC_COMPILER%
echo E2 STUDIO BUILD FOLDER : %E2STUDIO_UTILITIES%
echo Synergy license file : %AMS_LICENSE_PATH%
echo ===================================================================
goto END_PROGRAM

:E2STUDIO_PATH_ERROR
echo ===================================================================
echo ERROR: You need to set the path for E2Studio 'Utilities' folder
echo ===================================================================
goto END_PROGRAM


:GCC_PATH_ERROR
echo ===================================================================
echo ERROR: You need to set the path for GCC compiler
echo ===================================================================
goto END_PROGRAM


:SYNERGY_LICENSE_ERROR
echo ===================================================================
echo ERROR: You need to set the path for the Synergy license
echo ===================================================================
goto END_PROGRAM


:END_PROGRAM
pause

a sample batch file is attached here (please rename it to .bat in order to use the file)

set_environment.batch

 

  1. replace the values for the environment variables in the batch file, with the values which are local to your machine. These are:
    1. The E2Studio utilities folder, E2STUDIO_UTILITIES
    2. The installation directory of the Synergy license file, AMS_LICENSE_PATH
    3. The installation directory of the GCC compiler, GCC_COMPILER
  2. open a command line prompt and run the batch file
  3. invoke the makefile located in the build directory, for example <project_name>\Debug\, by typing 'make' (without quotes)

What's Next

If everything is configured properly, the project should build successfully as if the build was invoked from within the E2Studio graphical environment