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.

OMAP-L138 AIS Gen

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi,

I am using OMAP-L138 EVM from Logic PD.

If my understanding is correct now Logic PD EVM supports flashing the bootloader through UART2.

We are in the process of designing HW in which we are planning to use UART1 for boot mode.

With this change my understanding is that I need to generate a new AIS file using AISgen for D800K006 right and I have to select BOOT mode as UART1 is my understanding correct ?

And to program the SPI Flash using SFH we need to set the S7-7 and S7-8 to ON. With this OMAP-L138 enters in UART2 Boot mode right?

The WinCE BSP Install BSP_WINCE_ARM9_01_00_01\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin contains the arm-spi-ais.bin for generating this what is ARM application file?

Thank You & Regards,

GSR

 

  • Hi GSR,

    1.  LogicPD EVM supports flashing bootloader through UART2.

    2.  To program SPI/NOR/NAND flash using sfh, s7-7 and s7-8 are set to ON, which brings the EVM into UART2 boot mode.

    3.  In release BSP_WINCE_ARM9_01_00_01 release, the ubl to be flashed to SPI by using sfh is the file ubl_OMAPL138_SPI_MEM.bin included in the same directory where you find arm-spi-ais.bin.  The ARM application file is the EBOOT image file, EBOOTSPIFLASH.nb0 in this case, which is generated when you compile an OSDesign.

    4.  The ubl images included in the release are only for SPI/NAND/NOR boot modes.  UART boot mode is not explored so far.  You can find more information of UART boot mode from section 8 of http://focus.ti.com/lit/an/sprab41c/sprab41c.pdf.  You will need to compile an ubl for uart1 boot mode and convert the generated .out file to AIS format for uart1 boot mode.  When you compile the ubl for uart1 boot mode, you may need to modify the ubl source code.

    Hope this helps,

    WM

  • Hi WM,

    Thanks for replying.

    I am able to flash the Logic PD EVM with the sfh tool and I can see that the EVM boots with the WinCE Bootloader.

    My actual question is we are planning to use UART1  for flashing the bootloader.

    With this hardware change, can I use the sfh_OMAP-L138.exe without any modifications in ubl_OMAPL138_SPI_MEM.bin and arm-spi-ais.bin ?

    Thank You & Regards,

    GSR

  • GSR,

    You cannot use ubl_OMAPL138_SPI_MEM.bin or arm-spi-ais.bin as is.  These are compiled for UART2.  You need to recompile the ubl for UART1.  But the change should be minimal.  It is just changing a #define.

    Regards,

    WM

  • Hi WM,

    Thank You Very Much for replying.

    I understand that if we use UART1 instead of UART2 for flashing the UBL and EBOOT then, modification to the UBL and AIS is required.

    So, to achieve the same I have taken UBL source code from the following path BSP_WINCE_ARM9_01_00_01\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\armubl-03.20.00.08. I have compiled this source code using CCS v3.3.  I have used the generated ubl_spi.bin (Size is 16KB) for flashing the OMAP-L138 EVM (Received from Logic PD) using sfh_OMAP-L138.exe. The SFH flasher tool reports that the flashing is success.

    What I had observed is that the board doesn't boot at all, the LCD screen was just blank.

    Also I noticed in the source code that UBL source code is using UART0 as debug port.

    My question is using which source code ubl_OMAPL138_SPI_MEM.bin is generated? If it is not available under the BSP_WINCE_ARM9_01_00_01 then from where and how can I get the source code for ubl_OMAPL138_SPI_MEM.bin ?

    Thank You & Regards,

    GSR

  • Hello GSR,

    There may be some issues between the "magic numbers" used in the armubl-03.20.00.08 source code and those expected by the sfh serial flasher utility binary.  The ubl_OMAPL138_SPI_MEM.bin has those magic number issue fixes.

    To avoid those issues, I would suggest to use armubl-03.20.00.14 source code and sfh v2.30.

    armubl-03.20.00.14 is included in DaVinci-PSP-SDK-03.20.00.14 which can be downloaded from "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/LinuxPSP/DaVinci_03_20/03_20_00_14/index_FDS.html".

    Search for armubl-03.20.00.14.tgz after DaVinci-PSP-SDK-03.20.00.14.tgz is downloaded and extracted.

    Please refer to "http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_the_ARM_Side_User_Boot_Loader" for more details on compiling the ubl.

    sfh v2.30 (OMAP-L138_FlashAndBootUtils_2_30.tar.gz) can be downloaded from http://sourceforge.net/projects/dvflashutils/files/OMAP-L138/.  

    Search for sfh_OMAP-L138.exe after OMAP-L138_FlashAndBootUtils_2_30.tar.gz is downloaded and extracted.

    You should be able to compile the ubl for UART2 without any modifications to the armubl-03.20.00.14 source code and flash it to the OMAP-L138 EVM using the sfh v2.30 executable.

    The armubl-03.20.00.14 and the sfh v2.0 executable will be included in the upcoming WinCE BSP release.

    Regards,

    WM

  • Hi WM,

    Thank You Very Much for the information that you have provided.

    I have downlaoded the armubl-03.20.00.14.tgz and able to build the UBL in CCS.

    CCS is generating .out and .bin files. I have taken the .out file and given that as a Input the AISgen Utility and it the AISGen tool successfully generated .bin file.

    Using sfh_OMAP-L138.exe (v2.30) I am able to flash UBL and EBOOT successfully.

    I can see that the Logic PD EVM boots with out any issues.

    Could you tell me how the arm-spi-ais.bin file is generated and where the source code available for it. Because I want to modify it to use UART1 for flashing the UBL and EBOOT?

    Is arm-spi-ais.bin is responsible for flashing UBL and EBOOT on OMAP-L138?

    Thank You & Regards,

    GSR

  • Hi WM,

    I have created a new folder on desktopn and copied the sfh_OMAP-L138.exe, ubl-spi-ais.bin, EBOOTSPIFLASH.nb0

    With this setup I am able to flash the bootloaders.

    I am not clear what for arm-spi-ais.bin used, which is available at the following path C:\TI\BSP_WINCE_ARM9_01_00_01\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

    Please help us in understanding these binaries.

    I did a hex comparison between the ubl_OMAPL138_SPI_MEM.bin and ubl-spi-ais.bin which is generated from the armubl-03.20.00.14 and both of them are not same.

    So ubl_OMAPL138_SPI_MEM.bin is based on a older version of arm ubl ? If so can I get the version of it ?

    When we use ubl_OMAPL138_SPI_MEM.bin on UART the UBL reports its version as 1.65. Where as the UBL which is generated from armubl-03.20.00.14 doesn't show anything.

    Thank You & Regards,

    GSR

  • Hello GSR,

    Where do you find ubl-spi-ais.bin in the BSP release?   Do you mean arm-spi-ais.bin instead?

    Regarding arm-spi-ais.bin and ubl_OMAPL138_SPI_MEM.bin in the WinCE BSP release 01.00.01, they are both ubl for OMAP-L138 in AIS format.    The arm-spi-ais.bin is included as part of armubl-03.20.00.08 while ubl_OMAPL138_SPI_MEM.bin is included as part of sfh v2.0.  When sfh is released, there was some issues with "magic numbers" expected by sfh and the arm-spi-ais.bin could not be used by sfh directly.  Instead, some magic number changes are applied to armubl source code and generated the ubl_OMAPL138_SPI_MEM.bin which is inncluded in the sfh release, so that it can be used by sfh in flashing.  This is why in the WinCE BSP release 01.00.01, we cannot flash arm-spi-ais.bin to the board using sfh.  Instead we need to flash ubl_OMAPL138_SPI_MEM.bin to the board when sfh is used as the flashing tool.

    But the above issue is corrected in armubl-03.20.00.14 and sfh v2.30.  Starting from these two releases, arm-spi-ais.bin generated by compiling the source code of armubl-03.20.00.14 can be used directly by sfh (v2.30) without further modification.

    So, in order to avoid the confusions, I would suggest you to use these armubl-03.20.00.14 and sfh v2.30 if you are planning to modify armubl source code.

    As was mentioned before, please refer to the doc "Using the OMAP-L1x8 Bootloader" (http://focus.ti.com/lit/an/sprab41c/sprab41c.pdf) for more details regarding the bootloader and AIS format.

    Regards,

    WM 

  • Hi WM,

    Thank You for reply.

    We have done some modifications to OMAP-L138 supplied by Logic-PD to make UART1 as boot device.

    We have used UART Expansion Board from Mistral and I can see BOOTME packet on Serial Port when I conenct the UART cable between UART Expansion board and PC.

    Now I am running the sfh utility and it's throwing an exception and closing.

    When I had gone through the code it looks that in SFT the UART number is hard coded to 2.

    So, my understanding is I need to generate SFH Utility also by changin that macro value to 1.(DEVICE_UART_PERIPHNUM) which is available in device_uart.h

    -----------------------------------------------------
       TI Serial Flasher Host Program for OMAP-L138
       (C) 2010, Texas Instruments, Inc.
       Ver. 1.67
    -----------------------------------------------------


          [TYPE] Global erase
        [DEVICE] SPI_MEM

    Attempting to connect to device COM1...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (Serial Port): Read error! (The I/O operation has been aborted because of either a thread exit or an appli
    cation request.
    )
    (AIS Parse): Read invalid BOOTME string.
    (AIS Parse): Boot aborted.
    Booting SFT failed. Trying again (you may need to reset the target)...
    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    The I/O operation has been aborted because of either a thread exit or an application request.

    Interfacing to the OMAP-L138 via UART failed.
    Please reset or power-cycle the board and try again...

    The other question is does the SFH uses RTS and CTS ?

    Please help us in our understanding.

    Thank You & Regards,

    GSR

  • Hello GSR,

    Good to see that you are making progress.

    I would say that you need to modify sfh also.  But I'm not that familiar with the internals of the sfh utility.  

    You can get more help about sfh from the OMAP-L1x Processor Forum at the address http://e2e.ti.com/support/dsp/omap_applications_processors/f/42.aspx

    I would suggest you to search the forum first and if your question is not already answered there, you may post your question in that forum.  A search of "sfh" in the OMAP-L1x  Processor forum shows that some queries about compiling sfh are already answered.

    Regards,

    WM