$REVOLUTION_SDK_ROOT/build/demos/rsodemo/LinkMem2
This is a demo program showing allocation of a dynamic module to external main memory (the MEM2 area).
Module E (e.rso) allocated to external main memory and module F (f.rso) allocated to internal main memory are set to call functions from each other.
Typically, branch instructions (bx) have only a 28-bit offset (± 32 MB). Therefore, when a dynamic module is placed in external main memory (MEM2), functions in internal main memory (MEM1) cannot be accessed. To avoid this, instruct the compiler to use branching in the 32-bit absolute address using pragma.
When module E is placed in MEM2, the static module function (such as OSReport) and a function from module F in MEM1 (IsFThere) must be set as a branch using the 32-bit absolute address.
For this reason, the sample program will set those function as a branch of 32-bit absolute address when called within module E, as follows:
|
Also, because module F calls a module E function (IsEThere), they are set as follows:
|
Note as of 2006/06/15:
Certain runtime codes may not be properly called in 32-bit codes in the release version.
As a temporary remedy, use_lmw_stmw pragma is currently applied to avoid the use of those run-time codes.
This is applied to modules placed in the external main memory.
This is used in e.c in the sample.
This is also true for the compile option -use_lmw_stmw on.
|
Sample List
RSOListInit,
RSOLinkList,
RSOUnLinkList,
RSOFindExportSymbolAddr,
RSOIsImportSymbolResolvedAll,
2006/06/14 Initial version.
CONFIDENTIAL