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.

Default memory allocation of TMS320C6748

Other Parts Discussed in Thread: OMAPL138

Hello, I am using the TMS320C6748LCDK for my application. I need to store an image and hence need more memory. I am using a sample code to read the data from the cameras buffer. When I try to run the code with the amount of required memory it says unable to access memory location. Is the default memory allocation less than the complete allocation? How can I change the allocation?

  • Hi Abdulhussain,

    In which section you are trying to store your image. Heap/stack.?

    If you are using malloc/calloc, allocate memory in the heap. Therefore you must be sure that,

    --> The linker is allocating the proper heap size by either specifying it in the linker command file (by setting the option -heap <desired_size>) or set the heap size in the Project Options.

    Just as a reference, check section 5.4.5 of the C6000 Compiler User's Guide

    Hope this helps.

    Also Attach the screenshot of the error log.
  • Hello first of all thank you for your answer. I am actually using a simple 2-D array. I have modified a sample code for my application and most allocation in the Linker File is to DDR2. Is there some specific memory whose allocation you want? I can share the linker file here if required too. I will also go through the User Guide as you advised.

  • Hi Abdulhussain,

    It looks like your Application is trying to access a program address which is probably reserved or doesn't exist for your target.
    Check the address range used by your program.

    Can you share more details on the code? The best way would be to zip and attach the project to this thread, but in case this is not possible due to proprietary information, you can post a detailed description code so we can see what steps are being taken in your code.
  • I am also using UART in my application. Hence the PSCModuleControl function is called in its initialization. The error shown is it couldn't find the file psc.c. even after providing its path it does not work. I'll upload the code too

  • Did you fix the aforementioned problem (memory access) ?

    Are you using the following "drivers" location for "library" path?

    C:\ti\OMAPL138_StarterWare_1_10_04_01\binary\c674x\cgt_ccs\omapl138\drivers\Debug\drivers.lib
  • Hi Abdulhussain,

    Is above mentioned issue (unable to access memory location) is resolved ?
    If yes, then please share the steps/procedure you followed to get success , It may help other fellow engineers to resolve same issue.

    Which example code you are trying for UART Application?
    Also share the screenshot of the error log.

  • I am using the C6748LDCK libraries. Also I seemed to have caused a confusion by not expressing my problem correctly. Initially when I used a 2D array of size 640x480 it was unable to find the psc.c file. I added this file to my project. After this it is stuck in the PSCModuleControl when the array is of that size (the part where it is checked whether the operation was successful). When I decrease the array size it works fine. Hence I thought there is some problem related to memory allocation. I apologize for the confusion. Could you please help me debug this problem.
  • Hi Abdul,

    In CCS, by default memory allocated for stack and heap is 2K each. If your array size goes beyond stack size, then you will find difficulties.
    But you can change default stack size and heap size,
    go to properties- >C6000 linker -> Basic Options.