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.

TMDX654GPEVM: Uniflash OSPI programming fails

Part Number: TMDX654GPEVM

Hi

I have questions which relates with following E2E thread

Q1: When I tried to program FlashWriter on Target by using latest Uniflash v5.1.0, the character "C" was not printed on COM port.

      If I switched the version of Uniflash (e.g. 4.6.0 or 5.0.0) then the character "C" was printed on COM port.

      Please check and modify the latest tool if it 's not correct one.

Q2: After programming FlashWrite on Target by using Uniflash (v4.6.0 or 5.0.0), I tried to flash the program on OSPI with the following steps:

       dslite.bat --mode processors -c COM15 -e 10000 -d 3 -o 0

       dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -o 0

      dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\drv\sciclient\soc\V0\sysfw.bin -d 3 -o 40000

      ......

      Erase was completed correctly.

      However, flashing was failed.

       Error message is:

       =========================================-

          C:\ti\uniflash_4.6.0>dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -o 0
Executing the following command:
         > C:\ti\uniflash_4.6.0\processors\ProcessorSDKSerialFlash.exe -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -o 0

         For more details and examples, please visit processors.wiki.ti.com/.../UniFlash_v4_Quick_Guide


         ----------------------------------------------------------------------------
         ProcessorSDKSerialFlash CLI Tool
         Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
         Version 1.0.0.5
         ----------------------------------------------------------------------------
         Flashing Image to Flash Writer..

         Transferring Header information..
         Header Transfer complete!

         Transferring File of size 150990 bytes
         File Transfer complete!
         Programming Flash Device..

         Flash Programming Failed!!

       =========================================-

       Are you able to flash the image on OSPI?

       Which version of tools (CCS, PDK, Uniflash e.t.c.) are you using?

Thanks and Best regards,

HaTa.

  • Hi HaTa,

    I understand you are trying to use UniFlash on Windows to program the AM654x EVM's OSPI Flash? I was just able to do that and verify that the OSPI got indeed programmed by following the below steps:

    • Download and install the current UniFlash tool v5.1.0 Windows installer from ti.com (http://www.ti.com/tool/download/UNIFLASH)
    • Identify the correct UART port used by MCU_UART0 (after reset assuming the bootmode pins are configured properly that port will output CCC... into a Terminal which is part of the ROM's X-Modem based program loader protocol). In my case that port was COM4.
    • Download the Flash programmer image into the AM654x device RAM as follows...
    C:\ti\uniflash_5.1.0>dslite.bat --mode processors -c COM4 -f \ti\uniflash_5.1.0\processors\FlashWriter\am65xx_evm\uart_am65xx_evm_flash_programmer.tiimage
    Executing the following command:
    > C:\ti\uniflash_5.1.0\processors\ProcessorSDKSerialFlash.exe -c COM4 -f \ti\uniflash_5.1.0\processors\FlashWriter\am65xx_evm\uart_am65xx_evm_flash_programmer.tiimage
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.1.0.0
    ----------------------------------------------------------------------------
    Flashing Flash Writer to RBL..
    
    Transferring File of size 113557 bytes
    File Transfer complete!
    • Program a binary file into OSPI as follows (example file was taken from Processor SDK RTOS v06.00.00.07)...
    C:\ti\uniflash_5.1.0>dslite.bat --mode processors -c COM4 -f C:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -i 1 -o 0
    Executing the following command:
    > C:\ti\uniflash_5.1.0\processors\ProcessorSDKSerialFlash.exe -c COM4 -f C:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -i 1 -o 0
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.1.0.0
    ----------------------------------------------------------------------------
    Flashing Image to Flash Writer..
    
    Transferring Header information..
    Header Transfer complete!
    
    Flashing Image of size 150990 bytes
    Flash Programming Success!
    • I then used U-Boot (booted from SD card) as an independent tool to read back some of the OSPI Flash memory contents to ensure it matches what was programmed. In this example I show the HEX dump from OSPI starting at offset 0xbcf0 of sbl_ospi_img_mcu1_0_release.tiimage that was programmed earlier.
    => sf probe
    SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB
    => sf read 80000000 0 100000
    device 0 offset 0x0, size 0x100000
    SF: 1048576 bytes @ 0x0 Read: OK
    => md 8000bcf0
    8000bcf0: 6353e8bd 696c6369 5f746e65 636f7270    ..Sciclient_proc
    8000bd00: 746f6f42 75716552 50747365 65636f72    BootRequestProce
    8000bd10: 726f7373 462e2e2e 454c4941 000a2044    ssor...FAILED ..
    8000bd20: 6f2f0000 6c622f65 75622f64 2d646c69    ../oe/bld/build-
    8000bd30: 43524141 5f343648 72612f31 2d6f6761    AARCH64_1/arago-
    8000bd40: 2d706d74 65747865 6c616e72 6d72612d    tmp-external-arm
    8000bd50: 6f6f742d 6168636c 772f6e69 2f6b726f    -toolchain/work/
    8000bd60: 35366d61 655f7878 6c2d6d76 78756e69    am65xx_evm-linux
    8000bd70: 6c62732f 6f6f622d 74722d74 302f736f    /sbl-boot-rtos/0
    8000bd80: 30302e31 2e39302e 722d3530 2f392e30    1.00.09.05-r0.9/
    8000bd90: 6c697562 69742f64 6f6f622f 62732f74    build/ti/boot/sb
    8000bda0: 6f732f6c 336b2f63 6c62732f 616c735f    l/soc/k3/sbl_sla
    8000bdb0: 635f6576 5f65726f 746f6f62 0000632e    ve_core_boot.c..
    8000bdc0: 6353a000 696c6369 5f746e65 636f7270    ..Sciclient_proc
    8000bdd0: 746f6f42 50746553 65636f72 726f7373    BootSetProcessor
    8000bde0: 2e676643 41462e2e 44454c49 00000a20    Cfg...FAILED ...

    Let me know if you can re-create this and it resolves your concern.

    Regards, Andreas

  • Hi Andreas,

    I'm very sorry, but still cannot program FlashWriter on Target with Uniflash5.1.0.

    And also, cannot program the image on OSPI.

     

    I listed below my procedures. Please point me if there is different procedures or different version of tools.

    (I'm basically referring the http://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_00_00_07/rtos/index_board.html#programming-flashwriter-on-am65xx-platform for procedures.)

     

    <<Environment>>  

    Host PC: Windows10 64bit

    Target: AM65x GP EVM

    SDK: processor_sdk_rtos_am65xx_6_00_00_07

    PDK: pdk_am65xx_1_0_5

    CCS: v9.01

    Uniflash: 5.1.0 or 5.0.0

     

    <<Procedure>>

    1. Modify the file "C:\ti\pdk_am65xx_1_0_5\packages\ti\drv\sciclient\tools\ccsLoadDmsc\am65xx\launch.js” by referring http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_how_to_guides.html#creating-debug-configuration-to-integrate-ccs-gel-and-dmsc-firmware-initialization.

     

    (PDK is installed under C:\ti on my environment)

     

    Modified from

    //<!!!!!! EDIT THIS !!!!!>
    
    // Set this to 1 to allow loading the GEL files directly from the ccxml file.
    
    disableGelLoad = 0;
    
    if (disableGelLoad == 0)
    
    {
    
        //Path to GEL files
    
        gelFilePath = "C:/ti/ccsv8/ccs_base/emulation/boards/am65x/gel/";
    
     
    
    }
    
    // Path to the directory in which this file would be residing. CCS expects
    
    // absolute paths to load the binaries.
    
    thisJsFileDirectory = "pdk/packages/ti/drv/sciclient/tools/ccsLoadDmsc";
    
    //<!!!!!! EDIT THIS !!!!!>
    
    

     

    to

    //<!!!!!! EDIT THIS !!!!!>
    
    // Set this to 1 to allow loading the GEL files directly from the ccxml file.
    
    disableGelLoad = 1;
    
    if (disableGelLoad == 0)
    
    {
    
        //Path to GEL files
    
        gelFilePath = "C:/ti/ccs901/ccs_base/emulation/boards/am65x/gel/";
    
     
    
    }
    
    // Path to the directory in which this file would be residing. CCS expects
    
    // absolute paths to load the binaries.
    
    thisJsFileDirectory = "../../../pdk_am65xx_1_0_5/packages/ti/drv/sciclient/tools/ccsLoadDmsc/";
    
    //<!!!!!! EDIT THIS !!!!!>
    
    

     

     

    The default description for gelFilePath was CCS8 (gelFilePath = "C:/ti/ccsv8/ccs_base/emulation/boards/am65x/gel/";).

    Therefore, I'm afraid if CCS version is important to run the FlashWriter correctly.

    Currently, I'm using CC9.01 because it's recommended version for processor_sdk_rtos_am65xx_6_00_00_07(pdk_am65xx_1_0_5).

    Which version of CCS are you using?

     

    2. On CCS, Run->Debug Configurations…

                 

    3. Input the file name "C:\ti\pdk_am65xx_1_0_5\packages\ti\drv\sciclient\tools\ccsLoadDmsc\am65xx\launch.js" in Initialization Script and Push the button "Apply"

    4. Connect 2 USB cable at J42 and J23 connector on EVM

    5. Set all 0 for SW2, SW3, SW4 on EVM (no boot mode)

    6. Open the terminal window (teraterm) for COM port. (When connect to J42, COM15/16/17/18 is appeared. Therefore I use COM15.)

    7. Power ON the EVM

    8. Launch the target

    9. Connect A53 

    10.Load the Flash writer program 

         If I select the "C:\ti\uniflash_5.0.0\processors\FlashWriter\am65xx_evm file in uniflash5.0.0\uart_am65xx_evm_flash_programmer.out" then the character "C" is prompted.

         However, If I select the .out file in uniflash5.1.0 then the character "C" is NOT prompted.

     

         I think, my procedure above could be correct because it works well with Uniflash5.0.0….

         Do you have any idea?

    11. Close terminal window

    12. Reconnect USB cable at J42

    13. Cannot run the FlashWrite with Uniflash5.1.0, therefore, I use uniflash5.0.0 for the following test.

         Run and complete the erase command correctly

         dslite.bat --mode processors -c COM15 -e 10000 -d 3 -o 0

     

         prompt message is

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM15 -e 10000 -d 3 -o 0
    
    Executing the following command:
    
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM15 -e 10000 -d 3 -o 0
    
     
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
     
    
     
    
    ----------------------------------------------------------------------------
    
    ProcessorSDKSerialFlash CLI Tool
    
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    
    Version 1.0.0.6
    
    ----------------------------------------------------------------------------
    
    Erasing Flash....
    
     
    
    Transferring Header information..
    
    Header Transfer Complete!!
    
    Flash Erase Success!
    
    

     

    14. Run and failed the image programming on OSPI or RAM

         dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -i 1 -o 0

     

         or

         dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage

     

    Error message is:

    C:\ti\uniflash_5.0.0>dslite.bat --mode processors -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -i 1 -o 0
    
    Executing the following command:
    
    > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM15 -f c:\ti\pdk_am65xx_1_0_5\packages\ti\boot\sbl\binary\am65xx_evm\ospi\bin\sbl_ospi_img_mcu1_0_release.tiimage -d 3 -i 1 -o 0
    
    
    
     
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
     
    
     
    
    ----------------------------------------------------------------------------
    
    ProcessorSDKSerialFlash CLI Tool
    
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    
    Version 1.0.0.6
    
    ----------------------------------------------------------------------------
    
    Flashing Image to Flash Writer..
    
     
    
    Transferring Header information..
    
    Header Transfer complete!
    
     
    
    Flashing Image of size 150990 bytes
    
    99% complete
    
    Flash Programming Failed!!
    
    

    What is different with your verification environment? 

     

    Thanks and Best regards,

    HaTa.

  • Hi HaTa,

    HaTa said:
    What is different with your verification environment? 

    as you probably aware there are two distinct steps needed to program Flash using UniFlash:

    1) Loading a Flash programming firmware into the AM654x memory, and then

    2) Feeding a memory image to get programmed to the Flash programming firmware via serial port, which the firmware will then program to OSPI, etc.

    The difference between what I demonstrated working and what you are doing is in step 1. For step 1, also here there are two distinct methods to load that Flash programmer fimware into the AM654x:

    a) Feeding it serially to the AM654x ROM bootloader directly from UniFlash CLI tool. There is no CCS involved at all. This is what I was doing. Or...

    b) Loading that firmware through CCS using GEL scripts etc. over JTAG. That's what you are attempting.

    Personally I would always recommend going the ROM bootloader route (a) if possible, as this is the simplest and most straightforward way. You use the same UART connection for both Flash programmer and your firmware, even the same tool to load/program those. This approach is easily scriptable/automatable with minimal external dependencies. Lastly, it will likely be a lot faster too to load the flash programmer via UART (~100KB) rather than starting up CCS for that. Note that for loading the Flash programmer tool via serial port through the AM654x ROM code the boot mode settings are as follows: SW3.2=SW3.4=ON, all other SW3.x off. All SW2.x off. If you have these bootmode settings the device will send CCCC characters right away after power-up or reset (the ROM bootloader does that).

    I would think approach (b) is only really worth exploring if you intend to also do debugging of either your custom AM654x firmware or debugging the Flash writer itself using CCS during bringup of a custom board.

    Is there any reason why you can't use/try method (a) now?

    If (b) is critically important for you I can see if I can provide updated steps involving CCS how to best do that.

    Regards, Andreas