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.

CCSv5.5.0.00077 and TMS320C6416T DSK - problem with memory region

Other Parts Discussed in Thread: TMS320C6416T, TMS320C6416

Hello,
When I run example program Hello World with default configuration everything is ok. I've tried use SDRAM memory. When I builded and ran program I got in console:

C64xx_0: GEL Output: GEL StartUp Complete.
C64xx_0: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

My configurtaion is:
- CCSv5.5.0.00077
- DSP BIOS 5.42
- Board TMS320C6416T DSK
- in *.ccxml file:
        - Connection:Blackhawk XDS560v2 - USB System Trace Emulator,
        - Device: DSK6416
        - GEL file: dsk6416.gel

When I prepare *.ccxml file for simulation:
        - Connection: Texas Instruments Simulator
        - Device: C6416 Device Cycle Accurate Simulator, Little Endian
        - GEL file: tisim_init_64xx.gel
everything is ok.

In attachment are files:
- dsk6416.gel
- hello.tcf
- test.map
- hellocfg.cmd
What is wrong with memory configuration? In cmd file linker is using memory in accroding with tcf file.
Lukasz.

4670.files.zip

  • Hello,

    Lukasz Nalik said:
    C64xx_0: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

    You are getting what is commonly known as a "data verification error". The causes of it can vary quite a bit. There is a lot of information in the below link. I suggest carefully going over the information in there:

    http://processors.wiki.ti.com/index.php/Troubleshooting_CCS_-_Data_Verification_Errors

    Lukasz Nalik said:
    When I prepare *.ccxml file for simulation:
            - Connection: Texas Instruments Simulator
            - Device: C6416 Device Cycle Accurate Simulator, Little Endian
            - GEL file: tisim_init_64xx.gel
    everything is ok.

    The reason why it works fine with a simulator is because many simulators have a flat memory model where nearly all memory is accessible where this not the case with real hardware.

    Thanks

    ki

  • Thanks for help.
    The problem was in GEL file. I had allocated in gel file to small amount of memory for SDRAM. I changed it and the program was loaded.
    There is another problem. When I put brekapoint, program didn't stop. I'm sure that is still problem with memory allocation, but I haven't got idea where should I start to find it.
    Can you suggest something?
    Thanks
    Lukasz.
  • Is the issue that you are sure the program reached the location and the breakpoint was not triggered, or that your program is not reaching the location you set the breakpoint? The former can be a tools configuration problem while the latter can have many reasons (bug in application, target not initialized properly, etc). Without more details on your application, it is hard to give nay concrete advice. When you manually halt the target, were is it halted?
  • Manually I can halt target. I need a lot of memory, because I have big arrays in it.
    From the beginning. In TMS320C6416T I have only 1 MB L2 Cache. It's not enough for my needs. I'd like to use SDRAM - I have 256 MB. 6416.cmd file contains memory map:

    -stack 0x2000
    -heap 0x8000

    /* TMS320C6416 Memory map */

    MEMORY
    {
    L2RAM o = 0x00000000 l = 0x00100000
    EMIFBCE0 o = 0x60000000 l = 0x04000000 /* CPLD in 6416 DSK */
    EMIFBCE1 o = 0x64000000 l = 0x04000000 /* Flash in 6416 DSK */
    EMIFBCE2 o = 0x68000000 l = 0x04000000
    EMIFBCE3 o = 0x6C000000 l = 0x04000000
    EMIFACE0 o = 0x80000000 l = 0x10000000 /* SDRAM in 6416 DSK */
    EMIFACE1 o = 0x90000000 l = 0x10000000
    EMIFACE2 o = 0xA0000000 l = 0x10000000 /* Daughterboard in 6416 DSK */
    EMIFACE3 o = 0xB0000000 l = 0x10000000 /* Daughterboard in 6416 DSK */
    }

    SECTIONS
    {
    .text > L2RAM
    .stack > L2RAM
    .bss > L2RAM
    .cio > L2RAM
    .const > L2RAM
    .data > L2RAM
    .switch > L2RAM
    .sysmem > L2RAM
    .far > L2RAM
    .args > L2RAM
    .ppinfo > L2RAM
    .ppdata > L2RAM

    /* COFF sections */
    .pinit > L2RAM
    .cinit > L2RAM

    /* EABI sections */
    .binit > L2RAM
    .init_array > L2RAM
    .neardata > L2RAM
    .fardata > L2RAM
    .rodata > L2RAM
    .c6xabi.exidx > L2RAM
    .c6xabi.extab > L2RAM
    }

    Which sections can I move to SDRAM and which I have to leave in L2RAM?
    I'm using DSP BIOS 5.42. In project must exist *.tcf file. Can I somehow using *.tcf and 6416.cmd together or should I use only *.tcf file?
    Lukasz.
  • Unfortunately the answer to your questions is the vague "it depends" answer. It depends on your application, your specific system needs, and (in the latter case) the contents of the cmd file. DSP/BIOS will auto-generate a cmd file that is often enough on its own. But people will sometimes have another cmd file that has extra custom options since it is not recommended to modify the autogenerated cmd file from BIOS. You will have to take into these considerations and determine what is the best solution for your environment.

    Hope this helps
    ki
  • Hi,
    First I have to check SDRAM memory, is it working properly.
    Now I'm using CMD file (default value):
    MEMORY
    {
    L2RAM: o = 0x00000000 l = 0x00100000 /* 1MB L2 Internal RAM */
    EMIFBCE0: o = 0x60000000 l = 0x04000000 /* 64MB EMIFB CE0 */
    EMIFBCE1: o = 0x64000000 l = 0x04000000 /* 64MB EMIFB CE1 */
    EMIFBCE2: o = 0x68000000 l = 0x04000000 /* 64MB EMIFB CE2 */
    EMIFBCE3: o = 0x6C000000 l = 0x04000000 /* 64MB EMIFB CE3 */
    EMIFACE0: o = 0x80000000 l = 0x10000000 /* 256MB EMIFA CE0 */
    EMIFACE1: o = 0x90000000 l = 0x10000000 /* 256MB EMIFA CE1 */
    EMIFACE2: o = 0xA0000000 l = 0x10000000 /* 256MB EMIFA CE2 */
    EMIFACE3: o = 0xB0000000 l = 0x10000000 /* 256MB EMIFA CE3 */
    }

    SECTIONS
    {
    .text > L2RAM
    .stack > L2RAM
    .bss > L2RAM
    .cio > L2RAM
    .const > L2RAM
    .data > L2RAM
    .switch > L2RAM
    .sysmem > L2RAM
    .far > L2RAM
    .args > L2RAM
    .ppinfo > L2RAM
    .ppdata > L2RAM

    /* COFF sections */
    .pinit > L2RAM
    .cinit > L2RAM

    /* EABI sections */
    .binit > L2RAM
    .init_array > L2RAM
    .neardata > L2RAM
    .fardata > L2RAM
    .rodata > L2RAM
    .c6xabi.exidx > L2RAM
    .c6xabi.extab > L2RAM
    }
    Below, my short program:

    #include <stdio.h>
    #include <stdint.h>

    #define MEMORY_SIZE 0x3FFFFFF

    int main(void)
    {
    uint32_t i = 0x00000000;
    uint32_t startAdd = 0x80000000;

    // Write data
    do
    {
    *(volatile uint32_t *)startAdd = (uint32_t)i;
    startAdd = startAdd + i;
    i ++;
    }
    while (i <= MEMORY_SIZE);

    return 0;
    }

    The problem is that I write some value into SDRAM, but when I read I get wrong value (not the same as I wrote).
    Should I use EMIFA to write and read from SDRAM?
    Regards,
    Lukasz.
  • Lukasz Nalik said:
    The problem is that I write some value into SDRAM, but when I read I get wrong value (not the same as I wrote).
    Should I use EMIFA to write and read from SDRAM?

    It could be that SDRAM has not been initialized properly. I don't know enough about the HW specifics of your target to properly comment. You may want to contact Spectrum Digital support. I believe they produced the DSKs.

    Thanks

    ki

  • I looked back at this thread and saw one comment I missed earlier:

    Lukasz Nalik said:
    The problem was in GEL file. I had allocated in gel file to small amount of memory for SDRAM. I changed it and the program was loaded.

    You said you changed the GEL file. If you were using the dsk6416.gel that comes for your DSK, it is usually fixed to the memory layout of that target. You cannot arbitrarily change the memory mapping in the GEL file. Make sure what ever change you made is relevant for the actual available memory on the target (that it actually exists)

  • Thanks.

    Here is Memory Browser from CCS:

    I will contact with them. I'll give you a sign when I solve the problem.

    Regards,

    Lukasz.

  • Hi,

    I’ve got another board DSK6416. On this platform SDRAM working well.

    The old DSK6416 platform had SDRAM faulty.

    Finally everything is ok.

    In attachment two files (maybe it helps someone):

    - zip file with SDRAM test for DSK6416,

    - zip file with all sections moved to SDRAM.

    Regards,

    Lukasz.SDRAMcheckCSLlibrary.zipTCFfileTest.zip

  • Thanks for the update! Glad you found the root cause.