Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

CCSTUDIO: Using Loadti example .js scripts to program multiple target device. --CPU option

Part Number: CCSTUDIO
Other Parts Discussed in Thread: TMS320F28335

Tool/software:

Hi,

The default example scripts for using Loadti (ccsv8) does not retrieve the option "--cpu" in the getArgs.js and hence the main.js doesn't include the ability to select CPUs passed the first in the chain.

Has anyone done anything or have an improved example script that implements the option as what I'm doing doesn't seem to be working. I know the config .ccxml file is all good as it works in CCS fine. Device type is "TMS320F28335"

Many thanks

  • Hello,

    I assume you need to stay with CCSv8 and upgrading is not an option? If so, I'm fairly certain that you can take the loadti example from a later CCS which supports the --cpu option and use it with CCSv8. The loadti example has not changed much other than a few minor additions.

    Thanks

    ki

  • Thanks Ki,

    This was very useful and has solved my issue, unfortunately I now have a further issue...

    I have 4 DPSs in a chain the first 2 work fine but 3 & 4 when trying to connect (x200 debugger) to program to them I get an error returned from the debugsession.target.connect call.

    C28xx_3: Error connecting to the target: (Error -1155 @ 0x0) Device may be operating in low-power mode. The debugger has forced the device to wake up. Choose 'OK' to attempt to complete the debug connection. (Emulation package 8.1.0.00012) 

    This also occurs when running from the CCS GUI but obviously there I am able to press enter, through this script I cannot interact, do you know how this can be solved?

    Many thanks

    Matt

  • through this script I cannot interact, do you know how this can be solved?

    You may have to catch the exception thrown when connecting to cores 3 & 4 and handle it appropriately. Maybe you can just a reconnect attempt in your handler.

    In any case you would need to modify the script. If using loadti, you would need to modify the loadti script example directly. Right now it just prints the error and quits:

        // Connect to target. If target is simulator or already connected, a warning will be reported.
        try
    	{
            debugSession.target.connect();
        }
    	catch (ex)
    	{
    		errCode = getErrorCode(ex);
            dssScriptEnv.traceWrite("Error code #" + errCode + ", could not connect to target!\nAborting!");
            quit(errCode != 0 ? errCode : 1);
        }

  • Thanks again Ki,

    The problem was that the 3 & 4 devices on the chain would not connect unless a session was opened and left open on the devices 2 & 3.

    So it's working now, I just had to open and connect to all 4 in sequence before doing any programming.

    Thanks again. 

  • Glad you figured out the issue and thank you for the update!

  • Hi Ki,

    Sorry, me again. I've now successfully automated the flashing of our program files through the LoadTI scripts but have a final piece of the jigsaw to complete.

    We use the "Tools->Load Memory" function in CCS to modify some individual memory locations in flash post programming, this is just 16 bytes of hex data which we load in binary format. I've tried doing this using both the -mlr and -mld methods in the LoadTI script but with no success.

    The -mlr (session.memory.loadRaw) command just returns error 4009 saying the Memory Map is preventing the load of the data (the ADDR being reported back as expected)

    The -mld (session.memory.loadData) command is saying that it can't program the raw binary data as it does not have the require coff header.

    Do you know if either of these script commands should be doing what I want? Or is there another function in the DSS API that I should try.

    Thanks in advance.

  • this is just 16 bytes of hex data which we load in binary format. I've tried doing this using both the -mlr and -mld methods in the LoadTI script but with no success.

    You would want to use -mlr which is for loading raw binary. -mld is for *.dat files: https://software-dl.ti.com/ccs/esd/documents/users_guide_12.8.0/ccs_debug-main.html#ti-dat-format

    The -mlr (session.memory.loadRaw) command just returns error 4009 saying the Memory Map is preventing the load of the data (the ADDR being reported back as expected)

    This sounds like a data verification error of sorts. Make sure the address you trying to load to is not being blocked by the debugger:

    https://dev.ti.com/tirex/explore/node?node=A__APy2XbLelxyqBB2Yz0WR.w__ccs_devtools__FUz-xrs__LATEST