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.

CCE 3.1 - SLAA281b (mmc card example) - MSP430F2274

Other Parts Discussed in Thread: MSP430F2274

Hi,

I looked around the forum but could not quite find an answer to my question, there are a few similiar cases but no cigar. I am getting the following error when I try to build the SLAA281b MMC code example for MSP430F2274:

<Linking>
"../lnk_msp430f2274.cmd", line 215: error: run placement fails for object
   ".bss"
error: errors encountered during linking; "mmcTest.out" not built

Its worth noting that it looks like I can build the example in IAR Wordbench fine. I find it hard to believe that its because there is not enough resources on the MCU as one person noted (http://community.ti.com/forums/t/65.aspx?PageIndex=4). I also updated my CCE3.0 to CCE3.1 from (slac135e - http://focus.ti.com/docs/toolsw/folders/print/msp-cce430.html#Support%20Software). I am hoping that its something simple that I am doing wrong.

Leon

  • :) Immm, I found that by changing the size from 512 to 128 at line 80 in main.c

    unsigned char buffer[128];

    the error disappeared. So this does point to the resources not being enough suggestion. But why does IAR not complain about this?

  • Leon Steenkamp said:

    I found that by changing the size from 512 to 128 at line 80 in main.c

    unsigned char buffer[128];

    the error disappeared. So this does point to the resources not being enough suggestion.

    I would say, yes, it does point to not enough RAM resources on that device.

     

    Leon Steenkamp said:

    But why does IAR not complain about this?

    I would suggest turning on the option to generate a map file for both IAR and CCE.  This would help highlight where the resources are being consumed.  There may be a number of reasons why it may fit with IAR versus CCE.  Drilling into the details will provide that clarity.

  • BrandonAzbell said:

    I would suggest turning on the option to generate a map file for both IAR and CCE.  This would help highlight where the resources are being consumed.  There may be a number of reasons why it may fit with IAR versus CCE.  Drilling into the details will provide that clarity.

    I did generate a map file but was not really sure what to look out for.

     

    ******************************************************************************
           MSP430 Evaluation Linker PC v3.1.0                     
    ******************************************************************************
    >> Linked Mon Apr 06 16:39:36 2009

    OUTPUT FILE NAME:   <mmcTest.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 00008ac4


    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
      RAM                   00000200   00000400  00000050  000003b0  RWIX
      INFOD                 00001000   00000040  00000000  00000040  RWIX
      INFOC                 00001040   00000040  00000000  00000040  RWIX
      INFOB                 00001080   00000040  00000000  00000040  RWIX
      INFOA                 000010c0   00000040  00000000  00000040  RWIX
      FLASH                 00008000   00007fde  00000b94  0000744a  RWIX
      INT00                 0000ffe0   00000002  00000000  00000002  RWIX
      INT01                 0000ffe2   00000002  00000000  00000002  RWIX
      INT02                 0000ffe4   00000002  00000000  00000002  RWIX
      INT03                 0000ffe6   00000002  00000000  00000002  RWIX
      INT04                 0000ffe8   00000002  00000000  00000002  RWIX
      INT05                 0000ffea   00000002  00000000  00000002  RWIX
      INT06                 0000ffec   00000002  00000000  00000002  RWIX
      INT07                 0000ffee   00000002  00000000  00000002  RWIX
      INT08                 0000fff0   00000002  00000000  00000002  RWIX
      INT09                 0000fff2   00000002  00000000  00000002  RWIX
      INT10                 0000fff4   00000002  00000000  00000002  RWIX
      INT11                 0000fff6   00000002  00000000  00000002  RWIX
      INT12                 0000fff8   00000002  00000000  00000002  RWIX
      INT13                 0000fffa   00000002  00000000  00000002  RWIX
      INT14                 0000fffc   00000002  00000000  00000002  RWIX
      RESET                 0000fffe   00000002  00000002  00000000  RWIX


    SECTION ALLOCATION MAP

     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .bss       0    00000000    00000412     FAILED TO ALLOCATE
    .pinit     0    00008000    00000000     UNINITIALIZED

    .stack     0    000005b0    00000050     UNINITIALIZED
                      000005b0    00000002     rts430.lib : boot.obj (.stack)
                      000005b2    0000004e     --HOLE--

    .text      0    00008000    00000b56    
                      00008000    0000024e     main.obj (.text:main)
                      0000824e    0000020c     mmc.obj (.text:mmcReadCardSize)
                      0000845a    0000009c     mmc.obj (.text:mmcReadBlock)
                      000084f6    0000009a     mmc.obj (.text:mmcWriteBlock)
                      00008590    00000082     mmc.obj (.text:mmcCheckBusy)
                      00008612    00000078     mmc.obj (.text:mmcSendCmd)
                      0000868a    00000072     mmc.obj (.text:mmcGoIdle)
                      000086fc    0000006e     rts430.lib : lsr32.obj (.text)
                      0000876a    00000066     hal_SPI.obj (.text:spiSendFrame)
                      000087d0    00000060     hal_SPI.obj (.text:spiReadFrame)
                      00008830    00000056     mmc.obj (.text:mmcInit)
                      00008886    00000054     mmc.obj (.text:mmcSetBlockLength)
                      000088da    0000004e     rts430.lib : lsl32.obj (.text)
                      00008928    0000004c                : lsr16.obj (.text)
                      00008974    00000040                : autoinit.obj (.text:_auto_init)
                      000089b4    0000003a     mmc.obj (.text:mmcGetXXResponse)
                      000089ee    00000038     mmc.obj (.text:mmcGetResponse)
                      00008a26    0000002c     rts430.lib : lsl16.obj (.text)
                      00008a52    0000002a                : exit.obj (.text:exit)
                      00008a7c    00000026                : mult32.obj (.text)
                      00008aa2    00000022                : args_main.obj (.text:_args_main)
                      00008ac4    0000001e                : boot.obj (.text:_c_int00)
                      00008ae2    0000001e     hal_SPI.obj (.text:spiSendByte)
                      00008b00    0000001a     hal_SPI.obj (.text:halSPISetup)
                      00008b1a    00000012     rts430.lib : memcpy.obj (.text:memcpy)
                      00008b2c    00000010     mmc.obj (.text:mmcPing)
                      00008b3c    00000010     rts430.lib : epilog.obj (.text)
                      00008b4c    00000004                : pre_init.obj (.text:_system_pre_init)
                      00008b50    00000004                : exit.obj (.text:abort)
                      00008b54    00000002                : _lock.obj (.text:_nop)

    .cinit     0    00008b56    0000003e    
                      00008b56    0000001a     main.obj (.cinit)
                      00008b70    0000000c     rts430.lib : _lock.obj (.cinit)
                      00008b7c    0000000c                : exit.obj (.cinit)
                      00008b88    00000005     mmc.obj (.cinit)
                      00008b8d    00000003     --HOLE-- [fill = 0]
                      00008b90    00000004     (.pad.cinit) [fill = 0]

    .reset     0    0000fffe    00000002    
                      0000fffe    00000002     rts430.lib : boot.obj (.reset)


    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

    address    name
    --------   ----
    00000000   .bss
    00008000   .text
    0000004a   ADC10AE0
    0000004b   ADC10AE1
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    00000057   BCSCTL1
    00000058   BCSCTL2
    00000053   BCSCTL3
    00008b50   C$$EXIT
    000010fb   CALBC1_12MHZ
    000010f9   CALBC1_16MHZ
    000010ff   CALBC1_1MHZ
    000010fd   CALBC1_8MHZ
    000010fa   CALDCO_12MHZ
    000010f8   CALDCO_16MHZ
    000010fe   CALDCO_1MHZ
    000010fc   CALDCO_8MHZ
    00000056   DCOCTL
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    00000000   IE1
    00000001   IE2
    00000002   IFG1
    00000003   IFG2
    00008a26   I_LSL
    00008a4e   I_LSL_1
    00008a3c   I_LSL_10
    00008a3a   I_LSL_11
    00008a38   I_LSL_12
    00008a36   I_LSL_13
    00008a34   I_LSL_14
    00008a32   I_LSL_15
    00008a4c   I_LSL_2
    00008a4a   I_LSL_3
    00008a48   I_LSL_4
    00008a46   I_LSL_5
    00008a44   I_LSL_6
    00008a42   I_LSL_7
    00008a40   I_LSL_8
    00008a3e   I_LSL_9
    00008928   I_LSR
    0000896e   I_LSR_1
    0000894a   I_LSR_10
    00008946   I_LSR_11
    00008942   I_LSR_12
    0000893e   I_LSR_13
    0000893a   I_LSR_14
    00008936   I_LSR_15
    0000896a   I_LSR_2
    00008966   I_LSR_3
    00008962   I_LSR_4
    0000895e   I_LSR_5
    0000895a   I_LSR_6
    00008956   I_LSR_7
    00008952   I_LSR_8
    0000894e   I_LSR_9
    000088da   L_LSL
    00008922   L_LSL_1
    000088fe   L_LSL_10
    000088fa   L_LSL_11
    000088f6   L_LSL_12
    000088f2   L_LSL_13
    000088ee   L_LSL_14
    000088ea   L_LSL_15
    0000891e   L_LSL_2
    0000891a   L_LSL_3
    00008916   L_LSL_4
    00008912   L_LSL_5
    0000890e   L_LSL_6
    0000890a   L_LSL_7
    00008906   L_LSL_8
    00008902   L_LSL_9
    000086fc   L_LSR
    00008762   L_LSR_1
    0000872c   L_LSR_10
    00008726   L_LSR_11
    00008720   L_LSR_12
    0000871a   L_LSR_13
    00008714   L_LSR_14
    0000870e   L_LSR_15
    0000875c   L_LSR_2
    00008756   L_LSR_3
    00008750   L_LSR_4
    0000874a   L_LSR_5
    00008744   L_LSR_6
    0000873e   L_LSR_7
    00008738   L_LSR_8
    00008732   L_LSR_9
    000000c0   OA0CTL0
    000000c1   OA0CTL1
    000000c2   OA1CTL0
    000000c3   OA1CTL1
    00000022   P1DIR
    00000025   P1IE
    00000024   P1IES
    00000023   P1IFG
    00000020   P1IN
    00000021   P1OUT
    00000027   P1REN
    00000026   P1SEL
    0000002a   P2DIR
    0000002d   P2IE
    0000002c   P2IES
    0000002b   P2IFG
    00000028   P2IN
    00000029   P2OUT
    0000002f   P2REN
    0000002e   P2SEL
    0000001a   P3DIR
    00000018   P3IN
    00000019   P3OUT
    00000010   P3REN
    0000001b   P3SEL
    0000001e   P4DIR
    0000001c   P4IN
    0000001d   P4OUT
    00000011   P4REN
    0000001f   P4SEL
    00000172   TACCR0
    00000174   TACCR1
    00000176   TACCR2
    00000162   TACCTL0
    00000164   TACCTL1
    00000166   TACCTL2
    00000160   TACTL
    0000012e   TAIV
    00000170   TAR
    00000192   TBCCR0
    00000194   TBCCR1
    00000196   TBCCR2
    00000182   TBCCTL0
    00000184   TBCCTL1
    00000186   TBCCTL2
    00000180   TBCTL
    0000011e   TBIV
    00000190   TBR
    0000005d   UCA0ABCTL
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    0000005f   UCA0IRRCTL
    0000005e   UCA0IRTCTL
    00000064   UCA0MCTL
    00000066   UCA0RXBUF
    00000065   UCA0STAT
    00000067   UCA0TXBUF
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006c   UCB0I2CIE
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000006e   UCB0RXBUF
    0000006d   UCB0STAT
    0000006f   UCB0TXBUF
    00000120   WDTCTL
    00000600   __STACK_END
    00000050   __STACK_SIZE
    ffffffff   __binit__
    00000000   __bss__
    ffffffff   __c_args__
    00008b56   __cinit__
    00000412   __end__
    00008b56   __etext__
    00008a7c   __mpyl
    ffffffff   __pinit__
    00008000   __text__
    00008aa2   _args_main
    00008974   _auto_init
    00008ac4   _c_int00
    0000040e   _cleanup_ptr
    00000410   _dtors_ptr
    0000040a   _lock
    00008b54   _nop
    0000fffe   _reset_vector
    000005b0   _stack
    00008b4c   _system_pre_init
    0000040c   _unlock
    00008b50   abort
    ffffffff   binit
    0000000a   buffer
    00000000   cardSize
    00008b56   cinit
    00000412   end
    00008b56   etext
    00008a52   exit
    00008b48   func_epilog_1
    00008b46   func_epilog_2
    00008b44   func_epilog_3
    00008b42   func_epilog_4
    00008b40   func_epilog_5
    00008b3e   func_epilog_6
    00008b3c   func_epilog_7
    00008b00   halSPISetup
    00000008   i
    00008000   main
    00008b1a   memcpy
    00008590   mmcCheckBusy
    000089ee   mmcGetResponse
    000089b4   mmcGetXXResponse
    0000868a   mmcGoIdle
    00008830   mmcInit
    00008b2c   mmcPing
    0000845a   mmcReadBlock
    0000824e   mmcReadCardSize
    00008612   mmcSendCmd
    00008886   mmcSetBlockLength
    000084f6   mmcWriteBlock
    0000020a   mmc_buffer
    ffffffff   pinit
    000087d0   spiReadFrame
    00008ae2   spiSendByte
    0000876a   spiSendFrame
    00000004   status
    00000006   timeout


    GLOBAL SYMBOLS: SORTED BY Symbol Address

    address    name
    --------   ----
    00000000   .bss
    00000000   IE1
    00000000   __bss__
    00000000   cardSize
    00000001   IE2
    00000002   IFG1
    00000003   IFG2
    00000004   status
    00000006   timeout
    00000008   i
    0000000a   buffer
    00000010   P3REN
    00000011   P4REN
    00000018   P3IN
    00000019   P3OUT
    0000001a   P3DIR
    0000001b   P3SEL
    0000001c   P4IN
    0000001d   P4OUT
    0000001e   P4DIR
    0000001f   P4SEL
    00000020   P1IN
    00000021   P1OUT
    00000022   P1DIR
    00000023   P1IFG
    00000024   P1IES
    00000025   P1IE
    00000026   P1SEL
    00000027   P1REN
    00000028   P2IN
    00000029   P2OUT
    0000002a   P2DIR
    0000002b   P2IFG
    0000002c   P2IES
    0000002d   P2IE
    0000002e   P2SEL
    0000002f   P2REN
    00000048   ADC10DTC0
    00000049   ADC10DTC1
    0000004a   ADC10AE0
    0000004b   ADC10AE1
    00000050   __STACK_SIZE
    00000053   BCSCTL3
    00000056   DCOCTL
    00000057   BCSCTL1
    00000058   BCSCTL2
    0000005d   UCA0ABCTL
    0000005e   UCA0IRTCTL
    0000005f   UCA0IRRCTL
    00000060   UCA0CTL0
    00000061   UCA0CTL1
    00000062   UCA0BR0
    00000063   UCA0BR1
    00000064   UCA0MCTL
    00000065   UCA0STAT
    00000066   UCA0RXBUF
    00000067   UCA0TXBUF
    00000068   UCB0CTL0
    00000069   UCB0CTL1
    0000006a   UCB0BR0
    0000006b   UCB0BR1
    0000006c   UCB0I2CIE
    0000006d   UCB0STAT
    0000006e   UCB0RXBUF
    0000006f   UCB0TXBUF
    000000c0   OA0CTL0
    000000c1   OA0CTL1
    000000c2   OA1CTL0
    000000c3   OA1CTL1
    00000118   UCB0I2COA
    0000011a   UCB0I2CSA
    0000011e   TBIV
    00000120   WDTCTL
    00000128   FCTL1
    0000012a   FCTL2
    0000012c   FCTL3
    0000012e   TAIV
    00000160   TACTL
    00000162   TACCTL0
    00000164   TACCTL1
    00000166   TACCTL2
    00000170   TAR
    00000172   TACCR0
    00000174   TACCR1
    00000176   TACCR2
    00000180   TBCTL
    00000182   TBCCTL0
    00000184   TBCCTL1
    00000186   TBCCTL2
    00000190   TBR
    00000192   TBCCR0
    00000194   TBCCR1
    00000196   TBCCR2
    000001b0   ADC10CTL0
    000001b2   ADC10CTL1
    000001b4   ADC10MEM
    000001bc   ADC10SA
    0000020a   mmc_buffer
    0000040a   _lock
    0000040c   _unlock
    0000040e   _cleanup_ptr
    00000410   _dtors_ptr
    00000412   __end__
    00000412   end
    000005b0   _stack
    00000600   __STACK_END
    000010f8   CALDCO_16MHZ
    000010f9   CALBC1_16MHZ
    000010fa   CALDCO_12MHZ
    000010fb   CALBC1_12MHZ
    000010fc   CALDCO_8MHZ
    000010fd   CALBC1_8MHZ
    000010fe   CALDCO_1MHZ
    000010ff   CALBC1_1MHZ
    00008000   .text
    00008000   __text__
    00008000   main
    0000824e   mmcReadCardSize
    0000845a   mmcReadBlock
    000084f6   mmcWriteBlock
    00008590   mmcCheckBusy
    00008612   mmcSendCmd
    0000868a   mmcGoIdle
    000086fc   L_LSR
    0000870e   L_LSR_15
    00008714   L_LSR_14
    0000871a   L_LSR_13
    00008720   L_LSR_12
    00008726   L_LSR_11
    0000872c   L_LSR_10
    00008732   L_LSR_9
    00008738   L_LSR_8
    0000873e   L_LSR_7
    00008744   L_LSR_6
    0000874a   L_LSR_5
    00008750   L_LSR_4
    00008756   L_LSR_3
    0000875c   L_LSR_2
    00008762   L_LSR_1
    0000876a   spiSendFrame
    000087d0   spiReadFrame
    00008830   mmcInit
    00008886   mmcSetBlockLength
    000088da   L_LSL
    000088ea   L_LSL_15
    000088ee   L_LSL_14
    000088f2   L_LSL_13
    000088f6   L_LSL_12
    000088fa   L_LSL_11
    000088fe   L_LSL_10
    00008902   L_LSL_9
    00008906   L_LSL_8
    0000890a   L_LSL_7
    0000890e   L_LSL_6
    00008912   L_LSL_5
    00008916   L_LSL_4
    0000891a   L_LSL_3
    0000891e   L_LSL_2
    00008922   L_LSL_1
    00008928   I_LSR
    00008936   I_LSR_15
    0000893a   I_LSR_14
    0000893e   I_LSR_13
    00008942   I_LSR_12
    00008946   I_LSR_11
    0000894a   I_LSR_10
    0000894e   I_LSR_9
    00008952   I_LSR_8
    00008956   I_LSR_7
    0000895a   I_LSR_6
    0000895e   I_LSR_5
    00008962   I_LSR_4
    00008966   I_LSR_3
    0000896a   I_LSR_2
    0000896e   I_LSR_1
    00008974   _auto_init
    000089b4   mmcGetXXResponse
    000089ee   mmcGetResponse
    00008a26   I_LSL
    00008a32   I_LSL_15
    00008a34   I_LSL_14
    00008a36   I_LSL_13
    00008a38   I_LSL_12
    00008a3a   I_LSL_11
    00008a3c   I_LSL_10
    00008a3e   I_LSL_9
    00008a40   I_LSL_8
    00008a42   I_LSL_7
    00008a44   I_LSL_6
    00008a46   I_LSL_5
    00008a48   I_LSL_4
    00008a4a   I_LSL_3
    00008a4c   I_LSL_2
    00008a4e   I_LSL_1
    00008a52   exit
    00008a7c   __mpyl
    00008aa2   _args_main
    00008ac4   _c_int00
    00008ae2   spiSendByte
    00008b00   halSPISetup
    00008b1a   memcpy
    00008b2c   mmcPing
    00008b3c   func_epilog_7
    00008b3e   func_epilog_6
    00008b40   func_epilog_5
    00008b42   func_epilog_4
    00008b44   func_epilog_3
    00008b46   func_epilog_2
    00008b48   func_epilog_1
    00008b4c   _system_pre_init
    00008b50   C$$EXIT
    00008b50   abort
    00008b54   _nop
    00008b56   __cinit__
    00008b56   __etext__
    00008b56   cinit
    00008b56   etext
    0000fffe   _reset_vector
    ffffffff   __binit__
    ffffffff   __c_args__
    ffffffff   __pinit__
    ffffffff   binit
    ffffffff   pinit

    [223 symbols]

  • I presume this output is from the CCE toolchain as it was not successful.

    The first thing to look at is the Memory Configuration.  This is what the linker command file included in your project communicated to the linker on the available memory resources of the specific device you are targeting.

    Leon Steenkamp said:

    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
      RAM                                    00000200   00000400   00000050   000003b0   RWIX
      INFOD                                00001000   00000040   00000000   00000040   RWIX
      INFOC                                00001040   00000040  00000000    00000040   RWIX
      INFOB                                 00001080   00000040  00000000   00000040   RWIX
      INFOA                                 000010c0    00000040  00000000   00000040   RWIX
      FLASH                                00008000   00007fde   00000b94    0000744a   RWIX
      INT00                                  0000ffe0     00000002  00000000   00000002   RWIX
      INT01                                  0000ffe2     00000002  00000000   00000002   RWIX
      INT02                                  0000ffe4     00000002  00000000   00000002   RWIX
      INT03                                  0000ffe6     00000002  00000000   00000002   RWIX
      INT04                                  0000ffe8     00000002  00000000   00000002   RWIX
      INT05                                  0000ffea     00000002  00000000   00000002   RWIX
      INT06                                  0000ffec     00000002  00000000   00000002    RWIX
      INT07                                  0000ffee    00000002   00000000   00000002    RWIX
      INT08                                  0000fff0      00000002  00000000   00000002    RWIX
      INT09                                  0000fff2      00000002  00000000   00000002    RWIX
      INT10                                  0000fff4      00000002  00000000   00000002    RWIX
      INT11                                  0000fff6       00000002  00000000  00000002    RWIX
      INT12                                  0000fff8       00000002  00000000  00000002    RWIX
      INT13                                  0000fffa       00000002  00000000  00000002    RWIX
      INT14                                  0000fffc        00000002  00000000  00000002    RWIX
      RESET                                0000fffe       00000002  00000002  00000000    RWIX

    Specifically, I would highlight the RAM line item.  This indicates that 0x400 of RAM is available (the length field), or 1024 bytes.  50 bytes have been allocated leaving 944 bytes available.
    This summary indicates what has been successfully allocated to the memory map of the MSP430.

     

    Leon Steenkamp said:


    SECTION ALLOCATION MAP

     output                                        attributes/
    section   page    origin             length           input sections
    --------      ----        ----------         ----------          ----------------
    .bss         0           00000000    00000412     FAILED TO ALLOCATE
    .pinit        0           00008000    00000000     UNINITIALIZED

    Now, please note the .bss section is currently 0x412 (or 1042) bytes in length.  This means the .bss section alone is larger than the available RAM memory.
    There may be a few factors that is contributing to this.  Any alignment pragmas that may force the linker to place variables in a certain alignment in memory can eat up space.
    Also, the C run-time library may be consuming resources.

  • BrandonAzbell said:
    Now, please note the .bss section is currently 0x412 (or 1042) bytes in length.  This means the .bss section alone is larger than the available RAM memory.
    There may be a few factors that is contributing to this.  Any alignment pragmas that may force the linker to place variables in a certain alignment in memory can eat up space.
    Also, the C run-time library may be consuming resources.

    Cool, that all makes sense. But as far as I can see there is no funny pre-processor or pragma directives so dont think its that. So it I guess its just that code was bigger then I thought. One question, there is the following two lines:

    #define SPI_PxSEL         P3SEL

    #define MMC_PxSEL         SPI_PxSEL

    After compilation would those two line effectively become?

    #define MMC_PxSEL        P3SEL

    with SPI_PxSEL being left out? Or would SPI_PxSEL still be there taking up space? Or am i completely missing the point and #defines dont even go in RAM?

    Thanks for the help,

    Leon

  • Leon Steenkamp said:

    One question, there is the following two lines:

    #define SPI_PxSEL         P3SEL
    #define MMC_PxSEL         SPI_PxSEL

    After compilation would those two line effectively become?

    #define MMC_PxSEL        P3SEL

    with SPI_PxSEL being left out? Or would SPI_PxSEL still be there taking up space? Or am i completely missing the point and #defines dont even go in RAM?

    Both SPI_PxSEL and MMC_PxSEL would be in the namespace and both would essentially equal P3SEL.

    The #define statements will not just consume memory until they are used in code or in a container like a variable.
    You can literally have many #define statements that may or may not get used. 

  • Nevermind, sorted out the #define stuff :)

**Attention** This is a public forum