Keil Logo

near

The near memory type may be used for variables, constants, and functions. This memory is accessed using 16-bit addresses and may be on-chip or external.

  • For variables, near memory is limited to 16K, objects are limited to 16K and may not cross any n*(16K) page boundary, where n= {1,2,3,...). Variables declared near are located in the NDATA group.
  • For constants (ROM variables), near memory is limited to 16K, objects are limited to 16K and may not cross any n*(16K) page boundary, where n {1,2,3,...). Constant variables declared near are located in the NCONST group.
  • For program code (functions), near memory is limited to 64K. Program code declared near is stored in the default memory type, which is selected with the memory model. This is either NCODE or FCODE. Functions are invoked with the CALLA or CALLR instruction.

Note

  • The DPPUSE linker directive may be used to extend the amount of memory available to the NDATA and NCONST groups to a total of 64K.

Declare near objects as following:

unsigned char near near_variable;

unsigned char const near near_const_variable;

unsigned int near near_func (void)
{
return (0);
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.