Why is rtlib.bss above __bss_addr = .; in the LCF

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why is rtlib.bss above __bss_addr = .; in the LCF

607 Views
j___
Contributor IV

I have noticed in the DSC LCF and documentation examples, that rtlib.bss and rtlib.bss.lo is above the pointer for the RAM copy routine. See excerpt from demo project below. Also, see this in the documentation at:

Targeting MC56F83xx/DSP5685x Controllers, page 137. There are many more examples in the documents.

Why is this?

How does it get copied to RAM?

Regards,

J

-----------------------------------------------------------------------------------

        .ApplicationData :
        {
              # save space for the pROM data copy
              . = __xRAM_data_start + __data_size;

              # .bss sections
              * (rtlib.bss.lo)       #<<---- rtlib.bss above waterline marker\pointer
              * (rtlib.bss)                 #<<---- rtlib.bss above waterline marker\pointer
              . = ALIGN(4);
              F_Xbss_start_addr = .; #<<---- Marker\Address\Pointer to bss Start
              _START_BSS = .;
              * (.bss.char)         # used if "Emit Separate Char Data Section" enabled
              * (.bss)
              _END_BSS   = .;
              F_Xbss_length = _END_BSS - _START_BSS;

              /* Setup the HEAP address */

-----------------------------------------------------------------------------------

0 Kudos
3 Replies

423 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jim,

As you know that the  MSL_C_56800E.lib and Runtime_56800E.lib are integrated in the project, so the LCF file has to allocate space for them.

We provide the source code for the library, pls refer to the directory:

C:\Program Files (x86)\Freescale\CodeWarrior for DSC56800E v8.3\M56800E Support

Hope it can help you

BR

Xiangjun Rong

0 Kudos

423 Views
j___
Contributor IV

This does not answer the question.

Yes, of course, the LCF has to allocate space for them. BUT, it can do that whether it is above or below ". = __xRAM_data_start + __data_size;". Why is it always above ". = __xRAM_data_start + __data_size;". And, because it is above that, how does it get copied out?

0 Kudos

423 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jim,

Regarding the line in LCF ". = __xRAM_data_start + __data_size;", it just allocate memory space with __data_size  bytes. For example if the original address __xRAM_data_start is 0x1000, and the __data_size is 0x200, after the line, the current address . is 0x1200.

Hope it can help you

BR

xiangjun rong

0 Kudos