Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Command Line Environment Setup

This topic covers setup of your development environment.

Prerequisites/Environment setup

The http://developer.brewmp.com/tools/sdk on the Brew MP website provides information about the required software to proceed through this primer. You should complete all the steps under Setup for C/C++ Environment - command-line.

Once you have installed the required software, make the following changes to environment variables:

  • Remove C:\utils\Cygwin\bin from the Path environment variable
  • Remove the path to make.d from the Path environment variable (the path to the make.d that used to be in the Brew MP SDK)
  • Ensure CodeSourcery bin precedes Cygwin or other bin\utils tool in PATH. For instance:

    Add C:\Program Files\CodeSourcery\SourceryG++Lite\bin to the PATH environment variable.

    This example uses RVCT 2.2.

Sample code setup

This primer uses a sample included with the Brew MP SDK sample code. The sample code is installed to your machine via the Brew MP SDK Manager.

  1. Click the Setup tab of the SDK Manager.
  2. For the current toolset, next to Sample Code, select Install.
  3. Follow the prompts to complete the installation of the sample code.

Create a simulation target

Prior to using the Simulator, you need to create a target. This step is optional if you already have a target. Targets are based on device profiles. For more information on simulation targets and device profiles, see the Simulator Help and Target Manager Help, in the Brew MP Tools Reference.

  1. You will need a profile name to create your target from. To view the list of available profiles, enter the following in the command-line prompt.

    "%BREWMP_TOOLSET%\bin\tm" lp

  2. To create a target, enter the following in the command-line prompt:

    "%BREWMP_TOOLSET%\bin\tm" create

    Where is the name of the target to be created, and is the name of the profile the target is based on.

Launch simulation target

  1. You need the target name to launch it from the command-line. To get a list of simulation targets (both off and on), enter the following in the command-line prompt:

    "%BREWMP_TOOLSET%\bin\tm" lt -Sim

  2. Once you have your , you can turn on the target by typing the following in the command-line prompt:

    "%BREWMP_TOOLSET%\bin\simulator.exe" "<target_name>"

    The Simulator will be launched running .

Be sure to take note of the target name, you will need it to load the application.

Device Setup

Steps to prepare your PC and Brew MP device for running Brew MP applications are covered in Device setup.

  1. Connect one or more physical targets to PC (USB port, internet), and turn physical target(s) on.
  2. Make sure the device is in developer mode.
  3. To obtain a list of connected devices, enter the following on the command-line prompt:

    "%BREWMP_TOOLSET%\bin\ct" -g usb listtargets

    Note: If the connected device(s) does not show up in the list the phone needs to be put in developer mode and reset. The USB driver should also be properly installed once the device has rebooted. If it is not Windows will prompt you to install the USB driver from the SDK.

  4. Check if the device is signature file enabled by entering the following on the command-line prompt:

    "%BREWMP_TOOLSET%\bin\ct" -p <target_desc> -g usb enablestatus

    Note: <target_desc> is not needed if only one device is connected.

  5. If the device needs to be signature file enabled, enter the following on the command-line prompt:

    "%BREWMP_TOOLSET%\bin\ct" -p <target_desc> -g usb sigenable <sig file path>

    Note: <target_desc> is not needed if only one device is connected.

    To enable the device using a developer.brewmp.com username and password (username/password enabled) enter the following on the command-line prompt:

    Note: DES enablement requires you to be an autheticated developer. Click Get Authenticated on the http://developer.brewmp.com for more information.

    %BREWMP_TOOLSET%\bin\ct" -p <target_desc> -g usb desenable -u <username>

    Note: <target_desc> is not needed if only one device is connected.

    You will then be prompted for the password.