Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

as we know,we should not use global variable in dynamic app, and aeeappgen.c,aeemodgen.c will be included in every dynamic, so also these two c file also should not use global variables.

but, i see below code in aeeappgen.c:

#ifdef AEE_SIMULATOR
// IMPORTANT NOTE: g_pvtAEEStdLibEntry global variable is defined for
// SDK ONLY! This variable should NOT BE:
//
// (1) overwritten
// (2) USED DIRECTLY by BREW SDK users.
//
// g_pvtAEEStdLibEntry is used as an entry point to AEEStdLib,
AEEHelperFuncs *g_pvtAEEStdLibEntry;
#endif

why it can use global variable g_pvtAEEStdLibEntry?

thanks a lot,

nicefuture

see again - that is only needed for brew simulator code - it does not actually make it to device.
in your app, if you want, even u can give global variables - if needed. all such code MUST be put under AEE_SIMULATOR macro though.

see again - that is only needed for brew simulator code - it does not actually make it to device.
in your app, if you want, even u can give global variables - if needed. all such code MUST be put under AEE_SIMULATOR macro though.