Forums

CCS v3.3 - Perl Scripting Automation Error

Started by adit...@gmail.com June 17, 2008
Hi all,

I'm trying out a very basic perl script to build,load and run a project.
I want to get the address at a symbol so that i can set the breakpoint there.

When it comes to getting the symbol address, i get the following error:

Code composer exception caught during SymbolGetAddress: Automation error in Code Composer Studio.

However i dont get the error when i run the script after starting CCS and the opening the project manually.

What could be the reason? Below is my script.

*****************************************************************
use CCS_SCRIPTING_PERL;

my $MyCCScripting = new CCS_SCRIPTING_PERL::CCS_Scripting();
my $MyProgram;
my $MyPath;
my $MyPCVal;
#my $MainVal;
#my $LogFile;

$MyPath = "C:\\Documents and Settings\\a0271977\\My Documents\\DSPBIOS guide\\perl samples";
$MyProgram = "C:\\CCStudio_v3.3\\MyProjects\\filt\\filt.out";
$MyProject = "C:\\CCStudio_v3.3\\MyProjects\\filt\\filt.pjt";

$MyCCScripting -> CCSOpenNamed("*","*",1);
print "CCS open\n\n";

$MyCCScripting -> ProjectOpen($MyProject);
print "Project opened\n\n";

$MyCCScripting -> ProjectBuild("Debug",1);
print "Built..\n\n";

#$MyCCScripting -> ProgramLoad($MyProject);
print ".out loaded\n\n";

#$MainVal = $MyCCScripting -> SymbolGetAddress("main");
$MainVal = $MyCCScripting -> SymbolGetAddress("generate");
print "Generated\n\n";

$MyCCScripting -> BreakpointSetAddress($MainVal);
print "Break point set\n\n";

$MyCCScripting -> TargetRun();
print "Program runs...\n\n";

$MyPCVal = $MyCCScripting -> RegisterRead("PC");
print "Register value read..\n\n";
print "PC points to: $MyPCVal \n\n";

****************************************************************
Appreciate your help.

-Aditya