Resources | Resources |



MOD, MOD1, DLL, and DLL1

Brew MP supports two module formats for the device, MOD and MOD1, and two DLL formats for the Simulator, DLL and DLL1. Brew MP modules can be dynamically or statically linked with the platform.

  • DLL for the Simulator and MOD for the device ensures backwards compatibility with BREW. Certain new Brew MP capabilities may not be available to MOD applications such as code-sharing or implementation for service classes.
  • DLL1 for the Simulator, MOD1 for the device is an enhanced Brew MP format. All Brew MP capabilities are available to MOD1 applications.

The main difference between MOD and MOD1 is the file format. MOD is fully-linked executable code that can be run anywhere in RAM. MOD1 is in ELF format. The table below compares MOD and MOD1.

File format Fully-linked executable code ARM ELF
Module entry point AEEMod_Load(IShell* piShell, void* pvtStdLib, IModule** ppiModule);
  1. Provided by generated code from IDE wizard
  2. IShell object is the first object provided to every object when created.
  3. Supports AEEStdLib.h
IMod_New(IEnv* piEnv, AEEIID id, void** ppiMod);
  1. Provided by generated code from cifc.exe
  2. IEnv object is the first object provided to every object when created.
  3. AEEStdLib.h not supported with most of the alternatives available in AEEStd.h and AEEIEnv.h
Dependency on BREW application framework (BREW Shell) Yes - classes in MOD are IShell-based and are only usable inside the BREW Shell. No - classes in MOD1 are IEnv-based and are usable anywhere in the system.
Code sharing Per-process copy of code in RAM Single copy (if no writable data) in the entire system or per-Env copy (if writable data exists) of code in RAM
Code used for Service classes No Yes

The module loading functions are different. The MOD module loading function is inside AEEModGen.c when the IDE Wizard is used to generate the application framework. It shows that MOD receives a pointer to the BREW Shell and a pointer to AEEStdLib. Every class in MOD is given an IShell object when instantiated, and is an IShell-based class with a dependency on the BREW Shell.

The MOD1 module loading function is auto-generated by the CIF compiler (cifc.exe). MOD1 receives a pointer to Env. Every class in MOD1 is given an IEnv object when instantiated, and is an IEnv-based class. MOD1 executables cannot make use of the helper functions defined in AEEStdLib.h. Alternatives for many of these functions are available in a1std.lib (declared in AEEStd.h).