Partager via


IMG Environment Variables (Compact 2013)

3/26/2014

IMG environment variables control image configuration options. You can change IMG variables from the properties page for your OS design project. If you change an IMG environment variable, you can rebuild just the run-time image instead of rebuilding your entire OS design. For more information about how to change IMG variables and rebuild the run-time image, see Procedures for IMG environment variables.

There are two categories of IMG environment variables.

  • IMG variables. These IMG variables add modules to your run-time image or change the image configuration.
  • IMGNO variables. These IMG variables exclude modules from your run-time image that are on by default. To exclude the module from your final run-time image, set the IMGNO variable to 1.

The tables in the following sections describe the IMG and IMGNO variables.

IMG environment variables

The following table shows IMG environment variables. Many of these variables control debugging options that should not be enabled in a shipped product.

Environment variable

Description

IMGASLRENABLE

Enables Address Space Layout Randomization (ASLR), a computer security technique in which the positions of key data areas are rearranged randomly within the address space for a process.

IMGAUTH

Enables run-time images to be keyed to a specific device. This variable makes sure that the images are flashed only on the selected device.

When the device starts, it validates the run-time image signature by making sure that the signature matches the hardware device ID.

IMGAUTOFLUSH

Configures CeLog to automatically flush events to a specified directory.

Ee479025.note(en-us,WinEmbedded.80).gifNote:
Do not include CeLog on a shipping device because the logging that CeLog performs can reduce system performance. Also, omitting CeLog reduces the attack surface through which a malicious user could try to compromise the system.

IMGCELOGENABLE

Adds CELog.dll to the run-time image and initializes event logging when the run-time image starts.

Ee479025.note(en-us,WinEmbedded.80).gifNote:
Do not include CeLog on a shipping device because the logging that CeLog performs can reduce system performance. Also, omitting CeLog reduces the attack surface through which a malicious user could try to compromise the system.

IMGEBOOT

Reserves space for the boot loader in ROM.

IMGFLASH

This environment variable is available to board support package (BSP) vendors for custom implementation.

IMGHDSTUB

Adds OS awareness for hardware-assisted debugging.

IMGMULTIXIP

Controls the BIB selections that allow componentization of BIN files. The exact implementation of this variable is BSP-specific.

IMGNXSUPPORT

Adds OS support for ARM’s “No eXecute” functionality.

IMGOSCAPTURE

Adds OSCapture.exe to the run-time image. It starts buffering events in RAM when the run-time image starts.

IMGPROFILER

Enables Monte Carlo kernel profiling in the run-time image. For more information, see Running the Kernel Profiler in Monte Carlo Mode.

Because the profiler takes up memory and reduces performance, you will usually turn this option off in shipping devices.

IMGRAMx variables

This set of IMG variables configure the run-time image to use a designated amount of RAM. On some platforms, the run-time image will automatically resize based on the amount of RAM available. Use one of the IMGRAM variables to specify the size of the run-time image:

  • IMGRAM16 = 16 MB
  • IMGRAM32 = 32 MB
  • IMGRAM64 = 64 MB
  • IMGRAM128 = 128 MB
  • IMGRAM256 = 256 MB
  • IMGRAM512 = 512 MB

IMGRILCOM1

Configures the RIL driver to open COM1 instead of COM2 for the AT command/response port.

IMGSIGN

Includes the signature extension block in the ROM header.

IMGTINYFSRAM

Sets FSRAMPERCENT that reduces the RAM allocated for the file system.

For more information, see Binary Image Builder (.bib) File and FSRAMPERCENT.

IMGTRUSTROMONLY

Sets ROMFLAGS that configures the run-time image to trust only modules in ROM.

For more information, see Binary Image Builder (.bib) File and ROMFLAGS.

IMGDUALPORTRIL

Configures the RIL driver to use a MUX driver instead of a raw serial driver.

IMGNO Variables

The following table shows the IMGNO environment variables. Set these variables to 1 to exclude “always on” features from your run-time image.

Environment variable

Description

IMGNODEBUGGER

Excludes debugger support from the run-time image.

IMGNOKITL

Excludes KITL support from the run-time image.

IMGNOSMP

Excludes symmetric multiprocessing (SMP) support from the kernel. On most devices that are not SMP hardware platforms, SMP support causes no issues. However, if you see issues during boot up on non-SMP hardware platforms, try setting this variable to 1.

IMGNOLOC

Excludes localization functionality from the run-time image.

IMGNOREDIR

Excludes support for the release directory file system from the run-time image. Set this option to prevent the device from access files on the connected development computer.

IMGNOSHAREETH

Excludes VMINI support from the run-time image.

Setting this environment variable might require you to perform a rebuild of the BSP. For more information, see Build a BSP.

Procedures for IMG environment variables

Use the following procedures to change the IMG variables and rebuild the run-time image. You can rebuild the run-time image either from within Platform Builder or from the command line.

To change an IMG environment variable

  1. Open your OS design in Visual Studio.

  2. On the Project menu, select Properties to open the Property Pages dialog box.

  3. In the Configuration drop-down list box, select the build configuration you want to modify. If this OS design supports more than one BSP, use the Platform drop-down list box to select the BSP you want to change.

  4. On the left of the Property Pages dialog box, expand Configuration Properties, and then select Build Options.

  5. Select the IMG environment variable you want to change, use the drop-down arrow on the right to select the new value, and then click OK.

To rebuild the run-time image from Platform Builder

  1. Open your OS design in Visual Studio.

  2. On the Build menu, select Make Run-time Image.

To rebuild the run-time image from the command line

  1. Open a command window.

  2. Change the command path to the flat release folder for the OS design that you want to build.

    Tip

    If you are not certain where the flat release folder is, open Platform Builder. On the Build menu, select Open Release Directory in Build Window to open a command window with the path set to the release folder.

  3. At the command prompt, type makeimg.exe. For more information about Makeimg.exe, see Make Binary Image Tool (Makeimg.exe).

See Also

Reference

BSP Environment Variables
PRJ Environment Variables
Miscellaneous Environment Variables

Other Resources

Environment Variables