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.

how I can use RAM L0 and L1

Other Parts Discussed in Thread: TMS320F2808

hi all , i have TMS320F2808 and i use CCS3.3,  when i try to build my program i find this message,

''"placement fails for object ".text", size 0x10b6 (page 0). Available ranges:

PRAMH0 size: 0x1000 unused: 0x1000 max hole: 0x1000"" 

i know that memory allocated for my program is not enough for that i though to use L0 and L1 but these memories are secure zones so should i disable the CSM before use L0 and L1 or there is no problem.

notice: i don't want to use the flash memory because i feel that hard a little bit for me and need many requirement and i think using L0 and L1 is more simple and provide my project needs.

i wait your answer and thank you . 

  • If you go to http://www.ti.com/tool/sprc191 and download the header files, you will find a directory called C:\tidcs\c28\DSP280x\v170\DSP280x_common\cmd - it has a linker command file that uses RAM called 2808_RAM_lnk.cmd in it you will find a line that defines L0 RAM as program space: RAML0:  origin = 0x008000, length = 0x001000.

    If you change the length from 0x1000 to 0x2000, then you will have your larger memory size. (and you will use both L0 & L1) If you want to be totally correct...you may want to rename RAML0 to reflect that it is using both L0 and L1, but it is not necessary. You will also need to change the section for .text to point at RAML0 instead of PRAMH0.

    Hopefully this helps!

     

  • thank you very much for your help , my question is : should i disable the secure module  before use L0 and L1 or it doesn't matter ? 

    because as i know L0 and L1 are protected by the CSM. 

  • Amed,

    it depends on your application, if you enable CSM and L0/L1 are secure, then code running from unsecure memories will not be able to access data in these secure memories. However code running from secure memories can access data in other secure memories and code runing from unsecure memories can do a function call to functions/routines in secure memories.

    You should be aware of above when working with any memory that can be secured on 28x device.

     

    Best Regards

    Santosh

  • thank you santosh for informations,  my application doesn't need any security so as i don't want to use the CSM i must disable it before use L0 and L1. this is right ? 

  • yes, by default the passswords are not programmed. So CSM is disabled, but if you program the passwords then CSM will be enabled automatically. So the ansswer is you should not program the password.

     

    Best Regards

    Santosh

  • thank you veru much , just i saw in some example when the user uses flash memory and L0, L1 so it must disable the CSM using the code asm "" DSP280x_CSMPasswords.asm" and puts 0xFF as password to disable the CSM because it doesn't need security , so i thought this step is required always when we use any secure memory. 

  • Just a few notes:

    1) To clarity what Todd meant, you could rename RAML0 to RAML0L1.
    2) Make sure you remove any definitions for L1 RAM, since it is now being included in a larger block which combines L0+L1.  If you leave any definitions for RAM L1, it will cause an error.

  • thank you veru much all 

  • hi , i make this chage in my CMD file. 

    Memory {

    Page0 : 

    BEGIN  : origin = 0x000000, length = 0x000002
    RAMM0  : origin = 0x000002, length = 0x0003FE
    RAML0L1 : origin = 0x008000, length = 0x002000
    PRAMH0 : origin = 0x3FA000, length = 0x001000     ( i delete this line)
    RESET : origin = 0x3FFFC0, length = 0x000002
    BOOTROM : origin = 0x3FF000, length = 0x000FC0

    PAGE 1 :

    /* For this example, H0 is split between PAGE 0 and PAGE 1 */
    BOOT_RSVD : origin = 0x000400, length = 0x000080 /* Part of M1, BOOT rom will use this for stack */
    RAMM1 : origin = 0x000480, length = 0x000380 /* on-chip RAM block M1 */
    RAMH0 : origin = 0x3FA000, length = 0x002000    ( i change the length to 2000) 
    }

    SECTIONS
    {
    /* Setup for "boot to SARAM" mode:
    The codestart section (found in DSP28_CodeStartBranch.asm)
    re-directs execution to the start of user code. */
    codestart : > BEGIN, PAGE = 0
    ramfuncs : > RAMM0 PAGE = 0
    .text : > RAML0L1, PAGE = 0
    .cinit : > RAMM0, PAGE = 0
    .pinit : > RAMM0, PAGE = 0
    .switch : > RAMM0, PAGE = 0
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    .stack : > RAMM1, PAGE = 1
    .ebss : >  RAMH0, PAGE = 1
    .econst : > RAMH0, PAGE = 1
    .esysmem : > RAMM1, PAGE = 1

    IQmath : > RAML0L1, PAGE = 0
    IQmathTables : > BOOTROM, type = NOLOAD, PAGE = 0


    }

    did i make any error ?

  • Does the linker throw an error when you try to link with this, if it doesn;t then you should be good. I don't see any visible problem with the cmd text you gave.

    Best Regards

    Santosh

  • it doesn't give any error , it's ok and thank you very much