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.

boot custom AM1705 via UART mode using AISgen/UartHost tool

Other Parts Discussed in Thread: AM1705, OMAP-L137, OMAP-L138

Hi,

I'm trying to boot my custom board of AM1705 via UART.

I'm trying to use AISGen tool to generate the ais.bin file. I have found the values of PLLsettings, EMIFB settings and PINMUX settings according to the custom board requirements.

 I have the following questions:

1. Where to get the Application File ?

According to AM17xx boot-loader document: "Specify a ARM application file (*.out) in the appropriate box by either typing its name in the appropriate box or using the browse button to locate it. A valid ARM application can be created by building a project in Code Composer Studio.").

What is an Application File ? Is it ARM-UBL or u-boot.bin or both ? Can this generated from the linux PSP SDK. (I don't want to use CCS in Windows to build it.).

2. Can I use HexAIS and slf_OMAP_L137.exe tools instead of AISGen ?

I have gone through the forum links:

AM1705 ARM-UBL Source Code: http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/47/t/107883.aspx

ini file for HexAIS for Sitara AM17x evaluation module: http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/47/p/103862/383437.aspx#383437

However, I'm not clear how to use HexAIS tool and slf_OMAP_L137.exe tools to generate the Application File and boot the custom board via UART mode.

Please help.

Arul

  • Hi Arul,

    Regarding 1:

    The application file is an elf file wih the application you want to run. In case of u-boot it is typically named: u-boot (without extension). I never used UBL so I can't say what's the name there.

    To generate the u-boot binary, you can follow the instructions on:

    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_U-Boot

    Regarding 2:

    You can download the boot and flash utilities here:

    http://sourceforge.net/projects/dvflashutils/files/OMAP-L137/

    here you find the steps needed to compile the software:

    http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L137#Compiling

    On my Ubuntu Linux, I had to remove the *.exe files before compiling, otherwise the makefile does not rebuild them

    Once compiled the stuff, you find a tools called HexAIS_OMAP-L137.exe. This can be used as a replacement for the graphical AISGen tool. However you need to create an ini file for it to configure the parameters you need. An example for the syntax can be found here: http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/47/3286.OMAP_2D00_L137_5F00_uart.ini.txt

    Best regards,

    Stefan

  • I would recommend using AISGen instead, which is the GUI version of HexAIS.

    Jeff

  • Hi Stefan,

    Thank  you for your reply. I'm able to understand better now.

    However, when I tried to build the HexAIS tool, I ran into problems like "gmcs command not found". I was using Fedora 14 Linux which doesn't support mono. Now. I've switch to Ubuntu Linux and working on creating ini file to compile the HexAIS tool.

    Where to put the u-boot.bin input file. Can it be placed in the same directory  ./HexAIS_OMAP-L137.exe is running ?

     

    Regards,

    Arul

     

  • Hi Jeff,

    Does AISGen accept raw binary format of u-boot.bin ? I tried using the pre-bult u-boot.bin from images (renaming it to u-boot.out) . But, I'm getting an error message.

    This forum link says both formats(elf and binary) are supported.

    From Daniel Allred:

    "Also, note that if you use the latest AISGen program for D800K003, you do not need to run the raw2coff program.  The AIS generator can take binary files directly.  It can also take u-boot ELF executable (usually just a file called u-boot) and parse it directly as well."

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/70783/257619.aspx#257619

     

    Regards,

    Arul

  • Yes, it will. You will have to specify the entry point of the program by selecting "Specify Entrypoint", since this information is not included in raw binary files.

    Jeff

  • Hi Jeff,

    I am able to compile the u-boot directory and load the elf file in AISGen tool.

    UartHost works fine with baud rate 115200. But I got the following errors.

    (File IO): Read 157288 bytes from file C:\AM1705\ais.bin.
    (Serial Port): Opening COM4 at 115200 baud...
    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    ...

    (AIS Parse): Processing command 56: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 123892-Byte section to address 0xC1080000.
    (AIS Parse): Processing command 57: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (Serial Port): Read error! (The operation has timed out.)
    (AIS Parse): I/O Error in read!

    I'm stuck here. How to proceed from this error ? Does this mean my SDRAM memory configuration is incorrect ? (I use a 16-bit, 32MB SD-RAM instead of 32-bit SDRAM used by DA830 EVM).

    Is it possible to load the u-boot in Internal on-chip RAM ? (which has 128KB size at location 0x8000 0000).

    Regards,

    Arul

  • Have you reconfigured the SDRAM timings and recompiled your code? The instructions are similar to those for OMAP-L138: http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138#Modifications_for_Custom_Boards

    Also try using a different USB->Serial cable, as some seem to have issues with this program. Thanks

    Jeff

  • Hi Jeff,

    I have probed the INPUT CLOCK to SD-RAM and it shows 100MHz (as set by AISGen tool).  I've rechecked the SDRAM timings and they look OK.

    Also, changed the USB->Serial Cable.

    The issue still remains the same.

     

    I haven't done any changes for the custom board as mentioned in this wiki. B'cos, currently, I'm focusing on UART BOOT mode and not via Serial Flash Host.  (The files mentioned in the link, don't have impact for UART boot mode). http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138#Modifications_for_Custom_Boards

    Here are my SD-RAM settings:

    SDCFG = 0x0001C421, SDTIM1 =0x0C492188, SDTIM2 = 0x30070004, SDRFC = 0x0000030C

    Apart from this, I have modified the file da830_evm.h file(changed only the Memory Info values) inorder to compile u-boot.

     

     /*

     

     

     

    Regards,

    Arul

     

     

    * Memory Info

    */

    #define CONFIG_SYS_MALLOC_LEN (0x10000 + 1*1024*1024) /* malloc() len */

    #define CONFIG_SYS_GBL_DATA_SIZE 128 /* reserved for initial data */

    #define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */

    #define PHYS_SDRAM_1_SIZE (32 << 20) /* SDRAM size 64MB */

    #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 + 0x0100000 /* memtest start addr */

    #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x0100000 + 1*1024*1024) /* 1MB test */

    #define CONFIG_NR_DRAM_BANKS 4 /* we have 1 bank of DRAM */

    #define CONFIG_STACKSIZE (256*1024) /* regular stack */

    3005.da830evm.h.txt

  • Hi Arul, can you try flashing with the CCS-based flashing tool that comes with the PSP/SDK? It would be much easier to debug in a CCS environment than using the serial flasher.

    Jeff

  • Hi Jeff,

    My custom board is up and running now.

    The I/O read error issue got resolved, when I switched to slh_OMAP-L137.exe tool instead of UartHost.exe to load the AIS file to SD-RAM. I guess UartHost.exe is expecting immediate acknowledgement from the device. But, since I'm loading around ~93K bytes at one shot, it's taking longer time to send Acknowledgement.

    Next I encountered the baud rate issue and as a result u-boot prompt did not display properly. Thanks to input from Andrew Foster (http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/47/p/103862/383437.aspx#383437), the issue got fixed after setting the oversampling value to 16x.

     

    Regards,

    Arul