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.

PROCESSOR-SDK-AM57X: Flashing AM571x IDK with Uniflash failure

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: UNIFLASH, AM5718

hello,

I am trying to program the flash on the AM571x IDK development kit using Uniflash. This is in preparation for flashing a custom board in a manufacturing setting.

Found this FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1005148/faq-processor-sdk-am57x-how-to-boot-from-qspi-flash-on-am57x

I followed the instructions except that the UniFlash and SDK versions installed are different.


UNIflash version 8.2.0
AM571x SDK version 8.1

COM7 is where the "C" are printed and the COM7 connection was disconnected from the PC and re-connected as suggested in the uniflash documentation

Downloading the flash programmer using seems to work with
C:\ti\uniflash_8.2.0\dslite.bat --mode load --config=C:\Users\jott\ti\CCSTargetConfigurations\Flash_XDS100.ccxml -f C:\ti\uniflash_6.4.0\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out -n 7


Executing the following command:

> "C:\ti\uniflash_8.2.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" load --config=C:\Users\jott\ti\CCSTargetConfigurations\am571x_IDK.ccxml -f C:\ti\uniflash_8.2.0\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out -n 7 -g flash.log

For more details and examples, please refer to the UniFlash Quick Start guide.

DSLite version 12.2.0.2985
Configuring Debugger (may take a few minutes on first launch)...
        Initializing Register Database...
        Initializing: IcePick_D
        Executing Startup Scripts: IcePick_D
        Initializing: ARM9_ICONT1
        Executing Startup Scripts: ARM9_ICONT1
        Initializing: ARM9_ICONT2
        Executing Startup Scripts: ARM9_ICONT2
        Initializing: CS_DAP_IPU_1_C0
        Executing Startup Scripts: CS_DAP_IPU_1_C0
        Initializing: Cortex_M4_IPU1_C0
        Executing Startup Scripts: Cortex_M4_IPU1_C0
GEL: Cortex_M4_IPU1_C0: GEL Output: --->>> AM571x Cortex M4 Startup Sequence In Progress... <<<---

...

GEL: CortexA15_0: GEL Output: DEBUG: Clock is active ...
GEL: CortexA15_0: GEL Output: --->>> IVAHD Initialization is DONE! ... <<<---
GEL: CortexA15_0: GEL Output: --->>> PRUSS 1 and 2 Initialization is in progress ... <<<---
GEL: CortexA15_0: GEL Output: --->>> PRUSS 1 and 2 Initialization is in complete ... <<<---
GEL: CortexA15_0: GEL Output: --->>> AM571x Target Connect Sequence DONE !!!!!  <<<---
Loading Program: C:\ti\uniflash_8.2.0\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out
        Preparing ...
        PT_LOAD[0]: 0 of 77940 at 0x40330000
        PT_LOAD[0]: 32752 of 77940 at 0x40330000: 42%
        PT_LOAD[0]: 65504 of 77940 at 0x40330000: 84%
        Finished: 84%
        Setting PC to entry point.: 84%
Running...
Success

Tried to flash the MLO file but there was no expected output, just returned to system prompt after the banner "For more details and examples, please refer to the UniFlash Quick Start guide." 

C:\>C:\ti\uniflash_8.2.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
Executing the following command:
> C:\ti\uniflash_8.2.0\processors\ProcessorSDKSerialFlash.exe -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0

For more details and examples, please refer to the UniFlash Quick Start guide.

C:\>

Even tried to flash the led_TEST file. this returned to system prompt after "The file extension is"

C:\>C:\ti\uniflash_6.4.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\processor_sdk_rtos_am57xx_08_01_00_09\prebuilt-sdcards\idkAM571x\sd_card_files\led_TEST -d 2 -o 80000
Executing the following command:
> C:\ti\uniflash_6.4.0\processors\ProcessorSDKSerialFlash.exe -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\processor_sdk_rtos_am57xx_08_01_00_09\prebuilt-sdcards\idkAM571x\sd_card_files\led_TEST -d 2 -o 80000

For more details and examples, please refer to the UniFlash Quick Start guide.

The file extension is

C:\>

Any suggestions on why downloading the MLO is not working?

Thanks,

Joe

  • Hi Joe,

    UNIflash version 8.2.0

    Also, can you try erasing the flash once and see if it works as expected.

    Regards,
    Parth

  • Parth,

    Following the erase inunctions found in the FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1005148/faq-processor-sdk-am57x-how-to-boot-from-qspi-flash-on-am57x

    The erase completed and was successful

    Retrying to flash MLO stills fails as above,

    Joe

  • Any information on why Uniflash is failing to load the MLO file?

    It looks like Uniflash is exiting early but provides no information? 

    Trying to load the application Uniflash prints out "the file extension is" and then exits.

    Fixing this issue with flashing the board is start to impact our development schedule. Any help would be greatly appreciated. 

    Just getting to the point where we can use uniflash to flash the  AM571x IDK development board according to TI's posted steps would be helpful.

    Joe

  • Hi Joe,

    Can you please document the exact steps you are following to flash the qspi. Please mention the versions of the component involved (SDK, Uniflash, CCS) as well. We'll try to reproduce the issue on our end.

    Regards,
    Parth

  • Parth,

    As mentioned above I am following the steps in the FAQ found here: FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1005148/faq-processor-sdk-am57x-how-to-boot-from-qspi-flash-on-am57x

    The dev kit in use is the AM571x IDK

    Tool versions

    UNIflash version 8.2.0

    AM571x SDK version 8.1

    CCS 9.3

    Windows development environment

    Steps to flash the AM571x IDK

    Open command window in C:\ti\uniflash_8.2.0

    run the first command

    C:\ti\uniflash_8.2.0\dslite.bat --mode load --config=C:\Users\jott\ti\CCSTargetConfigurations\Flash_XDS100.ccxml -f C:\ti\uniflash_6.4.0\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out -n 7

    This seems to run correctly and we see the 'C' printed out on COM7 using Tera Term See above for complete out put

    Disconnect Tera Term

    unplug and re-insert the USB connection for COM7 ( also tried without doing this)

    run the second command to flash the SBL

    C:\>C:\ti\uniflash_8.2.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0

    This command seems to exit early 

    C:\>C:\ti\uniflash_8.2.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
    Executing the following command:
    > C:\ti\uniflash_8.2.0\processors\ProcessorSDKSerialFlash.exe -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    C:\>

    Also tried to run the third command to flash the app

    C:\>C:\ti\uniflash_6.4.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\processor_sdk_rtos_am57xx_08_01_00_09\prebuilt-sdcards\idkAM571x\sd_card_files\led_TEST -d 2 -o 80000
    Executing the following command:
    

    This command also seemed to exit early

    C:\>C:\ti\uniflash_6.4.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\processor_sdk_rtos_am57xx_08_01_00_09\prebuilt-sdcards\idkAM571x\sd_card_files\led_TEST -d 2 -o 80000
    Executing the following command:
    > C:\ti\uniflash_6.4.0\processors\ProcessorSDKSerialFlash.exe -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\processor_sdk_rtos_am57xx_08_01_00_09\prebuilt-sdcards\idkAM571x\sd_card_files\led_TEST -d 2 -o 80000
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    The file extension is
    
    C:\>

  • Does this version of dslight support the verbose mode flag?

    -e is for verbose mode,

  • Looking at the help for "dslite --mode processors" indicates -e is for erase

    A verbose output would be nice.

    C:\ti\uniflash_8.2.0>dslite --mode processors -h
    Executing the following command:
    > C:\ti\uniflash_8.2.0\processors\ProcessorSDKSerialFlash.exe -h
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2023 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.8.0.0
    ----------------------------------------------------------------------------
    Displaying Help..
    
    Usage:
    dslite.bat --mode processors -c <COM_Port> -f <File_to_be_transferred_with_full_path> -d <Device_Type> -i <Image_Type> -e <Erase_Length> -o <Offset>
    -fc <Hardware_Flow_Control> -raw <Raw_Mode>
    
    COM_Port: COM port number where processor UART console is connected
    
    File_to_be_transferred_with_full_path: Name of the file to be flashed with full path
    
    Device_Type:
    0 - NAND
    1 - SPI
    2 - QSPI
    3 - OSPI
    4 - eMMC
    5 - HyperFlash
    6 - UFS
    7 - Custom Flash
    
    Image_Type:
    0 - Flash
    1 - MLO
    2 - Uboot
    3 - UImage
    4 - Firmware
    5 - Custom Image
    
    Erase_Length:Flash erase length in bytes
    
    Offset: Flash start offset for image flashing or erase
    
    Hardware_Flow_Control:
    0 - disable
    1 - enable
    
    Raw_Mode:
    0 - disable
    1 - enable
    
    Note:
     - Image type parameter (-i 0) is mandatory while downloading the flash programmer
     - File Path should not be specified in case of Flash Erase
    

  • After the failed flash command, is there an errorlevel return code returned?   

    e.g.  ECHO %ERRORLEVEL%    (at the command prompt after command returns)

  • JP,

    Thanks for your suggestions.

    After running the 

    C:\>C:\ti\uniflash_8.2.0\dslite.bat --mode processors -c COM7 -f C:\ti\processor_sdk_rtos_am57xx_08_01_00_09\pdk_am57xx_1_0_19\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0

    command the error level returned is

    ERRORLEVEL = -1073741819

    which is (xFFFFFFFFC0000005)

    Hopefully TI can help figure out what this means.

    Joe

     

  • Helpful!   That translates to Microsoft's 0xC0000005 = STATUS_ACCESS_VIOLATION.

    Google shows that other folks have gotten this error in conjunction with uniflash in the distant past.

    I will be of limited further help - hopefully TI support can assist.

  • JP,

    Thanks again for you suggestions. It would have been nice if there was a verbose mode.

    I will dig into the STATUS_ACCESS_VIOLATION error.

    Joe

  • Joe and I managed to find a solution to the problem.

    We believe the path names to the files were too long. Once the path was reduced the operation completed successfully. The paths also appear to need to be absolute paths

    Example:

    .\dslite.bat --mode load --config=C:\Users\jott\ti\CCSTargetConfigurations\Flash_XDS100.ccxml -f C:\ti\uniflash_6.4.0\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out -n 7
    
    .\dslite.bat --mode processors -c COM36 -f C:\ti\uniflash_8.2.0\MLO -d 2 -i 1 -o 0
    
    .\dslite.bat --mode processors -c COM36 -f C:\ti\uniflash_8.2.0\led_TEST -d 2 -o 80000

  • Thank you for posting the final solution!   Good work!

  • JP

    Thanks for your inputs, they were helpful.

  • Parth,

    Now that we have figured out a solution I would like to look at how to deploy. Via the Uniflash GUI you can generate package. Since the AM5718 is only supported via Uniflash command line is there a way to generate a package similar to the GUI?

    Joe

  • Hi Joe,

    I have not Uniflash GUI, can you please elaborate what does these packages do and functionality do you require on command line?

    Regards,
    Parth

  • Note that CCS operations can be scripted thru Debug Server Scripting (DSS) and JavaScript.    This may not be an alternative for you.

  • Parth,

    looking at the Uniflash Quick start guide: https://software-dl.ti.com/ccs/esd/uniflash/docs/v8_1/uniflash_quick_start_guide.html

    It talks about the standalone Command line tool

    "

    Standalone Command line tool

    Often in production line environment all you really want is a CLI tool that does one job: Flash the device with verification. This new UniFlash v4 feature is tailor made for this use case.

    After you have chosen the image you would like to flash and configured the flash settings accordingly, go to the "Standalone Command line" view to choose the deployment platform for the CLI tool. Hit "Generate Package" and a zip file will be created; containing everything you need for the deployment platform to flash your target.

    "

    Since the AM57xx part is only support via Command line there is no "Generate Package" button to generate a zip file containing everything needed for flashing the target. I was hoping to be able to generate a zip file or similar for deploying the needed SW to flash the board.

    If you can provide me with instructions on how to create or what is contained in the deployable zip file that would be helpful.

    Joe

  • So basically all you are looking for a one step solution to flash the images to the qspi. If that's the case, you can create shell/batch script that takes in these commands and flash the images for you.

    Regards,
    Parth