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.

CCS/MSP430FR5969: Memory Allocation View data does not match MAP file

Part Number: MSP430FR5969

Tool/software: Code Composer Studio

Hello,

I'm looking at the information in the Memory Allocation View:

and I don't understand why the sections in FRAM don't add up to 15,770

I've attempted to add the peripheral sections, UNMI and SYSNMI that range from ffcc to fffe. I also added the following table:

LINKER GENERATED COPY TABLES

__TI_cinit_table @ 00004964 records: 2, size/record: 8, table size: 16
.data: load addr=00004800, load size=0000014f bytes, run addr=00001c00, run size=00000149 bytes, compression=copy
.bss: load addr=0000495e, load size=00000006 bytes, run addr=00001d4a, run size=00000018 bytes, compression=zero_init

This gives me the following:

I am still missing 35 bytes! What am I missing?

This is my map file:

******************************************************************************

                  MSP430 Linker PC v4.4.6                      

******************************************************************************

OUTPUT FILE NAME:   <Sample.out>

ENTRY POINT SYMBOL: "_c_int00_noargs_noexit"  address: 000082d2

MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill

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

  SFR                   00000000   00000010  00000000  00000010  RWIX

  PERIPHERALS_8BIT      00000010   000000f0  00000000  000000f0  RWIX

  PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX

  INFOD                 00001800   00000080  00000000  00000080  RWIX

  INFOC                 00001880   00000080  00000000  00000080  RWIX

  INFOB                 00001900   00000080  00000000  00000080  RWIX

  INFOA                 00001980   00000080  00000000  00000080  RWIX

  RAM                   00001c00   00000800  00000201  000005ff  RWIX

  FRAM                  00004400   0000bb80  00003d9a  00007de6  RWIX

  SIGNATURE             0000ff80   00000010  00000000  00000010  RWIX

  INT00                 0000ff90   00000002  00000000  00000002  RWIX

  INT01                 0000ff92   00000002  00000000  00000002  RWIX

  INT02                 0000ff94   00000002  00000000  00000002  RWIX

  INT03                 0000ff96   00000002  00000000  00000002  RWIX

  INT04                 0000ff98   00000002  00000000  00000002  RWIX

  INT05                 0000ff9a   00000002  00000000  00000002  RWIX

  INT06                 0000ff9c   00000002  00000000  00000002  RWIX

  INT07                 0000ff9e   00000002  00000000  00000002  RWIX

  INT08                 0000ffa0   00000002  00000000  00000002  RWIX

  INT09                 0000ffa2   00000002  00000000  00000002  RWIX

  INT10                 0000ffa4   00000002  00000000  00000002  RWIX

  INT11                 0000ffa6   00000002  00000000  00000002  RWIX

  INT12                 0000ffa8   00000002  00000000  00000002  RWIX

  INT13                 0000ffaa   00000002  00000000  00000002  RWIX

  INT14                 0000ffac   00000002  00000000  00000002  RWIX

  INT15                 0000ffae   00000002  00000000  00000002  RWIX

  INT16                 0000ffb0   00000002  00000000  00000002  RWIX

  INT17                 0000ffb2   00000002  00000000  00000002  RWIX

  INT18                 0000ffb4   00000002  00000000  00000002  RWIX

  INT19                 0000ffb6   00000002  00000000  00000002  RWIX

  INT20                 0000ffb8   00000002  00000000  00000002  RWIX

  INT21                 0000ffba   00000002  00000000  00000002  RWIX

  INT22                 0000ffbc   00000002  00000000  00000002  RWIX

  INT23                 0000ffbe   00000002  00000000  00000002  RWIX

  INT24                 0000ffc0   00000002  00000000  00000002  RWIX

  INT25                 0000ffc2   00000002  00000000  00000002  RWIX

  INT26                 0000ffc4   00000002  00000000  00000002  RWIX

  INT27                 0000ffc6   00000002  00000000  00000002  RWIX

  INT28                 0000ffc8   00000002  00000000  00000002  RWIX

  INT29                 0000ffca   00000002  00000000  00000002  RWIX

  INT30                 0000ffcc   00000002  00000002  00000000  RWIX

  INT31                 0000ffce   00000002  00000002  00000000  RWIX

  INT32                 0000ffd0   00000002  00000002  00000000  RWIX

  INT33                 0000ffd2   00000002  00000002  00000000  RWIX

  INT34                 0000ffd4   00000002  00000002  00000000  RWIX

  INT35                 0000ffd6   00000002  00000002  00000000  RWIX

  INT36                 0000ffd8   00000002  00000002  00000000  RWIX

  INT37                 0000ffda   00000002  00000002  00000000  RWIX

  INT38                 0000ffdc   00000002  00000002  00000000  RWIX

  INT39                 0000ffde   00000002  00000002  00000000  RWIX

  INT40                 0000ffe0   00000002  00000002  00000000  RWIX

  INT41                 0000ffe2   00000002  00000002  00000000  RWIX

  INT42                 0000ffe4   00000002  00000002  00000000  RWIX

  INT43                 0000ffe6   00000002  00000002  00000000  RWIX

  INT44                 0000ffe8   00000002  00000002  00000000  RWIX

  INT45                 0000ffea   00000002  00000002  00000000  RWIX

  INT46                 0000ffec   00000002  00000002  00000000  RWIX

  INT47                 0000ffee   00000002  00000002  00000000  RWIX

  INT48                 0000fff0   00000002  00000002  00000000  RWIX

  INT49                 0000fff2   00000002  00000002  00000000  RWIX

  INT50                 0000fff4   00000002  00000002  00000000  RWIX

  INT51                 0000fff6   00000002  00000002  00000000  RWIX

  INT52                 0000fff8   00000002  00000002  00000000  RWIX

  INT53                 0000fffa   00000002  00000002  00000000  RWIX

  INT54                 0000fffc   00000002  00000002  00000000  RWIX

  RESET                 0000fffe   00000002  00000002  00000000  RWIX

  FRAM2                 00010000   00004000  00000000  00004000  RWIX

SECTION ALLOCATION MAP

 output                                  attributes/

section   page    origin      length       input sections

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

.data      0    00001c00    00000149     UNINITIALIZED

                  00001c00    000000b0     rts430x_lc_rd_eabi.lib : signal.obj (.data:sigtable)

                  00001cb0    00000068                            : xfvalues.obj (.data)

                  00001d18    00000014     main.obj (.data)

                  00001d2c    00000008     cs.obj (.data)

                  00001d34    00000008     rts430x_lc_rd_eabi.lib : feraiseexcept.obj (.data)

                  00001d3c    00000004                            : _lock.obj (.data:_lock)

                  00001d40    00000004                            : _lock.obj (.data:_unlock)

                  00001d44    00000002                            : errno.obj (.data)

                  00001d46    00000001     main.obj (.data:somestuff)

                  00001d47    00000001     --HOLE--

                  00001d48    00000001     main.obj (.data:somestuff)

.bss       0    00001d4a    00000018     UNINITIALIZED

                  00001d4a    0000000c     (.common:$P$T0$1)

                  00001d56    00000004     (.common:somestuff)

                  00001d5a    00000004     (.common:somestuff)

                  00001d5e    00000004     (.common:somestuff)

.stack     0    00002360    000000a0     UNINITIALIZED

                  00002360    00000004     rts430x_lc_rd_eabi.lib : boot.obj (.stack)

                  00002364    0000009c     --HOLE--

.cio       0    00004800    00000000     UNINITIALIZED

.sysmem    0    00004800    00000000     UNINITIALIZED

.cinit     0    00004800    00000174     

                  00004800    0000014f     (.cinit..data.load) [load image]

                  00004951    00000001     --HOLE-- [fill = 0]

                  00004952    0000000c     (__TI_handler_table)

                  0000495e    00000006     (.cinit..bss.load) [load image, compression = zero_init]

                  00004964    00000010     (__TI_cinit_table)

.pinit     0    00004974    00000000     UNINITIALIZED

.init_array 

*          0    00004974    00000000     UNINITIALIZED

.mspabi.exidx 

*          0    00004974    00000000     UNINITIALIZED

.mspabi.extab 

*          0    00004974    00000000     UNINITIALIZED

.const     0    00004974    000000e0     

                  00004974    0000004c   

                  000049c0    00000038   

                  000049f8    00000020   

                  00004a18    0000001c   

                  00004a34    00000010   

                  00004a44    00000008   

                  00004a4c    00000004   

                  00004a50    00000004   

.ipe       0    00004c00    00000000     UNINITIALIZED

.text      0    00004c00    00003846     

                  00004c00    00000512    

                  00005112    000004aa    

                  000055bc    00000452    

                  00005a0e    000002e4    

                  00005cf2    000002d8    

                  00005fca    00000282    

                  0000624c    00000262    

                  000064ae    00000252    

                  00006700    00000222    

                  00006922    00000130    

                  00006a52    0000011c    

                  00006b6e    000000d6    

                  00006c44    000000ce    

                  00006d12    000000ca    

                  00006ddc    000000b8    

                  00006e94    000000b6    

                  00006f4a    000000b2    

                  00006ffc    000000b0    

                  000070ac    000000a6    

                  00007152    0000009e    

                  000071f0    0000009e    

                  0000728e    00000098    

                  00007326    00000092    

                  000073b8    00000090    

                  00007448    0000008e    

                  000074d6    0000008c    

                  00007562    0000008c    

                  000075ee    0000007e    

                  0000766c    0000007a    

                  000076e6    00000076    

                  0000775c    00000072    

                  000077ce    0000006c    

                  0000783a    0000006c    

                  000078a6    00000068    

                  0000790e    00000068    

                  00007976    00000068    

                  000079de    00000064    

                  00007a42    00000064    

                  00007aa6    0000005e    

                  00007b04    0000005c    

                  00007b60    00000058    

                  00007bb8    0000004a    

                  00007c02    0000004a    

                  00007c4c    00000046    

                  00007c92    00000042    

                  00007cd4    00000040    

                  00007d14    00000040    

                  00007d54    0000003e    

                  00007d92    0000003e    

                  00007dd0    0000003e    

                  00007e0e    0000003a    

                  00007e48    0000003a    

                  00007e82    0000003a    

                  00007ebc    00000038    

                  00007ef4    00000038    

                  00007f2c    00000036    

                  00007f62    00000036    

                  00007f98    00000034    

                  00007fcc    00000032    

                  00007ffe    00000032    

                  00008030    00000032    

                  00008062    00000030    

                  00008092    0000002c    

                  000080be    0000002a    

                  000080e8    00000026    

                  0000810e    00000026    

                  00008134    00000024    

                  00008158    00000024    

                  0000817c    00000024    

                  000081a0    00000022    

                  000081c2    00000022    

                  000081e4    00000020    

                  00008204    00000020    

                  00008224    00000020    

                  00008244    0000001e    

                  00008262    0000001e    

                  00008280    0000001c    

                  0000829c    0000001c    

                  000082b8    0000001a    

                  000082d2    0000001a    

                  000082ec    00000018    

                  00008304    00000016    

                  0000831a    00000016    

                  00008330    00000014    

                  00008344    00000012    

                  00008356    00000012    

                  00008368    00000012    

                  0000837a    00000010    

                  0000838a    00000010    

                  0000839a    00000010    

                  000083aa    00000010    

                  000083ba    0000000e    

                  000083c8    0000000e    

                  000083d6    0000000c    

                  000083e2    0000000c    

                  000083ee    0000000a    

                  000083f8    0000000a    

                  00008402    0000000a    

                  0000840c    00000006    

                  00008412    00000006    

                  00008418    00000006    

                  0000841e    00000006    

                  00008424    00000006    

                  0000842a    00000006    

                  00008430    00000006    

                  00008436    00000006    

                  0000843c    00000004    

                  00008440    00000004    

                  00008444    00000002    

.TI.persistent 

*          0    00001c00    00000000     UNINITIALIZED

.TI.noinit 

*          0    00001d4a    00000000     UNINITIALIZED

.fram_vars 

*          0    00004400    00000154     

                  00004400    00000150     main.obj (.fram_vars:uninit) [fill = 0]

                  00004550    00000004     main.obj (.fram_vars:init)

AES256     0    0000ffcc    00000002     

                  0000ffcc    00000002     rts430x_lc_rd_eabi.lib : int30.obj (.int30)

RTC        0    0000ffce    00000002     

                  0000ffce    00000002     rts430x_lc_rd_eabi.lib : int31.obj (.int31)

PORT4      0    0000ffd0    00000002     

                  0000ffd0    00000002     rts430x_lc_rd_eabi.lib : int32.obj (.int32)

PORT3      0    0000ffd2    00000002     

                  0000ffd2    00000002     rts430x_lc_rd_eabi.lib : int33.obj (.int33)

TIMER3_A1 

*          0    0000ffd4    00000002     

                  0000ffd4    00000002     rts430x_lc_rd_eabi.lib : int34.obj (.int34)

TIMER3_A0 

*          0    0000ffd6    00000002     

                  0000ffd6    00000002     rts430x_lc_rd_eabi.lib : int35.obj (.int35)

PORT2      0    0000ffd8    00000002     

                  0000ffd8    00000002     rts430x_lc_rd_eabi.lib : int36.obj (.int36)

TIMER2_A1 

*          0    0000ffda    00000002     

                  0000ffda    00000002     rts430x_lc_rd_eabi.lib : int37.obj (.int37)

TIMER2_A0 

*          0    0000ffdc    00000002     

                  0000ffdc    00000002     rts430x_lc_rd_eabi.lib : int38.obj (.int38)

PORT1      0    0000ffde    00000002     

                  0000ffde    00000002     rts430x_lc_rd_eabi.lib : int39.obj (.int39)

TIMER1_A1 

*          0    0000ffe0    00000002     

                  0000ffe0    00000002     rts430x_lc_rd_eabi.lib : int40.obj (.int40)

TIMER1_A0 

*          0    0000ffe2    00000002     

                  0000ffe2    00000002     rts430x_lc_rd_eabi.lib : int41.obj (.int41)

DMA        0    0000ffe4    00000002     

                  0000ffe4    00000002     rts430x_lc_rd_eabi.lib : int42.obj (.int42)

USCI_A1    0    0000ffe6    00000002     

                  0000ffe6    00000002     rts430x_lc_rd_eabi.lib : int43.obj (.int43)

TIMER0_A1 

*          0    0000ffe8    00000002     

                  0000ffe8    00000002     rts430x_lc_rd_eabi.lib : int44.obj (.int44)

TIMER0_A0 

*          0    0000ffea    00000002     

                  0000ffea    00000002     main.obj (.int45)

ADC12      0    0000ffec    00000002     

                  0000ffec    00000002     rts430x_lc_rd_eabi.lib : int46.obj (.int46)

USCI_B0    0    0000ffee    00000002     

                  0000ffee    00000002     rts430x_lc_rd_eabi.lib : int47.obj (.int47)

USCI_A0    0    0000fff0    00000002     

                  0000fff0    00000002     main.obj (.int48)

WDT        0    0000fff2    00000002     

                  0000fff2    00000002     rts430x_lc_rd_eabi.lib : int49.obj (.int49)

TIMER0_B1 

*          0    0000fff4    00000002     

                  0000fff4    00000002     rts430x_lc_rd_eabi.lib : int50.obj (.int50)

TIMER0_B0 

*          0    0000fff6    00000002     

                  0000fff6    00000002     rts430x_lc_rd_eabi.lib : int51.obj (.int51)

COMP_E     0    0000fff8    00000002     

                  0000fff8    00000002     rts430x_lc_rd_eabi.lib : int52.obj (.int52)

UNMI       0    0000fffa    00000002     

                  0000fffa    00000002     rts430x_lc_rd_eabi.lib : int53.obj (.int53)

SYSNMI     0    0000fffc    00000002     

                  0000fffc    00000002     rts430x_lc_rd_eabi.lib : int54.obj (.int54)

.reset     0    0000fffe    00000002     

                  0000fffe    00000002     rts430x_lc_rd_eabi.lib : boot.obj (.reset)

LINKER GENERATED COPY TABLES

__TI_cinit_table @ 00004964 records: 2, size/record: 8, table size: 16

.data: load addr=00004800, load size=0000014f bytes, run addr=00001c00, run size=00000149 bytes, compression=copy

.bss: load addr=0000495e, load size=00000006 bytes, run addr=00001d4a, run size=00000018 bytes, compression=zero_init

LINKER GENERATED HANDLER TABLE

__TI_handler_table @ 00004952 records: 3, size/record: 4, table size: 12

index: 0, handler: __TI_zero_init

index: 1, handler: __TI_decompress_rle24

index: 2, handler: __TI_decompress_none      

[1021 symbols]

I am using CCS V6

Best Regards,

JV

  • Jonathan Velez said:
    I'm looking at the information in the Memory Allocation View:

    and I don't understand why the sections in FRAM don't add up to 15,770

    By default the Memory Allocation View filters out some regions. Try using Show -> All Ranges as per CCS Memory Allocation View - leaving out Interrupt Vector Table in Calculation?

  • Thanks Chester,  I'm happy to know that option exists, but even when showing All Ranges the total FRAM used does still not add up. In fact, showing All Ranges verifies that I had correctly allocated 52 bytes for the IVT. I was calculating things incorrectly, but now I'm just using the numbers in the Memory Allocation view and this is what I get:

    this gives me 15,342 bytes plus 52 bytes of IVT:

    totaling 15,394 bytes...so I'm still missing 376 bytes. Any ideas where I can find these missing bytes?

    Best Regards,

    JV

  • Jonathan Velez said:
     I'm happy to know that option exists, but even when showing All Ranges the total FRAM used does still not add up.

    Looking again the problem wasn't the Memory Allocation view not showing all regions, but that the breakdown of the allocations in the FRAM region didn't add up.

    The Memory Allocation view is derived from the contents of the *linkInfo.xml file produced the linker. The Memory Allocation view reports the allocated size of the FRAM region is 15770 bytes which matches the summary from the linker map file:

             name            origin    length      used     unused   attr    fill
    
    ----------------------  --------  ---------  --------  --------  ----  --------
    
      FRAM                  00004400   0000bb80  00003d9a  00007de6  RWIX

    Can you post the *linkInfo.xml file produced the linker?

  • Jonathan Velez said:
    I attached the linkInfo.xml

    Looking at the linkInfo.xml file shows the overall FRAM area as:

          <memory_area display="yes" color="green">
             <name>FRAM</name>
             <page_id>0x0</page_id>
             <origin>0x4400</origin>
             <length>0xbb80</length>
             <used_space>0x3d9a</used_space>
             <unused_space>0x7de6</unused_space>
             <attributes>RWIX</attributes>
             <usage_details>
                <allocated_space>
                   <start_address>0x4400</start_address>
                   <size>0x154</size>
                   <logical_group_ref idref="lg-69"/>
                </allocated_space>
                <available_space>
                   <start_address>0x4554</start_address>
                   <size>0x2ac</size>
                </available_space>
                <allocated_space>
                   <start_address>0x4800</start_address>
                   <size>0x3c46</size>
                   <logical_group_ref idref="lg-2"/>
                </allocated_space>
                <available_space>
                   <start_address>0x8446</start_address>
                   <size>0x7b3a</size>
                </available_space>
             </usage_details>
          </memory_area>

    i.e. the FRAM area has two allocated spaces of size 0x154 and 0x3c46 = 15770 bytes = the total usage of the FRAM region reported in the CCS Memory Allocation view.

    The allocated_space of start address 0x4400 and size 0x154 is occupied by the .fram_vars section reported in the linker map file:

    .fram_vars 
    *          0    00004400    00000154     
                      00004400    00000150     main.obj (.fram_vars:uninit) [fill = 0]
                      00004550    00000004     main.obj (.fram_vars:init)

    The allocated_space of start address 0x4800 and size 0x3c46 is occupied by the following sections in the linker map file:

    .cinit     0    00004800    00000174 
    .const     0    00004974    000000e0  /* .const allocated immediately after end of .cinit */
                                          /* gap of 0x1AC bytes between end of .cinit section and start of .text section */
    .text      0    00004c00    00003846  /* 0x3C46 bytes between start of .cinit section and end of .text section */

    I think the 0x1AC bytes of "padding" inserted between the .const and .text segments by the linker, for the purpose of MPU segments, incorrectly gets added to the total FRAM region usage by the linker.