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

Developer

resources

Helper functions

The Brew MP application execution environment (AEE) provides helper functions The various helper functions provided by the AEE include string functions, functions in the standard C library, utility functions, and other items. Standard C library refers to the ANSI standard C library supplied with C/C++ compilers/Integrated Development Environments.

Some of the helper functions offered by AEE are wrappers that directly call the standard C library functions to do the following:

  • Eliminate unnecessary linkage with the standard C library. When there are multiple applications loaded on the device, each application carries the extra baggage of the standard C runtime library. To avoid this, AEE maintains a single copy of the standard C library. All applications can make use of this copy. Applications must not make direct calls to the standard C library functions, so that the static C runtime library does not become part of the binary image.
  • Eliminate static data in dynamic applications. Linkage to standard C library functions can introduce static data into an application, preventing it from being dynamically loadable.

Applications must not directly invoke the standard C library functions (memcpy(), for example). Instead, applications must use the helper functions provided by the BREW AEE such as MEMCPY(). A distinct difference between the helper functions and the rest of the AEE functions is that interface-specific information is not needed to access the helper functions.