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.

"Placement fails for object ".text" error message?

Other Parts Discussed in Thread: MSP430F2001, MSP430G2231, MSP430F235

Hi Folks,

 

Can some kind soul shine some light on the above error message?  I'm using the latest version of Code Composer (V4.1.1.00014) and my target is a MSP430F2001.  This program compiled just fine on IAR Kickstart.  I was getting some weird errors so I thought that I'd try the CCS to see if maybe my Olimex JTAG box was the culprit.

 

Thanks,

 

Richard

Lake Forest, CA USA

  • Hi Richard,

    can you provide more details on the code your're using? Without details it is nearly impossible to help you since IAR supports some things which you need to change when using CCS (i.e. placing code/data at a fixed address).

    Rgds
    aBUGSworstnightmare 

  • I have the same problem, using Code Composer Studio Version 4.1.2.00027, the free version, and the MSP430G2231 that was included with the Launchpad development kit.  

    I think that it is related to memory somehow.  I am displaying an image that I have created using a bitmap to binary converter on an LCD.  My LCD is 128 x 32 pixels, and when I make full screen pictures the files are 3.31 KB.  I can fit two of these into a header file, plus two smaller (20 x 16 pixels) pictures in the header file, and my code.  When I compile it works great, and the compiler informs me that 

    "Code Size - Text: 912 bytes  Data: 1112 bytes"

    When I try to load a very slightly larger image, 40 x 16 pixels, it gives me this error: 

    Severity and Description Path Resource Location Creation Time Id

    placement fails for object ".text", size 0x390 (page 0).  Available ranges: FLASH        size: 0x7e0        unused: 0x368        max hole: 0x368 prototype1 line 0 1302129359254 1127

    Before I declared these variables as 'const' it gave me a similar error, except with 'Available ranges: RAM' instead of 'FLASH'.  This leads me to believe it is memory.  I think that I might be declaring the variables as bytes instead of words, so that might be costing me some RAM, but ultimately I need to add a lookup table as well, so I'm gonna need a lot more memory if that's my problem. 
    My question is: Do I need to buy a chip with more memory, or do I need to buy an actual license to CCS to access more memory?  Or do I need to do both?
    Below is my code, thanks for the help!
    Doug
    //Test program to display a small picture repeatedly, or gibberish, to an NHD-C12832A1Z-NSW-FBW-3V3
    // using a TI MSP430G2231 with launchpad development kit.  Since the memory on the uC is only 16 kB the picture 
    // size chosen is small.
    // Written using Code Composer Studio, so no bitwise operations are available
    #include <msp430g2231.h>
    #include "picture.h"
    void ConfigWDT(void);
    void ConfigClocks(void);
    void FaultRoutine(void);
    void delay(unsigned int n);
    void data_out(unsigned char i);
    void comm_out(unsigned char j);
    void sendChar(unsigned char k);
    void dispsmallPic(const unsigned char *lcd_string);
    void dispNumber(const unsigned char *lcd_string);
    void FaultRoutine(void);
    void init_LCD(void);
    void InitializeButton(void);
    void deadMan(void);
    //Assign pinouts for the functions of the LCD
    #define RES (0x04) //BIT2
    #define CS  (0x10) //BIT4
    #define A0  (0x80) //BIT7
    #define SCL (0x20) //BIT5
    #define SDA (0x40) //BIT6
    #define BUT (0x08) //BIT3
    #define COUNT 4000
    // Bitwise operations are performed using masks since bitwise operations are not 
    // available in Code Composer Studio
    int main(void)
    {
    ConfigWDT();
    ConfigClocks(); //set the clock to ~ 8 MHz
    P1OUT = 0xFF; //set all outputs to 1
    P1DIR = CS + RES + A0 + SCL + SDA; //Turn on outputs
     __enable_interrupt();                     // Enable interrupts.
    P1OUT &= ~RES; //reset the display to remove transients
    delay(1);
    P1OUT|= RES;
    delay(1); //wait for hardware reset, at least 2ms
    init_LCD(); //initialize LCD
    dispsmallPic(marki); //display pic/gibberish
    __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled
    }
    }
    void ConfigWDT(void)
     {
     WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
     }
    void ConfigClocks(void)
     {
     if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF)                                       
       FaultRoutine();                    // If calibration data is erased
                                 // run FaultRoutine()
      BCSCTL1 = RSEL3 + RSEL1 + RSEL0; // Set range
      DCOCTL = DCO1 + DCO0;   // Set DCO step + modulation 
      BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO
      IFG1 &= ~OFIFG;                           // Clear OSCFault flag
      BCSCTL2 |= SELM_0 + DIVM_0 + DIVS_0;      // MCLK = DCO, SMCLK = DCO
     }
     
    void FaultRoutine(void)
     {
       P1OUT = BIT0;                            // P1.0 on (red LED)
       while(1);                    // TRAP
     }
     
    void delay(unsigned int n)
    {
    unsigned int i,j;
    for (i=0;i<n;i++){
    for (j=0;j<100;j++) //shorter delay was better for debugging
    {;}
    }
    }
    void sendChar(unsigned char k)
    {
    unsigned int n; //character delay loop
    unsigned char l; //necessary for bitwise workaround
    P1OUT &= ~CS; // chip select = 0
    for(n=0; n<8; n++){
    P1OUT &= ~SCL; //SCL = 0
    l = (k & 0x80); //Use k to move desired data bit 
    l >>= 1; // to P1OUT bit 6
    P1OUT = (P1OUT & 0xBF)| l; // clear that bit, and set it with k
    P1OUT |= SCL; //SCL = 1
    k <<=1;
    }
    P1OUT |= CS; //chip select = 1
    }
    void data_out(unsigned char i)
    {
    P1OUT |= A0; //A0 = 1
    sendChar(i);
    }
    void comm_out(unsigned char j)
    {
    P1OUT &= ~A0; //A0 = 0
    sendChar(j);
    }
    void dispsmallPic(const unsigned char *lcd_string)
    {
    unsigned int i,j;
    unsigned char page = 0xB0; //select the beginning of the display memory
    comm_out(0xAE); //Display OFF
    comm_out(0x40); //Display start address + 0x40
    for(i=0; i<4;i++){ //32 pixel display / 8 pixels per page = 4 pages
    comm_out(page); //send page address
    comm_out(0x10); //column address upper 4 bits + 0x10
    comm_out(0x00); //column address lower 4 bits + 0x00
    for(j=0;j<128;j++){ //64 bits wide so we can send two characters
    data_out(*lcd_string); //send some gibberish
    lcd_string++; //point to next picture data
    }
    page ++;
    }
    comm_out(0xAF); //Display ON
    }
    void dispNumber(const unsigned char *lcd_string)
    {
    unsigned int i,j;
    unsigned char page = 0xB0; //select the beginning of the display memory
    comm_out(0xAE); //Display OFF
    comm_out(0x40); //Display start address + 0x40
    for(i=0; i<2;i++){ //32 pixel display / 8 pixels per page = 4 pages
    comm_out(page); //send page address
    comm_out(0x10); //column address upper 4 bits + 0x10
    comm_out(0x00); //column address lower 4 bits + 0x00
    for(j=0;j<20;j++){ //64 bits wide so we can send two characters
    data_out(*lcd_string); //send some gibberish
    lcd_string++; //point to next picture data
    }
    page ++;
    }
    comm_out(0xAF); //Display ON
    }
    void init_LCD() 
    {
    comm_out(0xA0); //RAM->SEG output = normal
    comm_out(0xAE); //Display OFF
    comm_out(0xC0); //COM scan direction = normal
    comm_out(0xA2); //1/9 bias
    comm_out(0x2F); //power control set
    comm_out(0x21); //resistor ratio set
    comm_out(0x81); //Electronic volume command (set contrast)
    comm_out(0x2F); //Electronic volume value (contrast value)
    }
    void InitializeButton(void)
    {
    P1DIR &= ~BUT;
       P1OUT |= BUT;
       P1REN |= BUT;
       P1IES |= BUT;
       P1IFG &= ~BUT;
       P1IE |= BUT;
    }
    void deadMan(void)
    {
    dispsmallPic(respawn);
    dispNumber(ten);
    delay(COUNT);
    dispNumber(eight);
    delay(COUNT);
    dispNumber(six);
    delay(COUNT);
    dispNumber(four);
    delay(COUNT);
    dispNumber(two);
    delay(COUNT);
    dispsmallPic(marki);
    }
    /* *************************************************************
     * Port Interrupt for Button Press 
     * 1. During standby mode: to exit and enter application mode
     * 2. During application mode: to recalibrate temp sensor 
     * *********************************************************** */
    #pragma vector=PORT1_VECTOR
    __interrupt void PORT1_ISR(void)
    {   
      BUTTON_IFG = 0;  
      BUTTON_IE &= ~BUTTON;            /* Debounce */
      WDTCTL = WDT_ADLY_250;
      IFG1 &= ~WDTIFG;                 /* clear interrupt flag */
      IE1 |= WDTIE;  
        
      deadMan();   
    }
    #pragma vector=WDT_VECTOR
    __interrupt void WDT_ISR(void)
    {
        IE1 &= ~WDTIE;                   /* disable interrupt */
        IFG1 &= ~WDTIFG;                 /* clear interrupt flag */
        WDTCTL = WDTPW + WDTHOLD;        /* put WDT back in hold state */
        BUTTON_IE |= BUTTON;             /* Debouncing complete */
    }
    #ifndef PICTURE_H_
    #define PICTURE_H_
    ///////////////////////////////////////////////////////////////////////////////////
    const unsigned char marki [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFC, 0x02, 0x02, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1C, 0x02,
    0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x24, 0xF4, 0xF4, 0xF0, 0x80, 0x00, 0x10, 0x30, 0x30, 0x30, 0x60, 0xE0, 0xC0,
    0xC0, 0x9C, 0xFC, 0xFC, 0xFC, 0xC0, 0x00, 0x70, 0x70, 0x70, 0x30, 0x30, 0x30, 0x20, 0x70, 0xF0,
    0xF0, 0xE0, 0x00, 0x60, 0xE0, 0xF0, 0xF0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xA0, 0xA0,
    0x00, 0x3C, 0xFC, 0xFC, 0xFC, 0xCC, 0x1C, 0x3C, 0x78, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0xE0,
    0xF8, 0xFC, 0xFC, 0x3C, 0x0C, 0x7C, 0xFC, 0xFC, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10,
    0x1F, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00,
    0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07, 0x07, 0x00, 0x00, 0x04, 0x06, 0x07, 0x07, 0x07, 0x03,
    0x01, 0x00, 0x00, 0x07, 0x07, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
    0x07, 0x07, 0x07, 0x00, 0x07, 0x07, 0x07, 0x07, 0x02, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07,
    0x07, 0x00, 0x01, 0x07, 0x07, 0x87, 0x86, 0x80, 0x80, 0x80, 0x81, 0x41, 0x43, 0x47, 0x87, 0x07,
    0x07, 0xC1, 0x20, 0x10, 0x10, 0x20, 0xC3, 0x87, 0x07, 0x07, 0x04, 0x00, 0x00, 0xF4, 0x0B, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x20, 0x10, 0x30, 0x40,
    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04,
    0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1C, 0x30, 0x60, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1E, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x20, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00
    };
    const unsigned char respawn [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10,
    0x20, 0xF0, 0x10, 0x00, 0x70, 0x90, 0x00, 0x80, 0x60, 0x80, 0x00, 0x90, 0x70, 0x10, 0x00, 0x00,
    0xE0, 0x90, 0x90, 0x90, 0x90, 0xA0, 0x00, 0x00, 0x00, 0xC0, 0x20, 0x10, 0x10, 0x10, 0x20, 0xF0,
    0x10, 0x00, 0x00, 0x00, 0x30, 0xA0, 0x90, 0x90, 0x90, 0x90, 0x60, 0x00, 0x00, 0x00, 0xC0, 0xA0,
    0x90, 0x90, 0x90, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x38, 0x44, 0xC4, 0x44, 0x44, 0xFC, 0x04, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x04, 0x00, 0x00,
    0x04, 0x07, 0x04, 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04,
    0x07, 0x02, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x22, 0x3F,
    0x20, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x00, 0x00, 0x00, 0x02, 0x04,
    0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x04, 0x06, 0x01, 0x00, 0x00, 0x04, 0x07, 0x04, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40,
    0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x40, 0x40, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x10,
    0x00, 0x00, 0x10, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    const unsigned char ten [] = {
    0x00, 0x00, 0xC0, 0xF0, 0x10, 0x18, 0x18, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF0, 0x60,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x3F, 0x20, 0x60, 0x60, 0x30, 0x1F, 0x00, 0x00, 0x00,
    0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    const unsigned char eight [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0xCC, 0xCC, 0xC6, 0xC6, 0xCC, 0xCC, 0x78, 0x30, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x31, 0x20, 0x20, 0x20, 0x20,
    0x31, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    const unsigned char six [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xCC, 0x44, 0x44, 0xCC, 0xF8, 0xF0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x10, 0x18, 0x0F,
    0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    const unsigned char four [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x38, 0x70, 0xC0, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3F, 0x3F, 0x04, 0x04, 0x05,
    0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    const unsigned char two [] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCC, 0x84, 0x04, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x11, 0x11, 0x13, 0x1E,
    0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    #endif /*PICTURE_H_*/

  • Doug Jorgesen said:

    My question is: Do I need to buy a chip with more memory, or do I need to buy an actual license to CCS to access more memory?  Or do I need to do both?

    You'll need a chip with more flash.  The MSP430G2231 has only 2KB of flash.  The free version of CCS apparently lets you go up to 16KB, which seems like plenty for you.

    Jeff


  • Thanks, I'll try out the MSP430F235 and see how it goes.

  • If you want to see how much of the flash your program uses please enable .map file generation

    Project|properties|C/C++Build|MSP430Linker|Basic Options "Input and output sections listed into <file>

    Inside the file you will see space occupied for each section, e.g.:

    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 00004000 0000158e 00002a72 RWIX
    FLASH                  00005c00 0000a380 00001c02 0000877e RWIX

     

    Regards,
    Piotr Romaniuk, Ph.D.
    ELESOFTROM

  • Richard Cooke said:
      I'm using the latest version of Code Composer (V4.1.1.00014) and my target is a MSP430F2001.  This program compiled just fine on IAR Kickstart.

    If you are able to compile it by IAR, it may be a case of compiler options.
    Please try set optimization for size:

    Project|Properties|C/C++Build|MSP430Compiler|BasicOptions

    Control speed vs. size trade-offs (0-size, 5-speed).

    Regards,
    Piotr Romaniuk, Ph.D.
    ELESOFTROM

     

  • Thanks for the details, I didn't know about that option Piotr.  

    That raises another question: when I give the compiler a list of bytes like I have in my program to store as a const, does it store them in bytes or words?  

     

    In other words, would I double my memory by rewriting the variables as words and adjusting my program accordingly?

  • No, the compiler stores them as bytes because you declared the "type" of the array to be unsigned char.  You wouldn't be able to gain any memory efficiency by storing your data as words.

    Jeff

**Attention** This is a public forum