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.

automating startup connection/loading of 64x+ processor on OMAP35x EVM

Other Parts Discussed in Thread: OMAP3530

 

i'm building an application for the 64x+ target processor on the OMAP 35x EVM board from Mistral. i'm building this app outside of the CCS IDE and would like to automate the process of opening up CCS, connecting to the Cortex A8 core, running the GEL script to release the 64x+ from reset, then connecting to the 64x+ processor, downloading the app and running it. What is the recommended method for accomplishing this. I have a perl script that i used to do something similar on a 6713 target board, but this was not a multicore setup. in looking at the  CCS scripting API, its not clear that this would be supported? I was looking into changing the GEL script specified for the Cortex processor in the CCS setup, and modifying that to run the  IVA22_GEM_startup() function by calling it from the startup() function but it doesn't appear to be working?

thanks for any help

Rob

 

 

  •  

    wanted to add some more data on this...

    using CCS v3.3 SR12  (version 3.3.82.13)

    HW setup is Spectrum Digital XDS560R emulator connected to a TI/Mistral  OMAP35x EVM board.

    i recently upgraded the emulator drivers from Spectrum Digital website, which populated some more recent configurations for the OMAP35x into the CCS v3.3 install directory.

    when running Setup CCS v3.3 i've selected the OMAP3530 SDXDS560RUSB Emulator from the list of available Factory Boards as shown below

     

     

    the sequence that i can perform manually, and is successful is as follows

    1. open up CCS, which brings up the Parallel Debug Manager (PDM)
    2. open and connect to the CortexA_0 processor
    3. select GEL->IVA2200_Startup->IVA22_GEM_Startup to run the IVA22_GEM_Startup() function & release the 64x+ from reset
    4.  open and connect to C6400PLUS_0 DSP processor
    5. load my executable uut_inte.out file via File->Load Program... and then run... (program runs fine and i see expected output in Stdout window)
    6. close connections to CortexA_0 and C6400PLUS_0 and exit CCS.

    this runs ok most of the time but occasionally when restarting this same sequence we get the following error displayed, which requires an emulator and target reboot to fix? or at least that's the only thing i can figure out to resolve it.

    Warning: Error 0x40002240/-1045 Warning during: Initialization, OCS, Control,  Device driver: Cannot release emulator process. 

     

    Also changed the configured gel file for the CortexA_0 proc to run "my_ompa3530_cortexA.gel" which is the same as the standard gel file for the CortexA (omap3530_cortexA.gel) but adds a call to IVA22_GEM_startup() function at the end of the OnTargetConnected() callback function, as i realized that such a call from the Startup() function will  not work because you're not connected to the target at the time Startup() is run.

    to automate this sequence in a perl script using the CCS SCripting Utility, i have to following perl script, which also works the first time through...

    ------------------------------------------------------------------------------------------------------------

    use CCS_SCRIPTING_PERL;


    # Read the command line arguments.
    $current_directory = $ARGV[0];
    $executable = $ARGV[1];
    $stdout = $ARGV[2];

    # Create a new CCS Scripting object for connection to CortexA processor
    my $MyCCScripting = new CCS_SCRIPTING_PERL::CCS_Scripting();

    # Open connection to Code Composer Studio CortexA_0 proc
    $MyCCScripting -> CCSOpenNamed("*", "CortexA_0", 1);

    # Connect to target
    $MyCCScripting -> TargetConnect();

    $target_board = $MyCCScripting -> TargetGetBoardName();

    $target_cpu   = $MyCCScripting -> TargetGetCPUName();

    # Set the current directory
    $MyCCScripting -> CCSSetCurrentDirectory($current_directory);

    # check board type, if omap multicore then open another connection to slave 64x+ processor
    if ($target_board eq 'OMAP3530_SDXDS560R') {
     
       # Create a new CCS Scripting object for connection to 64+ processor
       my $MyCCScripting2 = new CCS_SCRIPTING_PERL::CCS_Scripting();

       # Open connection to Code Composer Studio 64+ proc
       $MyCCScripting2 -> CCSOpenNamed( "*", "C6400PLUS_0", 1);

       # Connect to target
       $MyCCScripting2 -> TargetConnect();
       $slave_cpu   = $MyCCScripting2 -> TargetGetCPUName();

        $MyCCScripting2 -> TargetReset();

       # Load the executable
       $MyCCScripting2 -> ProgramLoad($executable);

       # if stdout is being redirected to a file
       if ($stdout){
         $MyCCScripting2 -> TargetEvalExpression(qq(GEL_TransferToFile("STANDARD.OUT", 0x2 )));
       }

       # Run the executable
       $MyCCScripting2 -> TargetRun();

       # Disconnect from target
       $MyCCScripting2 -> TargetDisconnect();
    }

    # reset CortexA_0 target

    $MyCCScripting -> TargetReset();

    # Disconnect from CortexA_0 target
    $MyCCScripting -> TargetDisconnect();

    # Close all open connections to Code Composer Studio
    $MyCCScripting -> CCSClose();

    }

    ---------------------------------------------------------------------------------------------------------

    perhaps i'm missing something in the cleanup after the program is run, causing subsequent script runs to fail? any ideas?

     

    thanks

    Rob

     

     

  • Rob,

    I really don't see a problem in the sequence of events on your script; the procedure is very similar to what I usually do with the SoC devices and yes, sporadically I get the error you reported and I usually disconnect the target and try to reset the emulator before doing a "cold boot" on everything. I don't have a 560R emulator but I use either the XDS100v2, the BH560m or the XDS560PCI.

    I will try to investigate a bit more but overall I don't see any leftovers at the end of your script.

    BTW, your explanation of the issue could never be more clear!

    Cheers,

    Rafael