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 Problem in GEL for C5515 USB Stick Eval Board

Guru 15580 points


I am running into problem when trying to debug a very simple program on the C5515 USB Stick Eval board. When I start the debugging session, I get the following error:

"C55xx: 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."

I am using the un-modified GEL file that came with the Eval board (usbstk5515.gel). Why am I getting this error and what should I do to fix it?

Thx

MikeH

  • Mike,

    Is your program something that came with the Eval board also? If not, it could be the linker command file you are using is not placing your sections in available memory locations as defined in your GEL file

    ki

  • Ki,

    No, the program is one I wrote to help me understand how to reference an external library function. I have attached it.

    So, it sounds like I need to coordinate the memory map specified by the linker with the one specified by the GEL file. I would assume the comiler/linker is using a default memory map but I'm not sure where to look to modify it. Can you give me some guidance?

    thx

    MikeH

    0508.mike_test.zip

  • Mike,

    You need a linker command file that specifies the correct memory locations to place your code/data. Drop the attached cmd file into your main project folder 'test_main'. Then rebuild. It should load fine (I just tried it out on mu 5515 USB stick)

    ki

    lnk_tms320c5515.cmd
  • Ki,

    Great. That fixed the problem. Thanks.

    Now can you tell me why the funtion is returning 256 instead of 48256?

    thx

    MikeH

  • Mike,

    I can see that the return type in the function prototype (header file <test_lib.h>) is different than the function code (in <test_lib.c>). This will definitely cause problems in the result seen.

    In <test_lib.c>: long test_function(long i, int j)

    In <test_lib.h>: int test_function(long i, int j);

    The reason why the compiler/linker did not catch this error is because it has no information on the function other than what is stated in the header file.

    Hope this helps,

    Rafael

  • Doh!

    Don't you just love helping rookies.....:0

    Thanks!

    MikeH

  • Ki,

    The linker file that you provided defines on-chip SRAM at 10000h, which appears to be consistent with the memory map of the C5515. However, the Tech Ref guide from Spectrum Digital defines the on-chip SRAM from 30000h with a length of 1e000h bytes. Can you explain why the SD eval board would define SRAM this way?

    Your file definition...........................

    SARAM (RW) : origin = 0010000h length = 040000h /* on-chip SARAM */

    ========================================

    SD's definition in the C5515.cmd file that came with the eval board............

    // SARAM (RW) : origin = 0030000h length = 01e000h /* on-chip SARAM */

     

    Thx

    MikeH