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.

unused printf in map file taking up flash space

We are using a 2808 processor with CC3.3 and DSPBios 5.33.2.  We are running out of flash space. 

I noticed a prntf in our map file that is taking 800+ word of space:

.printf    0    0000bba0    0000037d     
0000bba0 0000037d BMScfg.obj (.printf)

Our application is not using any printfs. So I conclude it must be something that dspBios is using.

Our TCF file is disabling unneeded OS capability as shown below
bios.GBL.ENABLEALLTRC = 0;
bios.disableMemoryHeaps(prog);
bios.disableRealTimeAnalysis(prog)
bios.disableRtdx(prog);

Is there a way to selectively configure DSPBios to remove the printf?

  • ANIL PARYANI said:
    .printf 0 0000bba0 0000037d
    0000bba0 0000037d BMScfg.obj (.printf)

    I just opened a map file from a c6000 device (BIOS 5.41) and see an entry like this:

    .printf    0    10808069    00000059     COPY SECTION
                      10808069    00000059     bioscfg.obj (.printf)

    In order for CCS to be able to render your string it needs to have the string stored in the out file.  Though generally it is marked as "COPY SECTION".  This might just be a slight difference in the code generation tools though.  In other words, perhaps it actually is a copy section, but the map file doesn't show it.  Can you attach your out file to a post for me to examine it with some other tools?  I'd like to see if the out file itself contains the flag marking that printf section as "COPY SECTION".

    You might also look at updating your compiler and/or BIOS version.  I did a quick test on CCS 4 and see "COPY SECTION" in the printf section for an F28335 project.  So I'm pretty sure it's just a matter of updating BIOS.

  • Brad,

    I have to check if I can send you our outfile as it has confidential information.  However here is an excerpt some excerpts:

    SECTION ALLOCATION MAP

    output attributes/
    section page origin length input sections
    -------- ---- ---------- ---------- ----------------
    .vers 0 00000000 00000038 COPY SECTION
    00000000 00000038 BMScfg.obj (.vers)

    Questions:
    1. Are you saying new BIOS has better optimization of space or is there a bug that has been fixed?
    2. I am not sure what you mean by "render your string." We aren't using any strings. We are using memcpy so string.h is included in places.
  • Look under Instrumentation -> LOG.  Is there something in there besides LOG_system?  Are you calling LOG_printf somewhere?  I believe that .printf section contains the records for LOG_printf.

  • We are not using LOG_printf.

    There is nothing else under LOG_system.  However STS - Statistics is one the same level as LOG - Event Log Manager.

     

     

  • From another senior firmware team member:

    "

    I think the copy section may not take 

    up space on the target, it could be in 

    the .out file so the tools can see the 

    strings that "would" have been stored 

    there -- when running the debbuger.

     

    If so then there really is no space to be 

    gained there.   

    "

    Could this be true?

  • Yes, that's exactly what I'm trying to tell you.  The .vers section you showed was clearly marked as "COPY SECTION" which means it will not take up any space on the target, i.e. it only appears in the out file but doesn't get loaded.  The .printf section however, did not show "COPY SECTION".  When I create an F28x project the .printf section is marked "COPY SECTION" so I believe if for some reason it is not a copy section then perhaps you simply need to update to a newer version of BIOS...