This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Why I use Perl ccs_scripting just read PC ok and print , when I want read other registers , it can't print.

I  write a  Perl   script  "ccs_test.pl"  to  run  ccs  v3.3. 

run  perl  ccs_test.pl .

when   I   just  read  pc  register ,it  tests  ok  and  print.

while ($nPCVal != $nMainAddr){
$MyCCScripting -> TargetStepIntoAsm();
$nPC = $MyCCScripting -> RegisterRead("PC");
$sHexOutput = sprintf("PC :0x%x\n", $nPC,);
print $sHexOutput;
}

but   when  I   read  other  registers  like  "SP", it  can't  print   and  aways  Testing..., this  is  why ? can  you help  me ?

while ($nPCVal != $nMainAddr){
$MyCCScripting -> TargetStepIntoAsm();
$nPC = $MyCCScripting -> RegisterRead("PC");
$nSP = $MyCCScripting -> RegisterRead("SP");
#$nAR0 = $MyCCScripting -> RegisterRead("AR0");
#$nST1 = $MyCCScripting -> RegisterRead("ST1");
$sHexOutput = sprintf("PC :0x%x, SP : %x\n", $nPC, $nSP);
print $sHexOutput;
}