This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

runtime changing memroy model in c51

in c51 you can set memory model for each "procedure" and set memory model of "program"

but:

how change mamory model of "program" in runtime !

for example in my program require start with only internal memory(256 byte) for cheaking and initializing program and if fault in xmemory report it.
but internal memory model such as "local stack" is very low for running main program contain in main.how change it for run program

how do it ?

Parents
  • It is not possible!

    The memory model is purely a compile-time option; it simply tells the compiler the default location for variables.

    Note that it only specifies the default - you can override this whenever you wish by explicitly stating the required mspace.

    Thus, if you want most of your variables in XDATA, use LARGE; and just specify DATA, IDATA or PDATA where specifically required.

Reply
  • It is not possible!

    The memory model is purely a compile-time option; it simply tells the compiler the default location for variables.

    Note that it only specifies the default - you can override this whenever you wish by explicitly stating the required mspace.

    Thus, if you want most of your variables in XDATA, use LARGE; and just specify DATA, IDATA or PDATA where specifically required.

Children
No data