This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C167 - Using of "segmented cpu mode" with SMALL memory model

Using the SMALL memory model of the C167, I have forced a function to be "far". The compiler generates the segmented call to this function (CALLS) but the linker/locater tries to allocate the code into the NCODE class instead of the FCODE class. The total program size overlaps the maximum allowed size of the NCODE class (64k) and the linker/locater generates the following message:

ERROR L116: SIZE OF CGROUP EXCEEDS 64K
GROUP: NCODE (1)


But from the Keil C166 User Guide:

The SMALL model uses the segmented CPU mode.
Variables are located in the near area and function calls generate near calls. This gives the same efficient code as the
TINY model, but code and data are not limited to 64KB.
The user can locate variables and functions with the far,huge, and xhuge memory types. These memory types enable full use of the 166/167 address capabilities.


Could anyone help me to solve the problem?

Thank you very much.

0