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.

AM4376: Uniflash v6 support

Part Number: AM4376
Other Parts Discussed in Thread: UNIFLASH

Hi ,

I have programmed AM437x customized board successfully with CCS Uniflash V3 on window XP. and today we want to transfer this tool from R&D to factory for mass production, and i try to upgrade the CCS Uniflash to latest SW, i found the latest SW is Uniflash 6.0.   i downloaded and installed this SW, found it total difference with the old CCS Uniflash V3. So, could someone help me, is Uniflash 6.0 used for AM437x EMMC programming by ETH? if we can use this SW, how to configure it?

thanks,

Johnny

  • Johnny,

    as you found the current version of Uniflash is very different from the earlier version, and no longer supports eMMC programming. While this is a feature we would like to re-introduce moving forward it is not supported with the current version.

    Two things you can do:

    1) Continue using the older version, or

    2) Use a scripted approach to eMMC programming, either through Ethernet or USB-based Ethernet by performing a ROM boot over these interfaces entirely over the network and bringing up a minimal Linux image to perform the eMMC flashing. Can you have a look at my E2E post here describing such a solution including the provided attachment tarball: https://e2e.ti.com/support/processors/f/791/p/894702/3335775#3335775  This solution is at the core similar to what the older Uniflash was doing, except it uses modern U-Boot/Kernel versions, and it lacks a GUI on the host/PC side. But you could easily script the host-side interaction.

    Regards, Andreas

  • Hi Andreas,

    thank you very much!

    I want to continue using the old version. 

    And I also have another question about this old version. do you know how to control the status of board programming. please see below picture:

    I want to show the some programming status, for example "done" and "Fail" in the status column. but I don't know how to do this. 

    Best Regards,

    Johnny

  • Hi Andreas,

    thank you very much!

    I want to continue using the old version. 

    And I also have another question about this old version. do you know how to control the status of board programming. please see below picture:

    I want to show the some programming status, for example "done" and "Fail" in the status column. but I don't know how to do this. 

    Best Regards,

    Johnny

  • Hi Johnny,

    what exactly are you trying to do? You first mention to control the board programming, and then talk about the status. If it is about the status, is what is already visible in the "Status" column not sufficient? I've not tried using this older version of Uniflash myself, but it may also be possible to monitor the serial console of the device being programmed for output to determine the exact status of the programming process - which could also be done in an automated way.

    Regards, Andreas

  • Hi Andreas,

    I'm sorry to confuse you.

    I want to report the status of the board programming to the Uniflash(PC). 

    for example when the we complete the mainboard program, we send out a command from board( I don't know whether TI has this command). and Uniflash show the "done"  status. 

  • Hi Johnny,

    I talked with somebody in our team that has some experience with that older Uniflash solution and there is essentially a way to pass status information from the target to Uniflash by way of tftp requests issued through U-Boot (with no actual file transfers happening, tftp is just used to indicate status to the host/Uniflash). I'm just going to pass along the information I got in the hope that will provide you with a starting point to further customize your status messages...

    Attached debrick.txt file that was used to flash the SPI flash on the AM335x EVM. The communication protocol between the target and Uniflash is defined by the section called “# Define System status messages of flashing  <DO NOT MODIFY>”. While this is a U-Boot script, the protocol is really based upon the tftp commands within the script. So, if you want to indicated Programming Complete to Uniflash, you would request a file from the target to the host called “TargetProgrammingComplete”. Uniflash uses this request (the file doesn’t exist on the server in Uniflash) to know that the programming for that board has completed and updates the status bar.

    Regards, Andreas

    #
    # Module: debrick script
    #
    # Description: This program is used to demostrate concatenate binary
    #              images.
    #
    # Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
    #
    #
    #  Redistribution and use in source and binary forms, with or without
    #  modification, are permitted provided that the following conditions
    #  are met:
    #
    #    Redistributions of source code must retain the above copyright
    #    notice, this list of conditions and the following disclaimer.
    #
    #    Redistributions in binary form must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer in the
    #    documentation and/or other materials provided with the
    #    distribution.
    #
    #    Neither the name of Texas Instruments Incorporated nor the names of
    #    its contributors may be used to endorse or promote products derived
    #    from this software without specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    #
    
    # expect the following parameters to be set outside this script
    # serverip which should happen as part of the dhcp process
    # 
    
    setenv READY_RETRY_DELAY 5
    setenv IMAGE_CNT 3
    
    # Name of Image containing all images to be tftp'd from host
    setenv ImageName flash-image.out
    
    #Name of Images to be flashed
    setenv Image1_Name MLO.byteswap
    setenv Image2_Name u-boot.img
    setenv Image3_Name uImage
    
    # Image offsets into SPI Flash - these are defined in the linux board file
    setenv Image1_SPIFLASH_Offset 0x0
    setenv Image2_SPIFLASH_Offset 0x80000
    setenv Image3_SPIFLASH_Offset 0xE0000
    
    # Image offsets in ddr
    # This has to be calculated from the load address
    # this assumes the load address is 0x80200000
    # Use the load address and the offset provided from the flash-cat utility to calculate
    setenv Image1_DDR_ADDR 0x80200000
    setenv Image2_DDR_ADDR 0x80218800  
    setenv Image3_DDR_ADDR 0x80271800
    
    # These numbers come from the flash-cat utility 
    setenv Image1_Length 0x18775
    setenv Image2_Length 0x58D2C
    setenv Image3_Length 0x30BDE0
    
    # Set File Names to indicate progress <DO NOT MODIFY>
    setenv DebrickTargetReady DebrickTargetReady:${ethaddr}
    setenv TargetProgrammingComplete TargetProgrammingComplete:${ethaddr}
    setenv TargetErrorExit TargetErrorExit:${ethaddr}
    setenv TargetEraseError TargetEraseError:${ethaddr}
    setenv TargetProgrammingError TargetProgrammingError:${ethaddr}
    setenv TargetGetFileError TargetGetFileError:${ethaddr}
    
    #Need to halt processor due to a processing error in the script
    setenv DataAbort 'echo Halting processor.....; go 0x2001c;'
    
    # Define addresses where the messages will be sourced for the TFTP puts
    setenv image_msg1_addr 0x80008100
    
    # Define System status messages of flashing  <DO NOT MODIFY> 
    #setenv GetReadyFileFromHost "tftp 0x80001000 ${serverip}:${HostReadyFile}"
    setenv DebrickStartingToHost "tftp 0x80001000 ${serverip}:${DebrickTargetReady}"
    setenv TargetProgrammingComplete "tftp 0x80001000 ${serverip}:${TargetProgrammingComplete}"
    setenv TargetProgrammingFailure "tftp 0x80001000 ${serverip}:${TargetProgrammingError}"
    setenv TargetErrorExit "tftp 0x80001000 ${serverip}:${TargetErrorExit}"
    setenv TargetEraseErrorExit "tftp 0x80001000 ${serverip}:${TargetEraseError}"
    setenv TargetGetFileFailure "tftp 0x80001000 ${serverip}:${TargetGetFileError}"
    
    # Define Image get command  <DO NOT MODIFY>
    setenv GetImage 'tftpboot ${loadaddr} ${serverip}:${ImageName}'
    
    # Define Image succesful Complete get commands, these requests are detected
    # the gets will fail as the files don't exist, that ok. Using this as a 
    # feedback feedback mechanism to indicate statusi
    # <DO NOT MODIFY>
    setenv DoneWithImage "tftp ${image_msg1_addr} ${serverip}:${ImageName}_Complete" 
     
    # Erase SPI-Flash Macro for 8MB chip - full erase.  Modify the erase size to suit desired chip.
    setenv EraseSpiFlash 'echo; echo Erasing entire SPI-Flash, please wait...; if sf probe 0; then if sf erase 0 +800000; then echo SPI-Flash Erased; echo; else echo SPI-Flash Erase Failure Error Exit; run TargetEraseErrorExit; run TargetErrorExit; run DataAbort; fi; else echo Cannot detect SPI-Flash on board, check profile settings!; run TargetEraseErrorExit; run TargetErrorExit; run DataAbort; fi;' 
    
    # Get Image Macro  <Does not need to be Modified, typically>
    setenv GetSpiFlashImage 'if run GetImage; then echo; echo Got SPI-Flash Image; else echo Get SPI-Flash Image Failed; run TargetGetFileFailure; run TargetErrorExit; run DataAbort; fi;'
    
    # Flash SPI-Image Macro for 8MB chip.
    setenv FlashSpiImage 'if sf probe 0; then if sf write ${source_addr} ${storage_offset} ${image_length}; then echo; echo  ${ImageName} successfully programmed; echo; else echo ${ImageName} Programming Failed... error exit; run TargetProgrammingFailure; run TargetErrorExit;echo; run DataAbort; fi; else echo ${ImageName} Programming Failed... error exit; run TargetProgrammingFailure; run TargetErrorExit;echo; run DataAbort; fi;'
    
    # -------------------------------------------------------------------
    # --- Execution Starts Here
    # -------------------------------------------------------------------
    # --- Start The Process of Flashing
    #
    echo 
    echo "Indicates to the host the Debrick script is running"
    echo 
    run DebrickStartingToHost
    #
    #
    # <<<<<<<<<<<< Start of Image Flashing>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    #
    # -------------------------------------------------------------------
    # Get the single image containing all the files.
    # -------------------------------------------------------------------
    echo
    echo Get Image containing all images to be flashed
    echo
    run GetSpiFlashImage
    run EraseSpiFlash
    # -------------------------------------------------------------------
    # Add a section for each Image to be flashed
    # For each Image to be flashed you will need to set the 
    # following environments:
    #  - Source Address in the Single Image
    #  - Storage Offset into the Storage device
    #  - Length of the image 
    #  - Image Name
    # -------------------------------------------------------------------
    
    # Flash Image 1
    #--------------------------------------------------------------------
    setenv source_addr ${Image1_DDR_ADDR}
    setenv storage_offset ${Image1_SPIFLASH_Offset}
    setenv image_length ${Image1_Length}
    setenv ImageName ${Image1_Name}
    run FlashSpiImage
    #--------------------------------------------------------------------
    
    # Flash Image 2
    #--------------------------------------------------------------------
    setenv source_addr ${Image2_DDR_ADDR}
    setenv storage_offset ${Image2_SPIFLASH_Offset}
    setenv image_length ${Image2_Length}
    setenv ImageName ${Image2_Name}
    run FlashSpiImage
    #--------------------------------------------------------------------
    
    # Flash Image 3
    #--------------------------------------------------------------------
    setenv source_addr ${Image3_DDR_ADDR}
    setenv storage_offset ${Image3_SPIFLASH_Offset}
    setenv image_length ${Image3_Length}
    setenv ImageName ${Image3_Name}
    run FlashSpiImage
    #--------------------------------------------------------------------
    
    #
    # <<<<<<<<<<<<<  End of Image Flashing  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    #
    #
    # -------------------------------------------------------------------
    # Indicate to Host successful completion
    run TargetProgrammingComplete
    echo
    echo " Target Flash Complete........"
    echo