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.

Is it possible to get log_printf to use DDR instead of LL2?

C6472

SYS/BIOS 6.31.4.27

CCSv4

Is it possible to get log_printf to use DDR instead of LL2?

I'd imagine it would have to use un-cacheable DDR else the log_printf would be really slow (since it has to do a cache_wb()).

And, is it possible to get the loggerbuf to use memory from our heap? The reason I ask is because we are using one image, and having a large loggerbuf created in the .cfg results in a all cores having the same size loggerbuf. Only one of our C6472 DSPs is the "controller" dsp and needs a large buffer. Consequently, I'd like to be able to set the size real time based on the core ID. Getting its memory from heap frees the heap memory for other cores that don't need a huge loggerbuf.

Cheers

Eddie

  • Hi Eddie,

    Yes, you can do this.  You use the C runtime API to create your LoggerBuf:

    LoggerBuf_create(const LoggerBuf_Params *params, Error_Block *eb)

    Calling this API at run time will allocate your LoggerBuf from the default heap, which you can set to DDR in your configuration.  For example, you might have something like this in your *cfg file (from BIOS_Legacy_App_Note.pdf section 5.3 Heaps):

    heapMemParams.size = 8192;
    heapMemParams.sectionName = "myOtherHeapSection";
    Program.global.myOtherHeap = HeapMem.create(heapMemParams);
    Program.sectMap["myOtherHeapSection"] = “DDR”;

    Eddie3909 said:
    Consequently, I'd like to be able to set the size real time based on the core ID.

    The C6472 processor has a global register called "DNUM" - this register tells you the core number that your code is currently running on.  You can access it at run time by adding the following declaration to your code:

        extern volatile cregister Uns DNUM;

    Then check the value to see which processor you are on and set your values accordingly.

    Steve

  • Below is a link to issues I had when trying to put the logger into DDR.

    http://e2e.ti.com/support/embedded/tirtos/f/355/t/339870