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 map prevented reading of target ccsv4

I have a problem when I'm debugging in code composer v4.2.2 with the dsp dm6437 i can not see what is located in memory in the local window. the message is "Memory map prevented reading of target". I read that is solved with the gel file but do not  know what need to modify to let me see what is located in memory.

one aditional question (nothing to do with the other subject)  where i can get the linker cmd for ther device tms320dm6467t?

thanks for help

  • David,

    GEL files setup the memory map for the debugger, i.e. tell the debugger what memory is present and if it is readable/writable...

    When you are connected to the debugger go to the Tools menu and select GEL Files.  This will list any GEL files that are loaded.  Probably only one.

    Double click on it to open in the editor.  The GEL_MapAdd() or GEL_MapAddStr() statements are the ones that setup the memory map.

     

    As far as a linker command file for DM6467 you could try the device forum.

     

    John

  • thank you for reply John

    you confirm the information I had found, now my question is what i need modify to allow me to see the memory map?

    best regards

    David

  • You can see the memory map that is set by going to Tools -> Memory Map.  However to edit the memory map you have to edit the GEL file as it controls what the debugger thinks is valid.  Similar to how the .cmd file tells the linker where it can put code.

    I am not sure which GEL file is getting loaded for you but there are some in \ccsv4\emulation\boards\evmdm6467\gel

     

    If you want the debugger to think that all memory is accessible you can just remove the call to Setup_Memory_Map() in the StartUp() function in the GEL file.  Without that the debugger will think it can access all memory.  You could do that just to check if code can actually be loaded to the address you think it can.  Realistically I think your memory map for the debugger is probably fine and you just need to track down a linker command file.

    John

     

  • thanks Jhon

    i did the last you said and the message it changed, now says "memory is not present" any idea? I can see different things according to what you said. those pictures show the difference:

    with Setup_Memory_Map()

    without Setup_Memory_Map()

    regards

    david 

  • David,

    Is this the DSP on DM6467?  If so there is no memory at 0x00000000

    You can take a look at the datasheet to see where the memory is, the GEL file will also tell you:

    Change your linker command file to put the code and data into valid memory.  The DSP RAM and DDR2 are listed below (cut from the GEL file).  The first address is the start address, the second address is the length.

     

        /* DSP RAM */

        GEL_MapAddStr( 0x00818000, 0, 0x00020000, "R|W|AS4", 0 );   // DSP L2 RAM/Cache

        GEL_MapAddStr( 0x00e00000, 0, 0x00008000, "R|W|AS4", 0 );   // DSP L1P Cache/RAM

        GEL_MapAddStr( 0x00f00000, 0, 0x00008000, "R|W|AS4", 0 );   // DSP L1D Cache/RAM

        GEL_MapAddStr( 0x11818000, 0, 0x00020000, "R|W|AS4", 0 );   // DSP L2 RAM/Cache

        GEL_MapAddStr( 0x11e00000, 0, 0x00008000, "R|W|AS4", 0 );   // DSP L1P Cache/RAM

        GEL_MapAddStr( 0x11f00000, 0, 0x00008000, "R|W|AS4", 0 );   // DSP L1D Cache/RAM

     

        /* DDR2 */

        GEL_MapAddStr( 0x20000000, 0, 0x000000f4, "R|W|AS4", 0 );   // DDR2 Control

        GEL_MapAddStr( 0x80000000, 0, 0x40000000, "R|W|AS4", 0 );   // DDR2 SDRAM

     

     

    Regards,

    John

  • There are some sample linker command files here: http://processors.wiki.ti.com/index.php/Linker_CMD_Files_for_CCS

    There is one for DM6467 there.

     

    John

  • thank you for reply  Jhon

    this information is great and i really needed it, but the dsp that i work is the dm6437. i think is not the same address that you put up there.

    best regards

    david

  • For DM6437 the SDRAM starts at 0x80000000

     

     

    MEMORY {

     

       CACHE_L1P   : origin = 0x10e08000,  len = 0x8000

       CACHE_L1D   : origin = 0x10f10000,  len = 0x8000

       DDR2        : origin = 0x80000000,  len = 0x8000000

       SRAM        : origin = 0x42000000,  len = 0x200000

       L1DSRAM     : origin = 0x10f04000,  len = 0xc000

       IRAM        : origin = 0x10800000,  len = 0x20000

    }

     

     

     

     

     

     

    SECTIONS {

     

            .bss:     {} > IRAM

            .stack:     {} > IRAM

            .const:     {} > IRAM

            .far:     {} > IRAM

            .sysdata: {} > IRAM

            .cio:     {} > IRAM

            .data:    {} > IRAM

            .pinit:   {} > IRAM

            .sysmem:     {} > IRAM

            .text:    {} > IRAM

            .cinit:    {} > IRAM

    }

  • Jhon, 

    now i know where is the memory map and address also, how can i tell it that allow me see the memory map?

    thank you for your time

    david

  • My last post contained the necessary content for a linker command file.  Add a .cmd file to your project with that content.  It will define the memory layout for the linker.  You can look at the .map file in your \Debug directory to see the resulting map.

    GEL files define the memory map for the debugger.  As per my earlier post you can view what has been defined by going to Tools -> Memory map, after you have launched the debugger.

     

    Your issue was you had no linker command file so your code and data was not being placed in valid memory.  You likely were getting data verification errors when loading your program.  That should not be a problem anymore.

     

    John

  • Jhon 

    but the problem is that the linker for dm6437 is not in that page. where i can find it?

    regards

    david

  • David,

    Please go back a few posts.  I pasted the content for a DM6437 into the message.

     

    John

  • Jhon 

    bot is for dm6467, i need the linker for dm6437

    regards

    David

  • Dadiv,

    I replied today to another customer about DM6437 device and board support files (including a linker CMD). Check:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/102608/500625.aspx#500625

    Hope this helps,

    Rafael

  • thaks for reply Rafael

    I will take a look

    regards 

    David

  • David,

    In one post I sent you a link which had a file for dm6467 but after you said you were using dm6437 I replied with another post that contain the text to paste into a file for dm6437.

     

    John

  • 7180.dm6437.zip

     

    Attached is the file.  It is inside the zip.

  • thank you for all your answer

    the problem persist, i need read all the information that you gave me and try to solve the problem

    thanks for your time

    David

  • Did you add the linker command file from the zip I attached to your project?

  • yes i did, is not related to boot mode?

  •  If you have questions on boot mode please post to the device forum.

    As far as this linker command file, it should set things up so your code is being located in valid memory.  You should be able to open the memory view and view any valid memory address.  

     

     

  • ok  thank you for reply

    david

  • I had similar issue with CCS v5.5 with EVM DM6437. I have used the default settings of Hello world project. On debugging, I was seeing "Memory map prevented" errors and could not see assembly as well as local variable values. It looks like the default setting chosen by CCS 5.5 for DM6437 is incorrect. I had to put all fields under SECTIONS under DDR2 instead L2RAM.

    Hope this helps others and TI corrects the default project creation using CCS for various platforms.

    ~Amit

     

  • I'm working with CCSv6 and the Beaglebone Black (AM335x).  I encountered this same problem while trying to debug the SDK7 kernel.  The key to my solution was your comment, "If you want the debugger to think that all memory is accessible, you can just remove the call to Setup_Memory_Map()..."  The stock gel file for the Beaglebone Black in CCSv6 did not have this particular function, but when I commented out the lines that added entries to the map and turned it on (GEL_MapAddStr and GEL_MapOn), my problems went away.  Thank you!