Home > User Support > CoverageMaster winAMS FAQ
Question:
I am performing a simulation with a RH850 environment, but the value of a variable for the function being tested is incorrect. How do I fix it?
Answer:
The correct values may not have been set for the RH850 GP (Global Pointer), TP (Text Pointer), and EP (Elementary Pointer) registers.
With the RH850, memory access instructions relative to GP/TP/EP are frequently used. These register values are normally set during the startup processing of the program. If "set reg PC = ..." is set in the CoverageMaster startup command file and the execution of the startup processing for the program is skipped, the simulation will be executed without entering appropriate values to these registers.
In this case, the problem can be avoided by setting the value to the registers by writing "set reg GP = ..." etc. in the CoverageMaster startup command file. The value to be set can be found in the map file generated at build time.
Example when using Green Hills compiler
.sda_start 00402498+000000 __gp
.rosda_start 00401c78+000000 __tp
.tdata ffff8000+000000 __ep
Find the lines like the above in the map file, then set the values found in the map file to the registers in the startup command file like below.
set reg GP = 0x402498
set reg TP = 0x401c78
set reg EP = 0xffff8000
Other technical tips in GAIO's web site can be searched for using the links below.
Search key word link: Cortex-A | Cortex-R | Simulation Error | calling a sub-function
Technical Tips Google Search