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.

RTOS/AM4379: About AM437 RTOS - QSPI flash

Part Number: AM4379
Other Parts Discussed in Thread: UNIFLASH, AM5728

Tool/software: TI-RTOS

Hi Champs:

If the customer has no SD card on their PCB, we have 2 questions:

#1. How to flash the Qspi Flash without copy the boot/app onto SD card?

#2. Anyway to merge the boot/app into 1 file for mass-production?

Plz comment, thank.

BR Rio

  • Rio Chan,

    We provide a flash programming to tool that allows customers to program the flash over the UART interface using a tool called Uniflash:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#uniflash 

    using this tool. AM437x and QSPI flashing seems to be already supported.

    For AM437x, currently the bootloader needs to be flashed at flasj offset 0x0 and the app needs to be programmed at offset 0x80000. This is a configurable option in the bootloader code. Once the size of the bootloader and the app is known. Customer can use one prototype setup to read the images from the flash starting at base address of flash 0x0 until the end of app and write the data to a binary file. This single binary can then be used in production to program the flash as a single image.

    Regards,

    Rahul

  • Hi Rahul:

    ==>For AM437x, currently the bootloader needs to be flashed at flasj offset 0x0 and the app needs to be programmed at offset 0x80000. This is a configurable option in the bootloader code. Once the size of the bootloader and the app is known. Customer can use one prototype setup to read the images from the flash starting at base address of flash 0x0 until the end of app and write the data to a binary file. This single binary can then be used in production to program the flash as a single image.


    (Rio:) Do you have the detail steps that we can follow with?
    Please provide. Thanks.

    BR Rio
  • Rio,

    the process described in relatively simple. Maybe an  description of the flash layout will help you understand.

    Check the size of the QSPI bootloader image (bootloader_boot_qspi_a9host_release_ti.bin) and the application image (app) that you have created for the flash.

    For example if the bootloader is 33KB and the app is 1MB. The 33 KB image will reside at 0x000000 and the 1MB image will reside at offset 0x80000, the flash layout will appear as below:

    In the above case to create a single image, a customer can create a tiny application that reads from offset 0x0 to 0x180000 and write the binary data to a file using File IO operations(fopen, fwrite, fclose) that will write an image to a file on the host. This single image of 1.5 MB can then be shared to be flashed as a single image 

    Other notes/care abouts:

    • the region marked in grey in the above image is gap between bootloader image and the app. Usually if he flash is erased before programming all the bytes in this region will be 0xFF.  To reduce this region the offset in the bootloader can be modified in the file:

    pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_flash_offset_cfg.h

    • serial flash typically is organized in form of sector typically of 256bytes so you will need to read and write from flash as as multiple of sector size. 

    Regards,

    Rahul

  • I try to download uniflash v4.6 and run it.
    When I use "re-sync database" to try to show sitara MCU UI , but I got a error message:
    "Error: Found multiple instance nodes matching cpu id ICECrusherCS_0"
    Any way to fix this issue?
  • Kevin,

    Please indicate the HW Setup like SYSBOOT pins. Are you trying this over UART or JTAG ? Also please provde exact command line arguments that you used. We recommend that you try this first on TI HW and after you confirm migrate and test the custom hardware. Are you connected to Multiple boards or jst single board.

    Regards,
    Rahul
  • Hi Rahul:

    A. We have tried the uniflash 4.3 and 3.x, none of them are not working with AM437,
    can you put a working version onto the TI Box for letting us a try?

    B. Regarding the Single image, Do we have any tool to merge them?
    The reason I ask this is:
    If the customer modifying their APP image, then, then need to re-calculate and modify the Code for flashing, so, this will be annoying way for the customer.
    Any better solution for this?

    BR Rio
  • Rio,

    A .Uniflash has been checkout on the AM437x platform in the latest Uniflash 4.5 and 4.6 version that is available on the web
    www.ti.com/.../UNIFLASH

    There are no known issues that I am aware of.

    B. Padding and Appending two binaries can be done using many host tools. I will try to see if we have anything available internally that can be shared.

    Regards,
    Rahul
  • Hi I had the same Issue and Blackhawk has a solution on their site:

    UniFlash v4.5.0.2056

    If you are using UniFlash v4.5.0.2056, there may be an issue with re-syncing the database. If you run into the error: Found multiple instance nodes matching cpu id ICECrusherCS_0, please follow these instructions to correct the duplicate instances.

    • ICECrusherCS_0 is defined more than once in the device file: AM5728.xml supplied by the UniFlash installation (this is not a Blackhawk file).
      File path is: <uniflash install dir>\deskdb\content\TICloudAgent\win\ccs_base\common\targetdb\devices
      Use a text editor (i.e. notepad++) to open the file and make the following changes.
    • On lines 163 and 164, change ICECrusherCS_0 entries for the and tags to ICECrusherCS_2
    • On lines 206 and 207, change ICECrusherCS_0 entries for the and tags to ICECrusherCS_3
    • Save your changes. If you backup the original XML file, do not leave it in the folder. Copy it outside the UniFlash installation folders, otherwise it will still be processed during the re-sync and produce the same error.
    • This will make the ICECrusherCS cpu id unique across nodes (ICECrusherCS_0, ICECrusherCS_1, ICECrusherCS_2, ICECrusherCS_3) and not effect UniFlash operation on AM5728 devices. It is just giving each node a unique id, which is neecessary.
    • Now you should be able to re-sync the database.

    I am using uniflash 4.6.0.2176 which has the same issue rsyncing database. With this fix it works.