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/TMS320VC5510A: DSK 5510 SIMULATOR MEMORY MAP

Part Number: TMS320VC5510A

Tool/software: Code Composer Studio

I am using dsk 5510 simulator along with tms320vc5510 target board. I want to use GPIO as DIO to send data to a board. I am using following program:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "stdio.h"

#include "dsk5510.h"

#include "printacfg.h" 

#define N 10

void main()

{

int i, j;                                  

unsigned int xmt[N];

unsigned IODRV, IODV;

unsigned IODR1V, IOD1V; 

ioport unsigned *pIODR =(ioport unsigned*)0x3400;

ioport unsigned *pIOD =(ioport unsigned*)0x3401; 

for (j = 0; j <= (N - 1); j++) {

       xmt[j] = (j << 7) + (j+ 10);

   }

IODRV = *pIODR;

IODV = *pIOD;     

printf("The returned value of IODR: %x \n", IODRV);

printf("The returned value of IODV : %x \n", IODV); 

/*configuring i/o as output in direction registers*/

*pIODR = 0xffff;

IODR1V = *pIODR;

printf("The returned value of IODR1: %x \n", IODR1V); 

for (i= 0; i<= (N-1); i++)

{printf("The 10 sample values in array is: %x \n", xmt[i]);

for (i= 0; i<= 10; i++)

{

*pIOD = xmt[i];

IOD1V = *pIOD;

printf("The returned value of IOD1V(%d) : %x \n", i,IOD1V);

}

}  

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

got build with zeros errors. but while debugging show data verification error  sometimes. and sometimes  after rebuild show following message after reset:

Trouble Writing Target CPU memory: Processor communication timeout.   It is recommended to RESET EMULATOR. This will disconnect each target,   perform an emulation reset, and then reconnect each target. Power cycle the target board before continuing.

Can't Set Breakpoint: Processor communication timeout.   It is recommended to RESET EMULATOR. This will disconnect each target,   perform an emulation reset, and then reconnect each target. Power cycle the target board before continuing.

Breakpoint Manager: An error was encountered attempting to set a breakpoint used

for end of program detection.

tried to change memory map also using options--> memory map 

but hows following message

plz suggest some direction to look into. how to change memory map for the required operation?

  • Hello,

    The debugger memory map is often configured by the GEL startup file. Are you using one? If you are, there should be a file listed under the "GEL files" folder in the left panel of your CCS IDE.

    Note that these is no DSK 5510 Simulator. There is a C5510 Device Simulator which simulates the device itself. But it does not simulate the whole DSK.

    In your screenshot, it looks like you are using the C5510 DSK HW target

    Thanks

    ki

  • hello ki,

    Thanks for the explanation.

    yes,i am using C5510 DSK HW target board  and the file is listed under the "GEL files" folder which remain common for all project. I mean to say that i dont have to add it each time, its there by default.

    I am confused about the fact that as the GEL startup file already there in simulator is configured for particular device c5510 then why i have to change it even if i am using same target device.

    next considering the requirement that in order to solve data verification problem i have to change memory map configuration, i check help documentation of c5510 device simulator i found functions to define memory range but no information on how and for what memory part assign to different sections as while loading the data verification error pop up for address like:

    .sysinit 0 of 284 at 0x20000

    .rtdx_text 0 of 1732 at 0x2011c

    .bios 0 of 10183 at 0x207e0

    The memory map of target device c5510 is given in its data sheet.

    following is the default gel file for reference:

    /* The Startup() function is executed when the GEL file is loaded. */
    
    StartUp()
    {
        C5510_DSK_Init();
        C5510_DSK_EMIF_Init();
        GEL_TextOut("C5510_DSK GEL StartUp Complete.\n");
    }
    
    /* OnPreFileLoaded() is executed before a file is loaded.  Disable interrupts
     * and DMA from the current program so pending events and transfers don't
     * interfere with the new program. */
    
    OnPreFileLoaded()
    {
        /* Reset the CPU to clean up state */
        C5510_CPU_Reset();
    }
    
    /* OnRestart() is executed before a file is loaded. Disable interrupts
     * and DMA from the current program so pending events and transfers don't
     * interfere with the new program. */
    
    OnRestart()
    {
        /* Disable interrupts */
        *(int *)0x0003 = *(int *)0x0003 | 0x0800;  /* Set INTM */
        *(int *)0x0000 = 0;  /* Clear IER0 */
        *(int *)0x0045 = 0;  /* Clear IER1 */
        /* Disable each DMA channel */
        GEL_MemoryFill(0xc01,2,1,0x0000);  /* DMA0 */
        GEL_MemoryFill(0xc21,2,1,0x0000);  /* DMA1 */
        GEL_MemoryFill(0xc41,2,1,0x0000);  /* DMA2 */
        GEL_MemoryFill(0xc61,2,1,0x0000);  /* DMA3 */
        GEL_MemoryFill(0xc81,2,1,0x0000);  /* DMA4 */
        GEL_MemoryFill(0xca1,2,1,0x0000);  /* DMA5 */
    }
    
    menuitem "C5510_DSK_Configuration";
    hotmenu C5510_DSK_Init()
    {
        GEL_Reset();
        GEL_TextOut("C5510_CPU_Reset Complete.\n");
        
        GEL_MapOn();
        GEL_MapReset();
    
        /* Init debugger memory map for program space */
        GEL_MapAdd(0x0000C0,0,0x0FF40,1,1);	 /* DARAM */
        GEL_MapAdd(0x010000,0,0x040000,1,1); /* SARAM */
        GEL_MapAdd(0x050000,0,0x3B0000,1,1); /* External CE0 */
        GEL_MapAdd(0x400000,0,0x400000,1,1); /* External CE1 */
        GEL_MapAdd(0x800000,0,0x400000,1,1); /* External CE2 */
        GEL_MapAdd(0xC00000,0,0x400000,1,1); /* External CE3 */
    
        /* Init debugger memory map for data space */
        GEL_MapAdd(0x000000,1,0x000060,1,1); /* MMRs */
        GEL_MapAdd(0x000060,1,0x007FA0,1,1); /* DARAM */
        GEL_MapAdd(0x008000,1,0x020000,1,1); /* SARAM */
        GEL_MapAdd(0x028000,1,0x1D8000,1,1); /* External CE0 */
        GEL_MapAdd(0x200000,1,0x200000,1,1); /* External CE1 */
        GEL_MapAdd(0x400000,1,0x200000,1,1); /* External CE2 */
        GEL_MapAdd(0x600000,1,0x200000,1,1); /* External CE3 */
    
        /* Init debugger memory map for I/O mapped regs */
        GEL_MapAdd(0x0000u,2,0x000Fu,1,1);	/* Peripheral Bus */
        GEL_MapAdd(0x07fdu,2,0x0001u,1,1);  /* SYSR */
        GEL_MapAdd(0x0800u,2,0x0014u,1,1);	/* EMIF */
        GEL_MapAdd(0x0C00u,2,0x00ABu,1,1);	/* DMA */
        GEL_MapAdd(0x0E00u,2,0x0001u,1,1);	/* DMA Global*/
        GEL_MapAdd(0x1000u,2,0x0004u,1,1);	/* TIMER #0 */
        GEL_MapAdd(0x1400u,2,0x0009u,1,1);	/* ICACHE */
        GEL_MapAdd(0x1C00u,2,0x0001u,1,1);	/* CLKGEN */
        GEL_MapAdd(0x2000u,2,0x0055u,1,1);	/* TRACE FIFO */
        GEL_MapAdd(0x2400u,2,0x0004u,1,1);	/* TIMER #1 */
        GEL_MapAdd(0x2800u,2,0x001Fu,1,1);	/* SERIAL PORT #0 */
        GEL_MapAdd(0x2C00u,2,0x001Fu,1,1);	/* SERIAL PORT #1 */
        GEL_MapAdd(0x3000u,2,0x001Fu,1,1);	/* SERIAL PORT #2 */
        GEL_MapAdd(0x3400u,2,0x0002u,1,1);	/* GPIO */
        GEL_MapAdd(0x3800u,2,0x0005u,1,1);	/* ID */
    }
    
    /*  Initialize the EMIF control registers to access */
    /*  SDRAM in CE0 and Flash + CPLD in CE1 */
    
    hotmenu C5510_DSK_EMIF_Init()
    {
        GEL_MemoryFill(0x800,2,1,0x0221);
        GEL_MemoryFill(0x801,2,1,0xFFFF);
        GEL_MemoryFill(0x803,2,1,0x3FFF);
        GEL_MemoryFill(0x804,2,1,0x5FFF);
        GEL_MemoryFill(0x805,2,1,0x5FFF);
        GEL_MemoryFill(0x806,2,1,0x1038);
        GEL_MemoryFill(0x807,2,1,0x0038);
        GEL_MemoryFill(0x808,2,1,0x0038);
        GEL_MemoryFill(0x809,2,1,0x1050);
        GEL_MemoryFill(0x80A,2,1,0x0050);
        GEL_MemoryFill(0x80B,2,1,0x0050);
        GEL_MemoryFill(0x80C,2,1,0x1050);
        GEL_MemoryFill(0x80D,2,1,0x0050);
        GEL_MemoryFill(0x80E,2,1,0x0050);
        GEL_MemoryFill(0x80F,2,1,0x2B11);
        GEL_MemoryFill(0x810,2,1,0x0578); /* Refresh Period, 0x00A8 for 24MHz, 0x578 for 200MHz */
        GEL_MemoryFill(0x811,2,1,0x0fff);
        GEL_MemoryFill(0x813,2,1,0x0535);
    
        GEL_MemoryFill(0x812,2,1,0x0000); /* SDRAM Init */
    }
    

    Thanks,

    sandhya

  • Hello,

    Have anyone have idea as how to assign sections in memory map for c5510 device.

    Thanks

    Regards,

    Sandhya  

  • SANDHYA PRAJAPATI said:
    I am confused about the fact that as the GEL startup file already there in simulator is configured for particular device c5510 then why i have to change it even if i am using same target device.

    Note that the gel file for the simulator is different than the gel file for the hardware target. The memory map for each can have differences. 

    There are dependencies between the actual target, the debugger memory map, and the linker command file. They need to align and be correct. Please carefully read the below article:

    http://dev.ti.com/tirex/#/?link=Development%20Tools%2FIntegrated%20Development%20Environments%2FCode%20Composer%20Studio%2FDebug%2FTroubleshooting%2FData%20Verification%20Errors

    Thanks

    ki