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.

how to modify the cmd file to use multi memory sectors for .test section?

Hello,

  I am learning the F28377D and have trouble to use the linker cmd file.

  I used the 2837x_RAM_lnk_cpu1.cmd in my program and I got the error that program will not fit into available memory. And I tried to modify the linker cmd file to expand the memory sectors for .text section.

  1.Errors when using the OR operation

.text            : >>RAMGS2 | RAMGS3 |  RAMGS4 | RAMGS5 | RAMGS6 | RAMGS7 | RAMGS8 | RAMGS9 | RAMGS10 | RAMGS11 | RAMGS12 | RAMGS13 | RAMGS14 | RAMGS15,   PAGE = 1

  Firstly I modified the cmd file as above and that made no sense.

  I think the cmd above means that the .text section can use sectors from RAMGS2 to RAMGS15 and is there something wrong?

2.Problems solved with sectors combined

   RAMGS0      : origin = 0x00C000, length = 0x001000
   RAMGS1      : origin = 0x00D000, length = 0x001000
   RAMGS2      : origin = 0x00E000, length = 0x00E000


   .text            : > RAMGS2,   PAGE = 1

Then I tried to combine the sectors from RAMGS2 to RAMGS15 together as a new and large RAMGS2 .

And the problem was solved.

What's the differences between the 2 ways above?

3.New puzzle using the OR operation

I modified the cmd file again.

   RAMGS0      : origin = 0x00C000, length = 0x001000
   RAMGS1      : origin = 0x00D000, length = 0x001000
   RAMGS2      : origin = 0x00E000, length = 0x001000
   RAMGS3      : origin = 0x00F000, length = 0x001000
   RAMGS4      : origin = 0x010000, length = 0x00C000

   .text            : >> RAMGS1 | RAMGS2 | RAMGS3 | RAMGS4,   PAGE = 1

I combined the sectors from RAMGS4 to RAMGS15 together as a new and large RAMGS4 .

The project was built successfully. 

However, when I used the Memory Allocation to view the memory I found someting strange: The RAMGS1 and RAMGS4 were used while the RAMGS2 and RAMGS3 were unused.

I do not understand why.

Looking forward to your reply.

Best regards,

-Di