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.

How to enable external ram using GEL file

To All,

Item 1:

I am using CCS as developemnt environment. Attached zip file contains the gel files and CMD file that we are using with our project to run from internal ram. I am using Development kit DK-LM3S9B96. This developemnt kit has 8 MByte of external  RAM. I would like to create a test application that will get loaded into 8 Mbyte of external ram and run from external RAM. I also like to use the IDE debugger to debug the application that is running from external RAM. Any help you can provide will be very helpful.

Item 2.

I wanted to use the real time clock. Dose  any one has an example code of to initialize and start real time clock using function call available in ROM library or drivver library?

Thanks.

GELandCMDfile.zip
  • For Item #1, you simply modify your cmd file so that the sections are placed in external RAM (specified as XSRAM in you cmd file). You'll also need to change the BETA_BASE to 0x60000000 from 0x20000000 (line 23) or define a new name to use.

    SECTIONS

    {

        .intvecs:   > BETA_BASE

        .text   :   > XSRAM

        .const  :   > XSRAM

        .cinit  :   > XSRAM

        .pinit  :   > XSRAM

        .data   :   > XSRAM

        .bss    :   > XSRAM

        .sysmem :   > XSRAM

        .stack  :   > XSRAM

    }

     

    For Item #2, you may want to post that question in the Stellaris forum.

    Thanks

    ki

  • Ki-Soo Lee ...

    This answer addresses how to link the code to run from the 0x60000000 address space.  But it does not help to debug the code at 0x60000000.

    The JTAG debugger can't write the code to the 0x60000000 address space because it is not enabled!

    The question is:  How can I get CCS to enable the SDRAM before trying to load code into it?

    I have been trying to write a GEL script the will execute on tagget connectinon ( OnTargetConnect), but have not been successful yet.

  • Larry,

    Larry Harmon said:
    The question is:  How can I get CCS to enable the SDRAM before trying to load code into it?

    In the gel file Ashok had provided in the zip file, external SRAM is specified to CCS at that address (line 128 of lm3s9b96.gel):

        GEL_MapAddStr(0x60000000, 0, 0x00800000, "R|W", 9);  /* External SRAM */

    This will tell CCS that there is writable memory at 0x60000000. But that memory may need to be initialized first. Ashok's GEL file has a call 'extSDRAM_init()' which gets called on OnTargetConnect() which I assume is the actions needed to enable SDRAM. However he had commented that part of the code out for whatever reason (maybe he is initializing it sometime else)

    ki

  • Ki,

    I am working with Al. 

    The script I am trying to write is extSDRAM_init().  But can't get it to work.  This is our problem!

    Has anyone really been able to write a script that will do what I'm trying to do with Code Composer Studio?  Is it really possible?

    I'm not looking for guesses, just facts!

     

     

     

    Larry

  • Larry,

    It certainly is possible and your idea of doing it in GEL during OnTargetConnect() makes sense. But I'd suggest posting your query in the Stellaris forum as they will have more expertise on what you need to do to enable SDRAM.

    Thanks

    ki

  • I have been able to create a GEL file to pre-configute the external SDRAM fo CCS can load a program into it.

    I am having some run-time problems, but thats another mater.

     

    Thanks,

    Larry