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.

AISgen generates different binary on command-line than manually

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

Attached is an AISGen .cfg file. If I run it on the command line with -cfg, it produces a different (by one byte) binary than if I load the very same config file in AISGen's GUI and click Generate AIS manually. The diff of the hexdumps of the binaries is:

diff -u auto.hex manual.hex

--- auto.hex    2010-07-08 15:40:23.487531202 -0400

+++ manual.hex  2010-07-08 15:40:29.510906108 -0400

@@ -1,5 +1,5 @@

 00000000  54 49 50 41 0d 59 53 58  06 00 03 00 01 00 18 00  |TIPA.YSX........|

-00000010  05 0b 00 00 00 00 00 00  0d 59 53 58 01 00 02 00  |.........YSX....|

+00000010  05 0b 00 00 95 00 00 00  0d 59 53 58 01 00 02 00  |.........YSX....|

 00000020  01 00 01 15 02 00 00 00  01 59 53 58 00 00 80 00  |.........YSX....|

 00000030  20 04 00 00 2a 94 b8 00  6a f1 80 00 e6 02 04 00  | ...*...j.......|

 00000040  28 00 00 02 68 78 00 02  6c 20 2c 40 03 f8 0c 00  |(...hx..l ,@....|

This means I can't auto-generate the AIS script as a post-build step, as this is the version missing the 0x95, and it doesn't boot on my C6748.

  • James,

    We will look into this issue.  In the meantime, you may want to consider using the command-line HexAIS tool which is included in the Flash and Boot Utility package for the OMAP-L138 (and compatible/similar devices like the C6748).  That package is referenced here.  The configuration info is slightly different, since there is no GUI, but it is probably a better choice to fit into some kind of automated build flow.

    We will post here when we have some particular info on the issue you are seeing.

    Regards, Daniel

  • James,

    It appears that there is a bug in the command line usage that does not correctly calculate peripheral clocks.  Using your CFG file, the byte that's different between GUI and command line usage is the value that's applied to the SPI peripheral clock prescalar.  The correct value (0x95, in this case) is necessary for the SPI peripheral to work properly.

    Thanks for bringing this to our attention.  I will get a fixed version of the AISgen tool posted on ti.com as soon as possible.

  • Update: version 1.6 of the AISgen tool is now online.  This new version fixes the bug that caused incorrect peripheral clock values to be applied when running the tool from the command line.

    Simply re-download and re-install from ti.com to get the updated tool.  The ZIP file name has not changed, but the installer EXE inside will indicate that it's version 1.6.  You can also check your version using the Help->About screen once you're up and running.

  • The new version does indeed fix my issue; thanks!

  • I'm using version 1.6 of AISGen and have a similar problem. I'm targeting NOR.

    Here is the beginning of the file I get from the GUI

    Here is the beginning I get from the command line

    It looks like the first word and the flash timing word are wrong.

    Do you have a Microsoft Solution for the AISGen?

    I will try using the Hexais generator too.

  • I tried Hexais utility and get

    -----------------------------------------------------
       TI AIS Hex File Generator for OMAP-L138
       (C) 2010, Texas Instruments, Inc.
       Ver. 1.24
    -----------------------------------------------------


    Begining the AIS file generation.
    AIS file being generated for bootmode: EMIFA.
    Parsing the input object file, ARM_AISExtra_OMAP-L138.out.
       at TI.AISLib.AISGen.InsertAISCommandViaINI(AISGen devAISGen, IniSection sec)
       at TI.AISLib.AISGen.GenAIS(AISGen devAISGen, List`1 inputFileNames, IniFile iniFile)
       at TIBootAndFlash.Program.Main(String[] args)
    Object reference not set to an instance of an object.
    Unhandled Exception!!! Application will now exit.

     

    The ini file starts like this:

    [General]

    ; Can be 8 or 16 - used in emifa
    busWidth=16           

    ; SPIMASTER,I2CMASTER,EMIFA,NAND,EMAC,UART,PCI,HPI,USB,MMC_SD,VLYNQ,RAW
    BootMode=EMIFA

    ; 8,16,24 - used for SPI,I2C
    ;AddrWidth=8         

    ; NO_CRC,SECTION_CRC,SINGLE_CRC
    crcCheckType=NO_CRC

  • John,

    Sorry for the delay in responding.  I notice that you are still using AISgen version 1.6.  Can you try using AISgen 1.7 to see if it fixes your problem?  Version 1.7 should be available for download with the app note.  (Don't give up if the ZIP file you download has the same name as one you previously downloaded.  The contents may still be different.)

    Hope this helps.

  • Hello.

    What is an actual version of the AisGen tool today? And where can I download it?

    I need it for the am1705 device but the proposed version (0.7.0) doesn't support the command line.

  • Hello Sergei,

    The latest official version is indeed 0.7.0; you can get it from the following link (you will find newer version at the same link provided it is further available):

    http://www-s.ti.com/sc/techlit/sprab04.zip

    You can find this link (true, a bit hidden) e.g. in the "Using the AM17xx Bootloader " document available at the product folder page (http://focus.ti.com/docs/prod/folders/print/am1705.html).

    Regarding cmd line, there is a way worth to try:

    AisGen 0.7.0 in this case is in fact just a GUI for HexAIS_OMAP-L137.exe command line utility that does all the job. It is found in AisGen program installation directory. You may try to call it yourself from cmd. line. The only issue is that it must be supplied with a *.INI file describing your configuration, which might be a bit tricky to understand. You may find some examples across forums here being discussed by various users.

    However, If you generate an AIS from AisGen GUI, it should also automatically create corresponding *.INI file for HexAIS utility it is further calling. It should be found in the AisGen installation directory as well.

    The easiest way how to get your *.INI therefore could be to set parameters in AisGen GUI as usually and generate AIS from the GUI first time. You should find after generated *.INI in the AisGen program installation directory. It can be modified if needed and used together with HexAIS to generate an AIS from cmd. line without the GUI next time. Type "HexAIS_OMAP-L137.exe -h" to get the cmd. line options.

    Best regards,
    Muf.