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.

Using Printf in CCSv 4.2.4 vs Code Composer CCSv5.50

Other Parts Discussed in Thread: TMS320C5535

First of all I like to thank Ki soo Lee and the guys in the C/C++ forum for all there efforts in helping me get off the ground using my 5535ezdsp emulator board. I like to tell the community that I am a student at wpi in boston and I'm uisng an older computer running Vista on a Dell Vostro 2510 with 4G ram  2.0 Dual Core processor 2.0 GHz  32 bit operating system which meets the requirement for both CCS4 and CCS5.Before I like to begin by saying that both CCS4 and CCS5 are running on my system.   Now I run both examples of blink led and hello world on ccs4 and I get no problems with the builder linker or debugger and i can run it to my xds100 emulator with the dsp 5535 blink the leds and allowed to prinf hello world with out a memory problem.  Here is the problem  while i was trying to port the Led program over to CCSv5 I start to get memory and library issues( IFyou like you can read it in my threads on blinking the lights for ez5535dsp)  So to determing if it was a system issue my pc  I set up a simple  Printf ("hello world\n "); on CCSv5  When I build the project the linker complains that I am using to much memory for my simple printf function but when i use a put function the problem goes away.  in addition i set up a hello world project in CCSv5 using the DSP6067 processor and I got no error when I built the project.(Please try it your self)  I have sent this example over to the folks on C/C++ forum and they are telling me  that my PC is simply running out of memory.  Simply how could this be if it runs with no problem in CCS4 but when you try to build in CCSv5 you get the memory error on the printf function but not using a put function.  We have to understand that this is the most simple program you can write in C and Do we really need to ask this question is there something wrong when you set up a simple hello world  dsp5535 project that the builder and linker are off somethings wrong guys it should not be this difficult all i want to do is verify my platform works on CCS5 so I can be supported and start development on my project here at school. Your efforts in responding to this post is greatly appreciated.

Regards,

JEFF

  • It is not your PC running out of memory, it is the C5535 eZdsp. This board contains a TMS320C5535, which has 64KB DARAM and 256KB SARAM on-chip, which is more than enough for a "hello, world" program.  Your post at http://e2e.ti.com/support/development_tools/compiler/f/343/t/298792.aspx shows an error message that indicates your linker command file is restricting the program code (.text) to DARAM1, which is defined to be of size 0x2000.  This is much smaller than actual DARAM.  I asked you to produce and post the linker map file so that I could see the memory areas defined by your linker command file so that I could advise how to adjust it.  Please produce and post the linker map file to that thread.

    I do not know what has changed for C5500 between CCS4 and CCS5 to have changed your linker command file.  That is a question you should probably ask on the CCS forum, but they will also want to see either the linker command file or the linker map file.

    Yes, we should strive to make projects seamlessly portable from older CCS versions, and to make building the simplest of programs simpler.

  • 6266.Hello_C5535_2.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ******************************************************************************
    TMS320C55x Linker PC v4.4.1
    ******************************************************************************
    >> Linked Sun Oct 27 17:16:51 2013
    OUTPUT FILE NAME: <Hello_C5535_2.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 00003f3b
    MEMORY CONFIGURATION
    name origin length used unused attr fill
    (bytes) (bytes) (bytes) (bytes)
    ---------------------- -------- --------- -------- -------- ---- --------
    MMR 00000000 000000c0 00000000 000000c0 RWIX
    DARAM0 000000c0 00001f40 000009c0 00001580 RWIX
    DARAM1 00002000 00002000 00000000 00002000 RWIX
    DARAM2 00004000 00002000 00000000 00002000 RWIX
    DARAM3 00006000 00002000 00000000 00002000 RWIX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Thank you Archaeologist for the clarification.  I think I found the map file for the hello world program let me know if i need to do something different in the build settings to generate a proper map file.  thanks in advance  Jeff P.S can you let me know what the next step is

  • Your linker map file shows tons of unused DARAM and SARAM sliced up into smaller sections.  Go into your linker command file and find the line which allocates .text.  Change it to use the split operator (">>") to distribute your .text section among multiple DARAM sections, like so:

    .text >> DARAM0 | DARAM1 | DARAM2 | DARAM3 | DARAM4 | DARAM5 | DARAM6 | DARAM7

    From the linker command file, I can see that you are using large model, which is good.

  • 6102.Hello_C5535_2_2PASS.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ******************************************************************************
    TMS320C55x Linker PC v4.4.1
    ******************************************************************************
    >> Linked Mon Oct 28 16:46:21 2013
    OUTPUT FILE NAME: <Hello_C5535_2.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 00003f3b
    MEMORY CONFIGURATION
    name origin length used unused attr fill
    (bytes) (bytes) (bytes) (bytes)
    ---------------------- -------- --------- -------- -------- ---- --------
    MMR 00000000 000000c0 00000000 000000c0 RWIX
    DARAM0 000000c0 00001f40 000009c0 00001580 RWIX
    DARAM1 00002000 00002000 00000000 00002000 RWIX
    DARAM2 00004000 00002000 00000000 00002000 RWIX
    DARAM3 00006000 00002000 00000000 00002000 RWIX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Archaeologist,

    I found the .text section of the map file in the project but its did not work.  When you said the linker command file you meant the map file of the project.  I added the .text >>  DARAM0 .... |..... but I get the following message when I went back to the map file there was only .text there and the other parts were not there like they were over written  Any ideas  Thanks in advance.

    JEFF

     

    **** Build of configuration Debug for project Hello_C5535_2 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all

    'Building file: ../hello.c'

    'Invoking: C5500 Compiler'

    "C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5515 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --define=c5535 --display_error_number --diag_warning=225 --ptrdiff_size=16 --preproc_with_compile --preproc_dependency="hello.pp"  "../hello.c"

    'Finished building: ../hello.c'

    ' '

    'Building target: Hello_C5535_2.out'

    'Invoking: C5500 Linker'

    "C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5515 --memory_model=large -g --define=c5535 --display_error_number --diag_warning=225 --ptrdiff_size=16 -z -m"Hello_C5535_2.map" --stack_size=0x200 --heap_size=0x400 -i"C:/ti/ccsv5/tools/compiler/c5500_4.4.1/lib" -i"C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --reread_libs --display_error_number --warn_sections --xml_link_info="Hello_C5535_2_linkInfo.xml" --mapfile_contents=--mapfile_contents=sections,nosymbols --rom_model --sys_stacksize=0x200 -o "Hello_C5535_2.out"  "./hello.obj" "../C5535.cmd" -l"libc.a"

    <Linking>

    "../C5535.cmd", line 69: error #10099-D: program will not fit into available

       memory.  placement with alignment/blocking fails for section ".text" size

       0x4071 page 0.  Available memory ranges:

       DARAM1       size: 0x2000       unused: 0x2000       max hole: 0x2000   

    warning #10260-D: unrecognized --mapfile_contents attribute:

       --mapfile_contents=sections

    warning #10260-D: unrecognized --mapfile_contents attribute:  symbols

    error #10010: errors encountered during linking; "Hello_C5535_2.out" not built

    >> Compilation failure

    gmake: *** [Hello_C5535_2.out] Error 1

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Edit C5535.cmd and make the .text line look something like this ...

     .text          >>  DARAM0 | DARAM1 | DARAM2 | DARAM3

    Thanks and regards,

    -George

  • George,

     

    It work for all my printf function.  thank you and archoligist for your help....  Just one question. When writing a program with printf function will i need to edit the cmd file all the time like you suggested so that i can print to the console and what other variable should i be concerned about when writing simple to medium c programs.  thanks in advance

     Regards,

    JEFF