Keil Logo


Information in this article applies to:

  • C166 Version 4.03


When I build my project, I get the following warning message:

Warning 23: NDATA/NDATA0 or NCONST must fit in one 16kb page

My NDATA is defined using the CLASSES directive as:

NDATA(0x200000 - 0x20BFFF)


You can only specify ranges of memory totalling up to 16kb in size for NDATA using the CLASSES directive. In addition, a range of memory must not cross a page boundary. By only specifying the start address for NDATA it, has the same effect as trying to specify a range larger than 16kb.

The following examples will generate the warning:

  • NDATA(0x0000 - 0x4000) - more than 16kb in the range
  • NDATA(0x1000 - 0x4000) - crosses a page boundary
  • NDATA(0x0000 - 0x1000, 0x2000 - 0x4000) - crosses a page boundary
  • NDATA(0x0000) - no range so the linker assume the range is larger than 16kb

The following examples will work:

  • NDATA(0x0000 - 0x3FFF) - 16kb range
  • NDATA(0x0000 - 0x1000) - less than 16kb in the range
  • NDATA(0x1000 - 0x2000) - less than 16kb in the range
  • NDATA(0x0000 - 0x1000, 0x2000 - 0x3000) - totals less than 16kb


You need to adjust your NDATA address ranges so they total less than 16kb and do not cross a page boundary. If you need more than 16kb of NDATA, then you can reassign the Data Page Pointers and obtain up to 48kb of contiguous NDATA memory.

For example, to specify an NDATA range from 200000H to 20BFFFH, you would use the linker DPPUSE directive in the following way:

DPPUSE (0=NDATA (0x200000-0x20BFFF), 3=NCONST (0xC000-0xFFFF))

The can be set up in µVision by completing the following steps:

  • Choose Options for Target from the Project menu
  • Click on the L166 Locate tab
  • Check the DPPUSE option so the DPPUSE directive will be specified
  • Select DPP0 for NDATA and enter the range 0x200000 - 0x20BFFF
  • Select DPP3 for NCONST and enter the range 0xC000 - 0xFFFF (DPP3 always has to point to page three

You can then specify the full NDATA range using the CLASSES directive and the warning will not be generated.

Note that if you specify an NDATA range of 0x10000 - 0x1FFFF, for example, using the DPPUSE directive, then you may specify multiple ranges of NDATA using the CLASSES directive inside of the DPP NDATA range. For example:

DPPUSE(0 = NDATA(0x10000 - 0x1FFFF), 3 = NCONST(0xC000 - 0xFFFF))

CLASSES(NDATA(0x00000 - 0x01000, 0x1A000 - 0x1FFFF))


Last Reviewed: Friday, July 15, 2005

Did this article provide the answer you needed?
Not Sure
  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.