메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

Do I need to set values for the gp and ep registers in the startup routine?

Latest Updated:02/27/2015

Question:

Do I need to set values for the gp and ep registers in the startup routine?

Answer:

If there is gp or ep-register-relative section, the value of that register must be set. The C compiler package for the RH850 family (CC-RH) generates code on the assumption of correct values having been set in the gp and ep registers. Such values not having been set will lead to illegal access.

The symbols "__gp_data" and "__ep_data" for use in the startup routine are handled as follows.

  • If the user has defined a value for a symbol, that value is used.
  • If the user has not defined a value for a symbol, the linker automatically determines a value for it.

For the rules on how a linker automatically determines values, refer to its manual.

Suitable Products
C Compiler Package for RH850 Family