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.

CCS 3.3 and Blackhawk 510L => Error adding memory map range: End address is beyond target memory length



Hi,

I currently try to install the Code Composer 3.3 with a Blackhawk 510L JTAG Emulator. My problem know is, that I can't connect to the target. The CCS Setup is done, the Status LED of the Emulator is green, but I get the error message:

Blackhawk USB510L - C5409A Emulator/TMS320C5400_0

! Error adding memory map range: End address is beyond target memory length

Do anybody have an idea what the problem is ?

Thanks

Kay

  • Hi Kay,

    Make sure your start up GEL file is correct. Your startup GEL file is probably setting up the debugger memory map and one of the ranges specified by GEL_MapAdd() or GEL_MapAddStr() is invalid.

    Thanks

    ki

  • Hi,

     

    Ki-Soo Lee, thank you for your answer. I checked the gel file. It's the original version from TI. But I think I'm a step forward. I got a tip, to remove the gel file from the setup. Now I get a verification error with an address. It seem's to have something to do with const values in the external memory (RAM). If I turn this section to integer it works. But now I have the next problem at a const value in program memory. 

     

    The code is running in the simulator and in real live, but the emulator can't handle it? Do I have to configure or declare const values in a special way? 

     

    BR

     

    Kay

  • Kay,

    Kay von Ludowig said:

    ! Error adding memory map range: End address is beyond target memory length

    I believe this message is coming at start up because of the GEL_MapAdd command in the GEL file for extended memory mapping. If you ignore this message and let CCS come up, are you able to connect to the target? The OnTargetConnect() function which gets executed when you connect to target should set up the target for extended memory usage, and then this memory range should become usable.

     

  • Hi AartiG,

     

    yes this message ( ERROR adding memory map range: End address is beqond target memory length ) is coming at startup. 

     

    If I remove the GEL file form CCS Setup, the CCS comes up without this message. I can connect to target and see the disassembly window. But when I load the programm there is trouble with a constants section. I get an verification error direct at this address. I tried to move this section to another address, with the result of a verification error at the other address. Next try was to convert this constants to integer and this worked. But the load process stopped at the next constant in the external program section. 

     

    Therfore I think the problem is relatet to constants in external memory.

     

    Here the MapAdd commands from the GEL file. The verification error was e.g. at 0x9B00. Our Firmware uses the external memory from 0x8000-0xBFFF. (Target is 5409A)

     

    StartUp()

    {   

     

          /* 0x0080 - 0x7fff => on-chip DARAM0-3 */

          GEL_MapAdd(0x80u,0,0x7F80u,1,1);

     

          /* 0x8000 - 0xff7f => external */

          GEL_MapAdd(0x8000u,0,0x7f80u,1,1);

     

          /* 0xff80 - 0xffff => interrupts (external) */

          GEL_MapAdd(0xff80u,0,0x80u,1,1);

     

          /* 0x018000 - 0x01ffff => extended page 1*/

          GEL_MapAdd(0x18000u,0,0x8000u,1,1);

     

          /* DATA MEMORY */

     

          /* 0x0000 - 0x005f => memory mapped registers */ 

          GEL_MapAdd(0x0000u,1,0x60u,1,1); 

     

          /* 0x0060 - 0x007f => scratch pad RAM */

          GEL_MapAdd(0x0060u,1,0x20u,1,1); 

     

          /* 0x0080 - 0x7fff => on-chip DARAM0-3 */

          GEL_MapAdd(0x80u,1,0x7F80u,1,1);

     

          /* 0x8000 - 0xffff => external */

          GEL_MapAdd(0x8000u,1,0x8000u,1,1);

     

     GEL_TextOut("Gel StartUp complete.\n");

    }

  • Kay von Ludowig said:
    If I remove the GEL file form CCS Setup, the CCS comes up without this message. I can connect to target and see the disassembly window. But when I load the programm there is trouble with a constants section.

    You need to keep the GEL file for proper loading and debugging of the program as it tells the debugger the memory mapping of the target device. Add the GEL file back into the configuration and ignore the message about "ERROR adding memory map range: End address is beyond target memory length" during start up. Connect to target, then open a memory window at address 0x8000 to check if the external memory region is accessible.

  • Hi AartiG,

    I put the GEL file to setup again, 

    and open CCS => Error message appears when I open CCS  => I ignore it

    CCS shows in "Messages" => GEL: Error while executing OnTargetConnect(): memory map prevented write to target memory at 0x001D@Data.

    I connect to target => Disassembly window is empty only ------ ----.... ;

    When I open the memory window it is the same. The window shows only --------- and memory modification is not possible (intern and extern memory)

     

     

  • Kay,

    Please see this forum thread: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/62020/249308.aspx#249308

    Although the device used there c5416 is not the same as what you are using, the issues seem to be similar to yours, related to extended address mapping. I still think the problem is coming from the GEL_MapAdd in the gel file for the extended memory range.

    I would suggest trying to modify the GEL file you are using to look more like the DSK5416.gel. Specifically perform only basic memory mapping in the Startup routine, then within the OnTargetConnect() routine, set up and turn on extended memory mapping. You might even be able to move everything inside OnTargetConnect and leave Startup empty (as is done in c5416.gel). However, the other forum thread notes problems with using c5416.gel but not DSK5416.gel.

    Unfortunately I don't have a C5409A target board handy to test this out, but please try making these changes to the GEL file to see if that helps.

  • Hi,

    I moved the GEL_MapAdd form Startup to OnTargetconnect(). 

    Now, when I start CCS the memory map error message is gone. But when I connect, the diassembly window is empty and do not work. When I open a Memory window and try to change memory content e.g. in scratch pad or Internal RAM I got strange behavior. I type in 0x0001 and get 0x0400 or I type 0x002 and get 0x0800

    Any Idea?

    Here the modified GEL file content:

    Was the modification correct ?

    /* The Startup() function is executed when the GEL file is loaded. */

    StartUp()

    {          

    }

    OnTargetConnect()

    {

    GEL_Reset();

    GEL_MapOn();

    GEL_MapReset();

    GEL_XMDef(0,0x1eu,1,0x8000u,0x7fu); 

    GEL_XMOn(); 

    /* DATA MEMORY */

    /* 0x0000 - 0x005f => memory mapped registers */

          GEL_MapAdd(0x0000u,1,0x60u,1,1); 

          /* 0x0060 - 0x007f => scratch pad RAM */

          GEL_MapAdd(0x0060u,1,0x20u,1,1); 

          /* 0x0080 - 0x7fff => on-chip DARAM0-3 */

          GEL_MapAdd(0x80u,1,0x7F80u,1,1);

          /* 0x8000 - 0xffff => external */

           GEL_MapAdd(0x8000u,1,0x8000u,1,1); 

    GEL_TextOut("Gel StartUp complete.\n");

    /* 0x018000 - 0x01ffff => extended page 1*/

          GEL_MapAdd(0x18000u,0,0x8000u,1,1); 

        /* PROGRAM MEMORY */      

          /* 0x0000 - 0x007f => reserved */ 

          /* 0x0080 - 0x7fff => on-chip DARAM0-3 */

          GEL_MapAdd(0x80u,0,0x7F80u,1,1);

          /* 0x8000 - 0xff7f => external */

          GEL_MapAdd(0x8000u,0,0x7f80u,1,1);

          /* 0xff80 - 0xffff => interrupts (external) */

          GEL_MapAdd(0xff80u,0,0x80u,1,1);  

    C5409A_Init(); 

    GEL_TextOut("Gel StartUp complete.\n");

    }

     

    Tomorrow I will be in vacation until 14.09. Please excuse me for the break in this task. 

  • Kay,

    I couldnt locate a C5409A board to test with, but I did test with a C5402 DSK and made some modifications to the GEL file which will hopefully work for you. I have attached a C5409A.gel file where I moved the GEL_MapAdd call for the extended memory range to within the OnTargetConnect() function instead of the StartUp() function. This will prevent the error you were seeing earlier about "end address is beyond target memory length". I also made some other minor changes.

    Please save this gel file in a user location. Then start up "Setup CCS" and in your target configuration, tell it to use this GEL file instead of the default GEL file. Hopefully this helps you move forward.

    1145.c5409A.gel

  • Hi AartiG,

    thank you for your file, I tested it and it is working.

    regarding the other problem with the access of the external memory, there was a problem with CCS setup. I configured a bypass for some DSPs, but it was not working correct. I changed it back to real DSPs and with your file it is working fine now.

    thank you

    Kay