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.

[OMAP3530] Bios configuration

Other Parts Discussed in Thread: OMAP3503, OMAP3530, CCSTUDIO

Hi all

         I am presently working on  Bcache functions in BIOS configuration(omap3503 evm(omap3530))..

bcache functions are working fine But mallocs r giving errors..

#include<stdio.h>
#include <stdlib.h>


main()
{
  int i,j=0;
  char *buffer,ch;
  FILE *fp1,*fp2;
  printf("no of elements value i=");
  scanf("%d",&i);
  buffer=(char*)malloc (sizeof(i));
   memset (buffer,0,i);
   if((fp1=fopen("input.txt","rb"))==NULL)
   printf("file is not created");
   fp2=fopen("out.txt","wb");
      while(!feof(fp1))
   {
     ch=fgetc(fp1);
  buffer[j++]=ch;

   }
   fwrite (buffer, 20 , sizeof(buffer) , fp2 );

   fclose(fp1);
   fclose(fp2);

}

If we run the above sample prog in simulator its working fine. but i tried in emulator with bios configuraion scanf,malloc and memsets are not working properly,

malloc returns null .

what to do to make malloc functioning in emulator?

 

    Please any one can tell me about above problem.

thanks and regards

sureshkumar c.v

 

  • Are you sure that in the BIOS tcf you have declared a heap?

  • When we try to modify the bios.cmd file, it throws an error : " Cannot delete existing file"

    So we have provided another bios.cmd file which is a copy of the original updated with a heap memory.

    Even then it did not work properly.

    Should we make any changes for the DSP BIOS settings to automatically generate the heap ??

     

    Few queries:

    1. When running a sample code with printf / scanf with BIOS config, the functions do not seem to work on the emulator. Even the functions memset, malloc do not seem to work. Any suggestions if we are missing something?

    2. We have a project working fine in normal CCS configuration( has callocs/ mallocs / memset / file operations). If we need to run the same project for BIOS configuration, what are the necessary steps/ changes to be made, so that it would work fine in BIOS Config?

    Regards,

    Suresh

  • sureshkumar said:

    When we try to modify the bios.cmd file, it throws an error : " Cannot delete existing file"

    You should not modify the bios.cmd file.  It is a generated file.  You should instead change the corresponding setting in your tcf file.  Double-check file permissions to make sure the file can be overwritten and check time stamps to verify it is happening as expected.

    sureshkumar said:

    So we have provided another bios.cmd file which is a copy of the original updated with a heap memory.

    Even then it did not work properly.

    Should we make any changes for the DSP BIOS settings to automatically generate the heap ??

    Please change the heap according to instructions that I just posted in response to your other thread:

    http://community.ti.com/forums/p/2534/9709.aspx#9709

    sureshkumar said:

    Few queries:

    1. When running a sample code with printf / scanf with BIOS config, the functions do not seem to work on the emulator. Even the functions memset, malloc do not seem to work. Any suggestions if we are missing something?

    When you do a printf make sure it ends with "\n" because otherwise the cio section will not be flushed to the output.

    sureshkumar said:

    2. We have a project working fine in normal CCS configuration( has callocs/ mallocs / memset / file operations). If we need to run the same project for BIOS configuration, what are the necessary steps/ changes to be made, so that it would work fine in BIOS Config?

    The steps in the other post should help you there.

  • Thank you very much Brad Griffis for your reply.

     

  • Hi all

        Thank you for your  great support to dsp/bios programming ,today i worte a sample program and executed in simulator using bios.

    I wanted to learn more things practically so please tell me the  some of the other resources (presently  studying spru423f.pdf and spru403o.pdf)   . i wanted to run my h.264 decoder project in dsp/bios configuration(implimented in rts platform) .its a challenging task for me.

    1 some of my collegues are saying that memset() and memcopy() functions are present in decoder project how you will impliment in bios?(MEM_alloc,MEM_calloc,Mem_valloc are working)

    2 I  wanted to show dsp/bios configuratin is better than normal config .please can any one suggest any sample progarm ,i want to prove performence and throughput.

    thanks and regards

    sureshkumar c.v

  • sureshkumar said:

    1 some of my collegues are saying that memset() and memcopy() functions are present in decoder project how you will impliment in bios?(MEM_alloc,MEM_calloc,Mem_valloc are working)

    Those functions are part of the standard C library.  The linker command file generated by BIOS will link that library so you don't need to worry about it.

    sureshkumar said:

    2 I  wanted to show dsp/bios configuratin is better than normal config .please can any one suggest any sample progarm ,i want to prove performence and throughput.

    I'm not sure what you mean by "normal config".  If you want to use DSP/BIOS then you need to have a configuration file.  If you're using a codec then you probably need BIOS.  My guess is that there is no decision to be made - you need BIOS and you need the configuration file.

     

  • Thank you Brad Griffis

     1 Now i am working in bios and it works fine. but when i change L2 cache size to 32/64 kb in grafical mode the follwing warning is showing

    js: "./BIOS_relese.tcf", line 13: MEM segment CACHE_L2: overlaps with another segment or cache configuration.

    MEM segment IRAM: overlaps with another segment or cache configuration.

     

     

    Correct any script errors in D:/suresh_docs/H.264/Bios/H264_relese/BIOS_relese.tcf

    using the Configuration Tool or a text editor, if necessary.

     

     

    TConf initialization arguments:

    -e environment['config.importPath']='C:/CCStudio_v3.3/bios_5_33_03/packages;C:/CCStudio_v3.3/bios_5_33_03/packages;' -e environment['config.scriptName']='3D12.tcf'

    to eliminate this(particularly) which segment is to be moved to DDR2.

    2. today i downloaded the rtdx_2_11.tar.gz how to install or how to setup the rtdx lib?.there is no setup file in that folder.

    3 Currently i am running my decoder project in bios config through an rtslib(mallocs and callocs are working fine). is there any improvement if i use MEM_alloc /MEM_calloc in our project.

    4 File operations are really affecting the performence in emulator?

       Thanks & regards

        sureshkumar

  • Suresh,

    I'm glad to hear that your problems are being resolved.  Please help the community by starting a new thread for each new topic.  These huge threads with many separate issues are difficult for other people to search and find answers to similar issues.

    Thanks,
    Brad

  • Hi Brad:

    I am having similar problem running H.264 encoder with DSP/BIOS. You have posted the solution in the other thread http://community.ti.com/forums/p/2534/9709.aspx#9709 but the link is broken now. I can't find it. Could you please post it again? Thanks.

     

    Taiwu

  • Taiwu,

    When the forum was upgraded a few months ago these old links were all broken.  Unfortunately I also do not know what it pointed to!  I think it pointed to the 4th post in this thread but I'm not positive.  It was around the right time.

    This thread was quite a hodge podge of issues.  What exactly is the problem you're having?  If it's related to dynamically creating objects I recently wrote the following wiki page:

    http://wiki.davincidsp.com/index.php/Creating_Dynamic_Objects_and_Threads_in_BIOS

    Please start a new thread if this does not answer your issue.  These mega-threads are not very useful.

    Brad