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

Developer

resources

Building the application

This section covers building the application for Simulator and device.

This primer compiles a sample application from the command-line, using a makefile and make.d. The makefile for c_basicapp is included in the samplecode folder installed on your machine from the SDK Manager.

Building the application for Win32 - Simulator

The Brew MP Simulator uses a Dynamic Link Library (DLL) as the application executable. This section covers building the Brew MP application DLL for simulation.

To run the make command to compile the c_basicapp example for Win32 with debug symbols, follow these steps:

  1. In a command-prompt, go to the %VS90COMNTOOLS% directory and run vsvars32.bat to set VCINSTALLDIR and other environment variables needed by Visual Studio Express.
  2. Go to the c_basicapp directory, and enter the following in the command prompt:

    cs-make SHELL=cmd

Note: SHELL=cmd may not be required in all cases.

Building the application for the RVCT22arm9 platform - device

  1. In a command-prompt, go to the %VS90COMNTOOLS% directory and run vsvars32.bat to set VCINSTALLDIR and other environment variables needed by Visual Studio Express.
  2. Go to the c_basicapp directory, and enter the following in the command prompt:

    cs-make SHELL=cmd

The device uses the MOD file as the application executable.

  1. Open a command prompt window. In the c_basicapp directory, type the following command and press Enter.

    DEVICE specifies where the MIF and MOD will get created.

    cs-make V=RVCT22arm9_Debug install MIF_INSTALL_DIR=DEVICE MOD_INSTALL_DIR=DEVICE

Package the application

When your application is ready to run on device, you need to package the files to run on device.

  • To create a *.brewmp file for installation on device, enter the following in the command-line prompt:

    "%BREWMP_TOOLSET%\bin\bmppackager" <directory containing binaries to package>

To run the application on device and test the application with the Brew MP Debugger you need to package the files and Debugger (CDB) module to run on device.

  • To package the CDB module for debugging, enter the following in the command-line prompt:

    "%BREWMP_TOOLSET%\bin\bmppackager" "%BREWMP_TOOLSET%\bin\cdb"

For help with bmppackager, type the following:

"%BREWMP_TOOLSET%\bin\bmppackager" -h