13.07.2015 Views

TASKING VX-toolset for 8051 User Guide

TASKING VX-toolset for 8051 User Guide

TASKING VX-toolset for 8051 User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>8051</strong> <strong>User</strong> <strong>Guide</strong>Memory modelDescriptionLetterMax RAM sizeDefault data memory typeSmallDirect addressableinternal RAMs128 bytes__dataAuxiliary pageOne page of externalRAMa256 bytes__pdataLargeExternal RAMl64 kB__xdataEach memory model defines a default memory type <strong>for</strong> objects that do not have a memory type qualifierspecified. By default, the <strong>8051</strong> compiler uses the small memory model.With the C compiler option --modelyou can specify another memory model. Per memory model you can choose to use reentrancy whichenables you to call functions recursively.You can overrule the default memory type with one of the memory type qualifiers. This allows you toexceed the default maximum RAM size. For in<strong>for</strong>mation on the memory types, see Section 1.2.1, MemoryType Qualifiers.Small memory modelBy default the <strong>8051</strong> compiler uses the small memory model. In the small memory model all data objectswith the default memory type and the stack (used <strong>for</strong> function parameter passing) must fit in the directaddressable area of internal RAM. Objects with an explicit memory type qualifier can exceed this limitation(<strong>for</strong> example an object qualified as __xdata or __pdata). Note that the stack length depends upon thenesting depth of the various functions. Accessing data in internal RAM is considerably faster than accessingdata in external RAM. There<strong>for</strong>e, it is useful to place often used variables in internal data memory andless often referenced data elements in external data memory.Large memory modelWhen the compiler uses the large memory model to access data, the produced code is larger and insome cases slower than the code <strong>for</strong> a similar operation in one of the other memory models.Auxiliary page memory modelThe auxiliary page memory model is especially interesting <strong>for</strong> derivatives with 256 bytes of 'external' RAMon chip. All data objects with the default memory type must fit in one 256 bytes page.ReentrancyOptionally you can choose to enable reentrancy. If you select reentrancy, a (less efficient) virtual dynamicstack is used which allows you to call functions recursively. With reentrancy, you can call functions at anytime, even from interrupt functions.Select the memory model in EclipseTo select the memory model to compile <strong>for</strong>:1. Select C Compiler » Memory Model.2. Select the Small, Auxiliary or Large compiler memory model.6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!