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.

Serial flash utility - OMAP L137

Other Parts Discussed in Thread: OMAP-L137

Hello,

We are using the Serial FLash Utility (sfh_OMAP-L137.exe) to flash the images (DSP UBL & ARM bin images) for OMAP-L137 processor.

We are creating batch files to call this executable and port the parameters to it. But the executable fails (displays unhandled exception) when the standard output is redirected to a file to log the status.

We need to call this executable from LabVIEW software application and display the status in it.

Request anyone to help us out in this regard.

Regards,

Vani

  • Hi Vani,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    The serial falsher utility will behave and work as a normal .exe provided all the required parameters are passed with correct format/syntax.

    vani says said:
    We are creating batch files to call this executable and port the parameters to it. But the executable fails (displays unhandled exception) when the standard output is redirected to a file to log the status.

    Not sure how the parameters are passed to the utility through batch file. What are all the parameters ( commands and Options) used?

    Please post the logs with error messages as well.

     

    Regards,

    Shankari

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

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hello Shankari,

    Thanks for the reply.

    The batch file executes perfectly without any issue. But we would like to redirect the stdout to a file. We are unable to do that.

    Batch file:-

    @ ECHO OFF

    sfh_OMAP-L137 -erase -p COM1 -baud 115200 > result.txt

    Below is the output when redirected to a file:-

    -----------------------------------------------------
    TI Serial Flasher Host Program for OMAP-L137
    (C) 2010, Texas Instruments, Inc.
    Ver. 1.67
    -----------------------------------------------------


    [TYPE] Global erase
    [TARGET] OMAPL137_v2
    [DEVICE] SPI_MEM

    Attempting to connect to device COM1...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 14912-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 784-Byte section to address 0x80004240.
    (AIS Parse): Processing command 2: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 32-Byte section to address 0x80004550.
    (AIS Parse): Processing command 3: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 20-Byte section to address 0x80004590.
    (AIS Parse): Processing command 4: 0x58535906.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump and close...
    (AIS Parse): AIS complete. Jump to address 0x800034C0.
    (AIS Parse): Waiting for DONE...
    (AIS Parse): Boot completed successfully.

    Waiting for SFT on the OMAP-L137...

    Erasing flash

    The handle is invalid.

    Interfacing to the OMAP-L137 via UART failed.
    Please reset or power-cycle the board and try again...

    Regards,

    Vani

  • Hello Shankari,

    I have pasted the console output after successful completion of "ERASE" operation. We want the below to be redirected to a file (.txt). 

    -----------------------------------------------------
    TI Serial Flasher Host Program for OMAP-L137
    (C) 2010, Texas Instruments, Inc.
    Ver. 1.67
    -----------------------------------------------------


    [TYPE] Global erase
    [TARGET] OMAPL137_v2
    [DEVICE] SPI_MEM

    Attempting to connect to device COM1...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 14912-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 784-Byte section to address 0x80004240.
    (AIS Parse): Processing command 2: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 32-Byte section to address 0x80004550.
    (AIS Parse): Processing command 3: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 20-Byte section to address 0x80004590.
    (AIS Parse): Processing command 4: 0x58535906.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump and close...
    (AIS Parse): AIS complete. Jump to address 0x800034C0.
    (AIS Parse): Waiting for DONE...
    (AIS Parse): Boot completed successfully.

    Waiting for SFT on the OMAP-L137...

    Erasing flash
    100% [ ████████████████████████████████████████████████████████████ ]
    Erase complete


    Operation completed successfully.
    Press any key to continue . . .

    Regards,

    Vani

  • Hi vani,

    Yes. In windows, while re-directing the output to a file, it gives a handle error.

    But I don't think, this particular requirement was considered while developing the serial flasher utility.

    You can customize the serial flasher utility according to your needs.

    The source code of the serial flasher utility is available at http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L137

    and the steps to rebuild the utility is also given at http://processors.wiki.ti.com/index.php/Rebuilding_the_Flash_and_Boot_Utils_Package

     

    Regards,

    Shankari

     

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

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hi Vani,

    Try modifying the sfh_ais.cs source file (found at <install dir>\Common\sfh\sfh_ais.cs) . Specifically, search for the function called 'DisplayProgressBar', which is called several times in that file. It appears that displaying the progress bar is what is causing your redirect-to-text issues.

    After you make your modifications you will need to rebuild the tool. Let us know if this solution works for you.

    Thanks,

    Clinton

  • Thank you Shankari & Clinton,

    I have looked into the source file "sfh_ais.cs" and will modify as you suggested.

    I will update both of you once finished.

    Thanks once again.

    Regards,

    Vani