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.

About BIOS setMemCodeSections

Hi,

I have an application developed for my custom board. When I don't include the statement "bios.setMemCodeSections(prog, prog.get("SRAM"))" in my TCF, I get the link error as:

"D:\\projects\\e12\\build\\C6747\\LogKeeper\\LogKeepercfg.cmd", line 361: error: 

   run placement fails for object ".devtable", size 0x48 (page 0).  Available

   ranges:

   IRAM         size: 0x40000      unused: 0x4f         max hole: 0x38      

"D:\\projects\\e12\\build\\C6747\\LogKeeper\\LogKeepercfg.cmd", line 428: error: 

   placement fails for object ".log", size 0x48 (page 0).  Available ranges:

   IRAM         size: 0x40000      unused: 0x4f         max hole: 0x38      

 

There are a total of about 26 of them. I just extracted 2 of them here.

However, if I included the statement "bios.setMemCodeSections(prog, prog.get("SRAM"))", it built nicely. Unfortunately, when I load the program to my custom board, I got the error diaglog as:

 

I am totally new to this. Can someone guide me to solve my problem? Any documentation is relevant for me to learn something about this?

For your information, my custom board has a SDRAM form Micron - MT48LC4M32B2. It's a 1Meg x 32 x 4 banks SDRAM.

Thank you and best regards.

Chee-Beng

 

  • What version of BIOS are you using?

     

  • Hi David,

    I am using BIOS version 5.41.

    Thanks.

    Chee-Beng

  • Chee-Beng,

    You need to create a MEM segment for your SDRAM.  You need to specify the base, length, etc...

    Then you should place your code and/or data into this new MEM segment by doing something like: "bios.setMemCodeSections(prog, prog.get("SDRAM"))";

    You are getting a load error probably because your custom board does not contain any memory at the specified address.  Are you using that graphical configuration tool?  It shows you what defined memory segments are.  I'm sure that they don't match your custom board and that's why you get a load error. See the document "spru007h.pdf" for more information on how to use textual configuration.  This document should be included in your installation.

    Judah

  • Judah,

    I did what I can but still cannot get it right. Therefore, I attach herewith some information and hope you can guide me the way to learn and get my product prototype out in time.

    In my attachment, you should find the TCF, platform, and the way I initialise EMIFB. For your information, the SDRAM used in my custom board is MT48LC4M32B2 from Micron. It is connected to EMIFB of my C6747 DSP.

    Thanks.

    Chee-Beng

    project.zip
  • Chee-Beng

    The TCF looks good for the c6747, so I don't think its the memory map defined in the tcf file.

    I think the problem probably is with the way you initialized your EMIFB.  Unfortunately, I'm don't know much about initializing the EMIF.

    Can you try poking the SDRAM memory from a CCS memory window to see if that works?

    I think you might need someone with more knowledge of the c6747 device and/or EMIF setup.

    Judah

  • Hi Judah,

    We had found the answer. The problem was that the initialisation of EMIFB should be conducted before loading of program to the custom board. The wrong thing we had done was intialising EMIFB in User Init Function. However, when we use the bios.setMemCodeSections(prog, prog.get("SRAM"), CCS is trying to load into SRAM, which is not setup at loading time. Here is what we do to solve it.

    1. If not self-booting, we use the GEL file to setup the EMIFB. This will ensure the SDRAM connecting to EMIFB is properly setup before we even download the codes into our custom board.

    2. If self-boot, we use the AIS to setup and initialise the EMIFB.

    Hope this will help other forumers.

    Thanks.

    Chee-Beng