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.

Uniflash command line execution handling errors

Other Parts Discussed in Thread: UNIFLASH

Hi,

I am using uniflash in command line.How do I get to know whether the flashing has passed or failed.Should I process the stdout or stderr buffers to find there are any errors or is there any other way of simply telling whether the uniflash command was a suicess of failure??

Regards

Manoj

  • Manoj,

    You can either use the -programStatusOutput argument in the command line tool, or manually look at the output that is displayed to console when running the command line tool to look for errors.

    The -programStatusOutput argument allows you to automate the check by sending a pass or fail string to a file. The argument takes 3 parameters:

    <fileToOutput>, which is the file to log to

    <successStr>, which is the string to write to the file when operation is successful

    <failStr>, which is the string to write to the file when operation fails

    Please try this out and let me know if this works for you. To get additional information, you can also try the -log argument to generate the scripting logs for the command line tool.

    Thanks,

    Ricky

  • Hi,

    I had tried this option but it did not work as the flashing is failing because it is unable to connect to target.Attached you can find the snapshot of the error.The file for the program status output gets created but it will be empty even  after the failure is seen.

    Regards

    Manoj

  • Manoj,

    The -programStatusOutput argument only detects for program load errors, and therefore will not capture the connect error.

    In theory, you can modify the command line tool, which is just a bunch of javascript files, to accomplish what you want. But you will need some Debug Server Scripting (DSS) knowledge to do this. You can look at the following file (\uniflashv3\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js)

    Alternately, you can generate the DSS logs using the -log argument, and parse the resulting log file for any errors. Try generating the log file for the connect error you are getting to see the type of information you can get from this file.

    Thanks,

    Ricky

  • Hi,

    Uniflash command line is called within a Graphical User Interface. The GUI assumes that the command line tool present in the C:\ti\uniflashv3\ccs_base\scripting\examples\uniflash\cmdLine path.I cannot modify the scripts as said since the call of the uniflash command line happens in some end users system.Further processing the log is dangerours as it can change with different versions of uniflash.I think even this scenario should have been handled by the -programStatusOutput option.

     

    Regards

     

    Manoj

  • Manoj,

    I've updated the command line tool to capture connecting errors as well with the -programStatusOutput argument. To test this, download the attached uniFlash_main.js, and copy it to the following directory (only compatible with UnIFlash 3.1):

    \uniflashv3\ccs_base\scripting\examples\uniflash\cmdLine\

    Please let me know how it works for you.

    Thanks,

    Ricky

    uniFlash_main.js
  • The -pogramstatus option is broken with this script.It communicates the failure scenarios but the PASS scenarios do not write the success string to the file.The file is empty in case of successful flashing.

  • Manoj,

    It seems to work for me.

    Can you let me know the exact command line you are running?

    Thanks,

    Ricky