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.

Writing Address of Serial Flash Utility for OMAP-L137?

Other Parts Discussed in Thread: OMAP-L137

I'm using the serial boot and flash utility for OMAP-L137 to write dsp ubl, arm ubl and uboot to nand flash.

 This page (http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L137) says "This will place a DSP AIS file at address 0x0 of the flash, an ARM UBL at address 0x2000, and an application image, such as u-boot, at address 0x8000. This is used for the OMAPL137_v1 and OMAPL137_v2 devices. "

But I notice dsp ubl, arm ubl and uboot should be placed at block 1, block 2 and block 4. I review the source code of flash writer in PSP packge and think it does so.

Where does the serial boot and flash utility put these files exactly or do I misunderstanding something?

  • Hi Yiran,

    If you look at the source code of the DSP UBL , ARM UBL, you will notice that there are offsets configured in the source files of where individual binaries need to be in your flash memory. The PSP package customizes the flash writers to match what is configured in the source files.

    The serial flasher utility hard codes this to load the DSP UBL at offset 0x0 , ARM UBL at offset 0x2000(8KB) and UBOOT at offset 0x8000(32KB). So when you provide the command line option

    C:\flasher>sfh_OMAP-L137.exe -flash_dsp dsp-ubl-ais.bin arm-ubl.bin uboot.bin

    It will parse the three binaries and place the binaries at the above mentioned offsets. The PSP binaries have over all it`s releases adhered to the same offsets in the UBL source code so you can use the serial flash utility as is. but if you happen to create DSP UBL of size greater than 8KB then you will have to change the offsets accordingly.

    Regards,

    Rahul


  •  Thank you Rahul,

    I find these defines in device_nand.h in PSP nand writer source code. They are almost the same in DSP UBL and ARM UBL source code.

    // Defines which NAND blocks the RBL will search in for a UBL image
    #define DEVICE_NAND_RBL_SEARCH_START_BLOCK     (1)
    #define DEVICE_NAND_ARM_UBL_SEARCH_START_BLOCK (2)
    #define DEVICE_ARMBOOT_NAND_UBOOT_SEARCH_START_BLOCK   (2)
    #define DEVICE_DSPBOOT_NAND_UBOOT_SEARCH_START_BLOCK   (4)
    #define DEVICE_NAND_SEARCH_END_BLOCK           (24)

    OMAP-L137 is a dsp boot device, so the DSP UBL, ARM UBL and UBOOT should be placed at block 1, block 2 and block 4 of nand flash. If the block size of the nand device is 128K, the offset should be 0x20000, 0x40000 and 0x80000. Am I right?

    I just don't know where to find the source code of the serial flash utility I use in windows command line.

    Regards,

    Yiran

  • Yiran,

    If you have downloaded the Serial flash and boot utilites from the wiki article that you have mentioned the source for the Sfh tool can be found under the following path

    Common/sfh,  Common/sft and OMAP-L137/GNU/sfh. You should see the offset configured in a file called uartboot.c

    Hope this helps.

    Regards,

    Rahul

  •  Thank you Rahul,

    I read uartboot.c and finally figure it out. The offset 0x0, 0x2000, 0x8000 for DSP UBL, ARM UBL and Uboot just apply to SPI flash. For NAND flash, the offset should still be block 1, block 2 and  block 4 (if there is no  bad block).

    The offsets are defined in the  nand_device.h under OMAP-L137\Common\include as below,  just the same in the flash writer of PSP.   

    // Defines which NAND blocks the RBL will search in for a UBL image
    #define DEVICE_NAND_RBL_SEARCH_START_BLOCK (1)
    #define DEVICE_NAND_RBL_SEARCH_END_BLOCK (5)


    #define DEVICE_NAND_UBL_SEARCH_START_BLOCK (6) //FIX Me;temporary memory addr wrong
    #define DEVICE_NAND_UBL_SEARCH_END_BLOCK (50) //FIX Me;temporary memory addr wrong
    #define DEVICE_NAND_ARMUBL_SEARCH_START_BLOCK (2)
    #define DEVICE_NAND_ARMUBL_SEARCH_END_BLOCK (24)
    #define DEVICE_NAND_UBOOT_SEARCH_START_BLOCK (4)
    #define DEVICE_NAND_UBOOT_SEARCH_END_BLOCK (24)

    Regards,

    Yiran