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.

a problem for using perl script to run c28335 project on ccs 3.3

Other Parts Discussed in Thread: CCSTUDIO

I  build   a  c28335  project  on  ccs3.3 , and  write  a   perl  script,  when  i   run  the  script   , It aways  appear   follow message.


D:\CCStudio_v3.3\bin\utilities\ccs_scripting\Examples\Perl>perl c28_test_Debug.pl

Exception caught during CCSConfigClear : Automation Error in Code Composer Studio

 

the file  is  my  perl script file , can you tell me what  problems for it ?

c28_test_Debug.pl.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# ccs_Debug.pl
# Demonstrates some of Code Composer Studio Scripting's debugging functionality
# Pulls in the Code Composer Studio Scripting declarations and definitions
use CCS_SCRIPTING_PERL;
# Declarations and Initializations
# Create 2 new Code Composer Studio Scripting objects
my $MyCCScripting = new CCS_SCRIPTING_PERL::CCS_Scripting();
my $MyCCScripting2 = new CCS_SCRIPTING_PERL::CCS_Scripting();
my $sCurDir;
my $sLogFile;
my $sProject;
my $sProgram;
my $nPCVal;
my $nPCVal2;
my $nMainAddr;
my $nBreakpoint1;
my $nBreakpoint2;
my $sHexOutput;
my $sBoardName;
my $sCPUName;
my $sVersion;
$sProject = ".\\c28_test\\c28_test.pjt";
$sProgram = ".\\c28_test\\Debug\\c28_test.out";
$sLogFile = ".\\c28_test_ccs_Debug.log";
$sCurDir = ".\\";
#print ("Testing...\n");
# Open log file and set to maximum level of debug output
$MyCCScripting -> ScriptTraceBegin($sLogFile);
$MyCCScripting -> ScriptTraceVerbose($CCS_SCRIPTING_PERL::VERBOSE_ALL);
# Get the current version of Code Composer Studio Scripting
#$sVersion = $MyCCScripting->ScriptGetVersion();
#$MyCCScripting -> ScriptTraceWrite("$sVersion\n");
#print "$sVersion\n";
# Open Code Composer Studio for the C55x Phase 3 Simulator
#$MyCCScripting -> CCSOpen($CCS_SCRIPTING_PERL::ISA_C55,
# 0,
# 0,
# $CCS_SCRIPTING_PERL::PLATFORM_SIMULATOR,
# 1);
# Alternatively --
# Clear current Code Composer Studio configuration
# Configure for a c55x simulator
# Open that as the default Code Composer Studio configuration
# Make the Code Composer Studio application not visible
# The CCSConfigImport API requires an absolute pathname to the configuration file
$MyCCScripting -> CCSConfigClear();
$MyCCScripting -> CCSConfigImport("c:\\CCStudio_v3.3\\drivers\\import\\f2812_sim.ccs");
$MyCCScripting -> CCSOpenNamed("*", "*", 0);
# Retrieve the Board name and CPU name of the current configuration
# and write names to log file
#$sBoardName = $MyCCScripting -> TargetGetBoardName();
#$sCPUName = $MyCCScripting -> TargetGetCPUName();
#$MyCCScripting -> ScriptTraceWrite("Board Name: $sBoardName\n");
#$MyCCScripting -> ScriptTraceWrite("CPU Name: $sCPUName\n\n");
# The previous Board name and CPU name can be used to open other instance of Code Composer Studio
#$MyCCScripting2 -> CCSOpenNamed($sBoardName, $sCPUName, 0);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



 

 

  • Hello,
    What version of Perl are you using? And cam you attach the generated scripting log file?

    Thanks
    ki
  • I  used  ActivePerl58  .

    the  srcripting log file .

    c28_test_ccs_Debug.log
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    // Log started at: Fri Jun 05 09:53:15 2015
    ScriptTraceVerbose : Succeeded
    GetLastErrorId:
    GetLastErrorId : Succeeded
    InternalGetLastErrorId:
    InternalGetLastErrorId : Succeeded
    GetLastErrorText:
    GetLastErrorText : Succeeded
    CCSConfigClear:
    - Creating SystemSetup object
    - Clearing configurations
    Exception caught during CCSConfigClear : Automation Error in Code Composer Studio
    Exception caught during CCSConfigClear : Automation Error in Code Composer Studio
    GetLastErrorId:
    GetLastErrorId : Succeeded
    InternalGetLastErrorId:
    InternalGetLastErrorId : Succeeded
    GetLastErrorText:
    GetLastErrorText : Succeeded
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • when I use the script to only print the pc value , It can run , but when I print ACC or AR0 - AR7 , It can't run the script . this is why ? the print message is in my c28_test_Debug.pl
  • I used  perl58,  when I use the script to only print the pc value , It can run , but when I print ACC or AR0 - AR7 , It can't run the script . this is why ? the print message is in my c28_test_Debug.pl

  • Printing the other register values (ACC, etc) should not have any impact on being able to clear the target configuration. I am unable to reproduce the issue. One thing to check is if some other process is using cc_setup.

    Can you also give me your latest script and your c28_test project?

    thanks
    ki
  • now   the  script  just  print  pc  can  run  ok, when  I  add print  acc and other  registers can't   print.   How  to  modify   the   script

    8863.c28_test_Debug.pl.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    # ccs_Debug.pl
    # Demonstrates some of Code Composer Studio Scripting's debugging functionality
    # Pulls in the Code Composer Studio Scripting declarations and definitions
    use CCS_SCRIPTING_PERL;
    # Declarations and Initializations
    # Create 2 new Code Composer Studio Scripting objects
    my $MyCCScripting = new CCS_SCRIPTING_PERL::CCS_Scripting();
    my $MyCCScripting2 = new CCS_SCRIPTING_PERL::CCS_Scripting();
    my $sCurDir;
    my $sLogFile;
    my $sProject;
    my $sProgram;
    my $nPCVal;
    my $nPCVal2;
    my $nMainAddr;
    my $nBreakpoint1;
    my $nBreakpoint2;
    my $sHexOutput;
    my $sBoardName;
    my $sCPUName;
    my $sVersion;
    $sProject = ".\\c28_test\\c28_test.pjt";
    $sProgram = ".\\c28_test\\Debug\\c28_test.out";
    $sLogFile = ".\\c28_test_ccs_Debug.log";
    $sCurDir = ".\\";
    #print ("Testing...\n");
    # Open log file and set to maximum level of debug output
    $MyCCScripting -> ScriptTraceBegin($sLogFile);
    $MyCCScripting -> ScriptTraceVerbose($CCS_SCRIPTING_PERL::VERBOSE_ALL);
    # Get the current version of Code Composer Studio Scripting
    #$sVersion = $MyCCScripting->ScriptGetVersion();
    #$MyCCScripting -> ScriptTraceWrite("$sVersion\n");
    #print "$sVersion\n";
    # Open Code Composer Studio for the C55x Phase 3 Simulator
    #$MyCCScripting -> CCSOpen($CCS_SCRIPTING_PERL::ISA_C55,
    # 0,
    # 0,
    # $CCS_SCRIPTING_PERL::PLATFORM_SIMULATOR,
    # 1);
    # Alternatively --
    # Clear current Code Composer Studio configuration
    # Configure for a c55x simulator
    # Open that as the default Code Composer Studio configuration
    # Make the Code Composer Studio application not visible
    # The CCSConfigImport API requires an absolute pathname to the configuration file
    $MyCCScripting -> CCSConfigClear();
    $MyCCScripting -> CCSConfigImport("c:\\CCStudio_v3.3\\drivers\\import\\f2812_sim.ccs");
    $MyCCScripting -> CCSOpenNamed("*", "*", 0);
    # Retrieve the Board name and CPU name of the current configuration
    # and write names to log file
    #$sBoardName = $MyCCScripting -> TargetGetBoardName();
    #$sCPUName = $MyCCScripting -> TargetGetCPUName();
    #$MyCCScripting -> ScriptTraceWrite("Board Name: $sBoardName\n");
    #$MyCCScripting -> ScriptTraceWrite("CPU Name: $sCPUName\n\n");
    # The previous Board name and CPU name can be used to open other instance of Code Composer Studio
    #$MyCCScripting2 -> CCSOpenNamed($sBoardName, $sCPUName, 0);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    2577.c28_test.zip

  • Thanks for the files. However I can still run the script even if I print ACC and the other registers.

    However I was having issues with the ProjectOpen call on line 72. I commented that line out. Just curious... can you try commenting that line out and run the script again?

    Thanks
    ki