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.

GEL FILES



Hi,

When we load a binary using the Emulator, all GEL files attached to the Target Configuration file *.ccxml are executed on loading the .out file or appear as a menu items under the scripts menu of CCS, which can be executed by the user.

But when we flash the .out file and restart the board to execute the .out file from the flash (using a Bootloader or other methods,

How the board is configured, especially, if these GEL file configure external memory or configure MMU.

Do not we need the effect of GEL files when we boot from power recycle?

Regards

  • Hi,

    The code flashed to the board will have to perform the initialization for you - otherwise your product will not work.

    Since the GEL files are written in "C" syntax, integrating the initialization routines is a pretty straightforward process.

    Section 2 of the GEL page below talks about the startup files and a linked document that has some additional details about the integration.

    processors.wiki.ti.com/.../GEL

    Hope this helps,
    Rafael
  • Hi

    Thanks for the swift reply.

    I read the link few times and another link in that page. Both describe how to write a GEL file.

    I could not see how to change a GEL to C functions,
    although as you said they are C like functions. But the GEL functions should also be available like GEL_MapAdd
    How this can be converted to C?

    Could you please give me a standard GEL script with its C converted code
    and where I call this function, I think it should be called before code is loaded from Flash to RAM.
    Is this correct??

    Regards
  • Hi,

    As a general statement, the GEL built-in functions don't need to be translated as they have no effect on HW - GEL_MapAdd and GEL_MapAddStr are two of them. A more complete list can be found at the CCS menu Help --> Help Contents --> search for "GEL"

    In this case you can simply remove them from the translated code.

    Another detail is that, since your HW will not have to be connected to work, the contents of the callback functions such as OnTargetConnect() or OnFileLoaded() will have to be explicitly called by your code.

    Depending on your hardware and device, you will have to carefully examine if your system will require these calls to be made immediately after the device starts at reset or at main().

    In the case of a typical high end processor, usually the boot ROM is configured (via the boot mode pins) to copy part of your custom code from an external flash to its internal RAM, which will in turn copy some more code from flash to external DDR (the application itself). This initial custom code would be named bootloader and will be tasked to properly configure DDR, PMIC, certain peripherals, etc. - that is probably where the code inside OnTargetConnect() will be relevant.

    Obviously that all this is highly dependent on your system, but that is the basic principle of this process.

    Hope this helps,
    Rafael