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.

maximum number of elements of an array in 28035 ?

Other Parts Discussed in Thread: TMS320F28069

what is the maximum number of elements of an Uint16 array in 28035 ?

I have declared Uint16 x [1500]

it gives error when compiling - it says maximum memory is 0x400 or something like that

but in manual of 28035 it says 10K RAM ?

 

 

  • mehmet karakaya said:

    I have declared Uint16 x [1500]

    it gives error when compiling - it says maximum memory is 0x400 or something like that

    Please provide the exact error - it will help determine what the issue is.

    mehmet karakaya said:
    but in manual of 28035 it says 10K RAM ?

    Yes, 2035 has 10K or RAM.  2K of this is not contiguous with the other 8, however. 

    The memory linker command file .cmd will also tell the tools where to place various pieces of the code including the array - so perhaps the placement is into a chunk of memory too small for the placement.

    -Lori

     

     

  • "C:\\tidcs\\c28\\DSP2803x\\v121\\DSP2803x_common\\cmd\\28035_RAM_lnk.cmd", line 119: error:
       run placement fails for object ".ebss", size 0x649 (page 1).  Available
       ranges:
       RAML2        size: 0x400        unused: 0x300        max hole: 0x300 

    exact error is this - ( the application is the sci_interrupt example with small addition of code )

  • mehmet karakaya said:

    "C:\\tidcs\\c28\\DSP2803x\\v121\\DSP2803x_common\\cmd\\28035_RAM_lnk.cmd", line 119: error:
       run placement fails for object ".ebss", size 0x649 (page 1).  Available
       ranges:
       RAML2        size: 0x400        unused: 0x300        max hole: 0x300 

    exact error is this - ( the application is the sci_interrupt example with small addition of code )

    Mehmet,

    This means that in the linker command file (28035_RAM_lnk.cmd) the .ebss section is not large enough for the placement.   You can try modifying the .cmd file to allow for a larger .ebss section.  The linker command file is documented in the assembly ref guide www.ti.com/lit/spru513.

    Regards

    -Lori

     

  • thank you for the answer

    but ... , wouldnot it be good

    that the C compiler takes care of all the memory management ?

     

     

     

     

  • Mehmet,

    mehmet karakaya said:

    but ... , wouldnot it be good

    that the C compiler takes care of all the memory management ?

    For simple examples it may not matter much what memory is used.  But in embedded processing it quickly does become important.  Some things to consider when placing code/data:

    • Do you want code in RAM or does it need to be in non-volatile memory like Flash?
    • If it is a time critical ISR maybe it is loaded into flash and later copied to RAM.
    • Some RAM may be accessible by a DMA module while other RAM is not. 
    • For time critical code you may want to partition data into a separate physical RAM blocks to avoid resource conflicts - on C2000 RAM blocks are single access (SARAM).  This could become very important when trying to perform a fast FFT, for example.
    • Is a resource on external memory?
    • Some memory may have cache or prefetch to improve performance while other memory may be wait-stated and should not be used for something time critical.
    • Is it something that needs to be protected by the Code Security Module?  Not all memory is CSM protected.

    The linker command file is how you describe your device to the tools and tell it where you want different sections to go. 

    If you don't assign a particular section to a memory region then the tools will indeed try to place it in any available memory.  This may not be desired for the above reasons.  Because of this I suggest always linking with the -w flag so the tools will tell you it is assigning a section to memory without your influence.

    Regards,

    -Lori

     

     

  • good day, I have the same problem but with TMS320F28069, I would like to use several sections of RAM MCU, but by altering the file can select only an .ebss sector and this is always limited by size.

    please see the link.


    thank you very much

    I wish you a good day.

  • Martin,
    There are 2 options;
    1)Even though there are physically different SRAMs you can rename a section of memory to have as much (or little) space as you want since they are address contiguous
    2)Make use of the DATA_SECTION directive and assign arrays explicitly to certain usects that you define in the linker rather than to the ebss.



    Matt