Keil Logo Arm Logo

Groups

A group is a shorthand which is used to reference a collection of sections that all reside within one data page (for data groups) or segment (for code groups). Groups define address-range limits for their references sections. Two group types are supported:

  • A CGROUP is a CODE group. The sections in a group of this type contain program code. They must be located within a 64K range. This rule allows the entire group of sections to be addressed with offsets from a single code segment. The CSP register need not be changed when addressing any section in one CODE group.
  • A DGROUP is a DATA group. The sections in a group of this type contain program data. They must be located within a 16K range. This rule allows the entire group of sections to be addressed with offsets from a single data page. The DPP register need not be changed when addressing any section in one DATA group.

Groups permit efficient addressing within the module. The L166 Linker does not manipulate group sections to ensure they fall within the valid address range. However, if they do not fit the range, the linker issues an error message. The sections included in a group are not required to be contiguous in memory. The only requirement is that all sections defined in a group must reside within one code segment or one data page.

The C166 Compiler automatically generates the following groups for program code sections, constant data sections, and variable data sections.

Name Type Description
NCODE CGROUP Near program code.
NCONST DGROUP Near constant variables defined as const.
NDATA DGROUP Near variables (both initialized and uninitialized).
SDATA DGROUP Variables stored in sdata, idata, and bdata.

Keil logo

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