Keil Logo

far

The far memory type may be used for variables and constants. This memory is accessed using 24-bit addresses and may be on-chip or external.

  • For variables, far memory is limited to 16M. Objects are limited to 64K and may not cross a 64K boundary (the linker ensures that). Variables declared far are located in the HDATA memory class.
  • For constants (ROM variables), far memory is limited to 16M. Objects are limited to 64K and may not cross a 64K boundary (the linker ensures that). Constant variables declared far are located in the HCONST group.

Declare far objects as follows:

unsigned char far far_variable[0x10000];

unsigned char const far far_const_variable[0x4000] =
  { 1, 2, 3, ... };

unsigned int i;

unsigned char far_func (void) {
  return (far_variable[i]);
}

  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.