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.

TMS320F28379D: Adding Library Functions to Group Doesn’t Change the Size

Part Number: TMS320F28379D

Greetings,

I have a library which contains a number of functions some of which must run from RAM.  In addition to that, there are some other functions which use the library and others which are used by the library and must also be run from RAM.  In the cmd file, I am using a single GROUP for both.  When I load the code into RAM, I can see that the functions which are external to the library are there.  But when a library function is added, the size does not change.  However the map file shows that the linker has assigned a RAM address for the library function.  So it seems that the size is the only issue.  I’m sure there is something I am not understanding correctly.  The files are setup as follows:

 

ExternalFunctions.cpp:

Each function which is to be run from RAM is preceded with “#pragma CODE_SECTION (“SectionName”)

 

cmd files:

library.cmd

SECTIONS

{

   LibrarySectionName: LOAD=MODULE_CODE, RUN=RAM

   {

   --library=LibraryName.lib<Object0.obj> (.text:_Function0)

   }

}

 

 

project.cmd

#include “library.cmd”

SECTIONS

{

   GROUP

   {

      SectionName

      LibrarySectionName

   } LOAD = MODULE_CODE,                                                   PAGE = 0, PALIGN(8)

     RUN  = RAM,

     LOAD_START(_StartAddr),

     LOAD_SIZE(_Size),

     RUN_START(_RunAddr)

}

Thank you,

Ed