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.

Printf not work in CCS?

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377D

Hello,

I'm using the evalboard "F2837x controlCARD v1.1" with CCS 6.1.2.00015

I used the demonstration exemple named IDDK_PM_Servo_F2837x.

I want try a printf.

To do this, I follow some tips on Ti:

- Add #include <stdio.h>

-Add in code printf("Hello word");

- In project option \Build\C2000 Compiler\Advanced Options\Library Function Assumptions\ "Level of printf... => set to "Full"

- In project Option/Debug case "Enable CIO function use" is checked

On "CCS Debug" view, I have only a console named "IDDK_PM_Servo_F2837x" not a "CIO" console:

I have forget other thing?

Thank you.

  • Hi,

    Did you get any warnings (related to cio) during building the project?

    In linker cmd file, did you allocated memory for .cio under SECTIONS?
    ".cio : > RAMGSX, PAGE = 1"

    -Aditya
  • Yes I had a warning,
    Then I add this in linker file:
    existing: RAMGS0TOGS5 : origin = 0x00C000, length = 0x006000
    added: .cio : > RAMGS0TOGS5, PAGE = 1

    But no display in my console view with that.

    I seen here:
    processors.wiki.ti.com/.../Tips_for_using_printf
    the following tips:

    SECTIONS
    {
    .text:cio : { rts*.lib<trgmsg.obj exit.obj>(.text) } > RAM
    .text:rts : { rts*.lib(.text) } > ROM
    .text > PMEM
    ...
    }

    But I don't undersand its aim??
  • Hi,

    As per your configuration it should work if your Linker file mapping is proper.

    Also you can try out TMDSIDDK_v2.0 in controlSUITE

    TI has released IDDK_PM_Servo_F2837x-v2 (2nd version) please check.

    To ensure the printf functionality, take latest version example project and modify configuration only for printf functionality and test.

    -Aditya
  • Hi,

    I tested with the example IDDK_PM_Servo_F28387x-v2,

    Bellow are the modification done to compile and test: (Same modification done when I started with v1 project)

    - In project properties \ General, part "Device" Set Variant to "TMS320F28377D" (Else error message on compile step because not know the target)

    - In project properties \ General, part "Advanced settings", set "Linker command file" to "F2837x_Headers_nonBIOS_cpu1.cmd" else default project linker generate error on link.

    - In project option \Build\C2000 Compiler\Advanced Options\Library Function Assumptions\ "Level of printf... => set to "Full"

    - In project Option/Debug case "Enable CIO function use" was already checked => No change

    - Add #include <stdio.h> on the top of IDDK_PM_Servo_F2837x.c

    -Add in code printf("Hello word"); just before idle loop for(;;) in main function.

    - In IDDK_Servo_2837x_RAM_lnk_cpu1.cmd, add:  ".cio             : > RAMGS0GS1, PAGE = 1"

    - Compile and Program (in RAM, on my v1 test, I'm in Flash) (My Test board is linked to the computer via the USB cable named "A:J1"

    - Run program, set "EnableFlag"  variable to 1 to goes until idle loop.

    - Check in Consol Window:

    No printf message appears... :-(

    - Is I'm in the good Console?

    - Must I have a specific Test board SW1 and A:SW specific position? (F2837x controlCARD v1.1)

    - Are they other steps I forgot?

    Thank for your help.

  • Hi,

    As per your above steps, everything is right for the printf functionality.

    Could you please put more number of the printf("...Init Complete"); statements? like below

    printf("...Init Complete");

    printf("...Init Complete");

    printf("...Init Complete");

    printf("...Init Complete");

    printf("...Init Complete");

    printf("...Init Complete");

    printf("...Init Complete");

    Then check. I have observed that for one printf statement, some times console will not dsiplay.

    -Aditya

  • Ok
    I try with many printf and by place a numer in the text "__ Init complet1", "Init complet2"....

    The first printf is never displayed, the following are well displayed.

    Then I don't know why the first is never displayed, but it is not blocant when we know this behavior, just add a first printf then the following will be ok..

    I retry on my first project (v1 example), then the same behavior was observed.

    Thank for your help
  • Hello
    I comeback to this post.
    I would know where we can choose on which Seral UARD controller the Stdio will work?

    In fact, I'm using currently the COntrolCard F28377x, but I will have soon a custom board. On which board, I would like change the UART port controller used when "printf" function is called.
    How doing?