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.

TMS320F28379D: How to Make loadBinaryProgram not Erase

Part Number: TMS320F28379D

Greetings,

I have been using loadBinaryProgram to load an image into part of the flash.  But it always does an erase.  In someone else’s post, I see a reference to an “erase sector option”.  Is there a document which explains the command and the option?

Thank you,

Ed

  • Ed,

    For TMS320F28379D, there is a "FlashDownloadSetting" option that allows you to control if it should "Erase and Program" (default), or "Program Only". If you switch it to "Program Only", it should load your binary file without issuing a flash erase beforehand.

    Example DSS command:

      debugSession.options.setString("FlashDownloadSetting","Program Only");

    Can you try it out and let me know if this is what you need?

    Thanks,

    Ricky

  • Hi Ricky,

    I believe I am about to learn something new, as that line failed with the following:
    ReferenceError: "debugSession" is not defined.

    In the Scripting Console, I use the "Load Scripting Console Command File or JavaScript File" icon to load a .cmd file which consists of three lines as follows:

    // A comment
    debugSession.options.setString("FlashDownloadSetting","Program Only");
    activeDS.memory.loadBinaryProgram("<my_path>/<my_file_name>.bin", <hard_coded_flash_address>);


    Thank you,

    Ed

  • Ed,

    Please change 'debugSession' in my example to 'activeDS'. The activeDS variable is the active debugSession object that is created for you in the Scripting Console. Hopefully this works for you.

    Also, if you are using the CCS GUI, you can also manually change the flash settings if you want by going to Tools -> On-Chip Flash.

    Thanks,

    Ricky

  • Hi Ricky,

    That worked great! Thank you!

    One last question:

    Is there a document which describes the commands and their parameters?

    Thank you,

    Ed

  • Ed,

    DSS Documentation is available in <installDir>\ccs\ccs_base\scripting\docs\GettingStarted.htm. For example, if you click on "DS API Documentation", and then "DebugSession", it will show you what APIs are available under activeDS are you using.

    Since available options differ depending on the device you are using, there will not be specific documentation for TMS320F28379D under 'Options'. If you want to display the list of available options for you device, you can use debugSession.options.printOptions(). The output of this API isn't hooked up to the Scripting Console, so you will need to write a script and run it using dss.bat to see it properly.

    Thanks,

    Ricky

  • Hi Rickey,

    There's a lot of material in within that html file :^). Thank you for the info.

    Ed