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.

Memory Heap issue in C6713

Hi everybody

With other classmates, we are developing a school project in a C6713 DSK board. We generate sine waves at different frequencies in our C code and then send them to the AIC23 codec of the DSK to reproduce them.

Right now we are generating sinewaves of 3 seconds with a sampling rate of 8KHz, which produces an array of 24000 elements.

I have tested my c code on my pc and it works fine: It produces the sinewave's points in my array and all 24000 positions are filled with their respective value.

But when I compile and run this code in Code Composer Studio (v3.3) and download it to the DSK I get a warning telling me that I am trying to write in a memory position which I am not allowed or something like that. And in the watch window, where I am looking at my array, I get a similar warning in the boxes of the values where the memory is not enough (or some similar error).

I have been searching on forums and learned that this is due to the heap size that I assign to my project. I have just began to learn how to program the DSP and have no idea what do I have to do in order to solve this issue. I always do the following for my projects:

Create a new DSP/BIOS .tcf file, in the Memory tab I chose the IRAM properties and check the box "create heap in this memory" and then in the MEM properties I chose to create DSP/BIOS objects and malloc() (and other stuff) in the IRAM. Then I save the DSP/BIOS config file and forget about it.

Trying to solve the problem I just moved randomly the numbers assigned to heap in the IRAM properties window of the DSP/BIOS configuration file. But I can't solve the problem. Also I have read that I must reassign the memory map or assign the heap size in the linker options of the compiler.

So I have no idea what do I have to do. I would be very thankful to someone who could send me a link/explain me how this heap memory stuff works on the DSK. If it is too complicated to explain I would just like to know how can I make my c code work in the DSK.

I just want to be able to save my generated sine's values into my 24000 element array. Please consider that I am a university student that is just beginning to learn how to work with ccs, the dsk and all the digital signal processing world. Also I have no idea where to search for information that can help me with my problem that is why I am asking for your kind help in this forum.

 

Thank you very much for your attention.

 

Jorge Cifuentes

 

 

  • Hi!

    My 24000-element array was of type double. I changed it to float and now everything works fine.

    I would just like to ask for someone to please provide me a link  or tell me in in which TI document can I learn about the memory, heap size and that stuff on the C6713.

     

    Thanks!

     

    Jorge Cifuentes

  • My program worked fine until I added a second 24000-element of type float

    I get this message in CCS:

    Loader: One or more sections of your program falls into  a memory region that is not writable. These regions  will not actually be written to the target. Check your linker configuration and/or memory map.

    And as I said before... I have no idea how to deal with this. Any help will be very appreciated.

     

    Thank you,

     

    Jorge Cifuentes

     

  • Jorge,

    You'll need to reconcile the memory available on C6713 (described in datasheet SPRS294B) with the BIOS Memory Configuration (described in user guide SPRU303B).  If you need additional help with how to do this in BIOS, please post your question to the Embedded Software -> BIOS forum.

    -Tommy

  • Thank you very much Tommy!!!

    Have a nice day :-)

     

    Jorge Cifuentes