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.

CCS4 is not printing anything on console for printf

Other Parts Discussed in Thread: OMAP-L138

Hi,

I have used multiple printf statements in my code. I am using CCS4 and it is not performing those printf on the console. It is getting really hard to debug with those.

The code is getting compiled properly. I have added string.h file for getting printf definition.

 

Regards,

Bhavin

  • The CCSv4 experts may have additional comments, but you may want to check to ensure you have enough heap/stack space, the traditional printf functions will use a good bit of dynamic memory and you can get weird operation when it runs out.

    aradiavin said:
    I have added string.h file for getting printf definition.

    Wouldn't this normally be stdio.h?

  •  

    I have the same problem. There is no output at the ccs v4.1.3 console using printf function.

    Stack and Heap sizes are large enough.

     

    The strange thing is that printf works fine in my EVMOMAPL137 but not in my C6747 custom board. In both cases I use the same code and XDS510 USB emulator.

    It really puzzles me...

     

    Gaston

     

  • Gaston said:

    I have the same problem. There is no output at the ccs v4.1.3 console using printf function.

    Stack and Heap sizes are large enough.

    The strange thing is that printf works fine in my EVMOMAPL137 but not in my C6747 custom board. In both cases I use the same code and XDS510 USB emulator.

    So in CCS 4.1.3 it works ok on the EVMOMAPL137, but not on your custom C6747 hardware?

    Are you literally loading the same executable on both boards or is it "roughly" the same software.  There are subtle differences such as ending a line with \n which can be the difference between printf working and not working.  Or forgetting to include the header file, etc.

  • Brad Griffis said:

    So in CCS 4.1.3 it works ok on the EVMOMAPL137, but not on your custom C6747 hardware?

    Are you literally loading the same executable on both boards or is it "roughly" the same software.  There are subtle differences such as ending a line with \n which can be the difference between printf working and not working.  Or forgetting to include the header file, etc.

    Yes, roughly the same software. The differences I can identify between custom and EVM hardware are:

    • Single C6747 processor instead multicore OMAPL137
    • 32Mb SDRAM instead installed EVM 64Mb
    • Xtal of 25MHz instead EVM 24MHz

    I do not use any GEL script for initialization. I configure the system settings after main entry (pinmux, pll, psc, emif) and at the moment, software execution works fine except for the printf output console.

    Regards,

    Gaston

  • I recommend creating a "hello world" project to get rid of as many variables as possible.  Put everything in internal RAM for starters.   Once that's working you can start adding your initialization code back into the project, move code to external memory, etc. 

    Now did the printf work on your custom hardware using CCS 4.1.2 but not 4.1.3?  In other words, are there two variables that affect whether printf works or not:  CCS version and hardware?

  • Hi,

    I had a similar problem with CCS5 and OMAP-L138 Experimenter. The solution was to add the end line symbol "\n" at the end of each printf() statement. Maybe it helps.

    Michal,

  • Brad and Michal, thank you for your help. I had a problem with external SDRAM in my custom C6747 hardware. Now it is fixed and printf works as good as ever.

    Gaston

  • I'm glad you got it working!  Thanks for reporting back the root cause.