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.

MSP430G2955: msp430g2955 code composer Studio

Part Number: MSP430G2955
Other Parts Discussed in Thread: DRV10983

Hello

I’m using a msp430g2955 in this case, my firmware is only in assembler and cover full memory , reamining only

A few byte free no more 10.   

 

I have 2 question

 

Question 1 ) 

I’m using from long time the iar embedded workbench and I compile without any problem

 

Now I want to use code composer studio version 10, to program in assembler and in with C in the future,

 

I have translate assemble program from Iar to code composer and for this, I need to cut the firmware  approxmately

1 kbye anyway I have this error

 

//*************************** START ******************************************//

 

"../lnk_msp430g2955.cmd", line 130: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment fails for section ".inizio_programma" size 0x890.  Available memory ranges:

   FLASH        size: 0xdede       unused: 0x440        max hole: 0x440    

 

The configuration memory file is so

 

 

MEMORY

{

    SFR                     : origin = 0x0000, length = 0x0010

    PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0

    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100

   /*RAM                    : origin = 0x1100, length = 0x1000 */

    RAM_DEF                  : origin = 0x1100, length = 0x00C0  /* 192 */

    RAM_LCD                  : origin = 0x11C0, length = 0x0400  /* 1024 */

    RAM                       : origin = 0x15C0, length = 0x0B40  /* 2880 BYTE */

 

    INFOA                   : origin = 0x10C0, length = 0x0040

    INFOB                   : origin = 0x1080, length = 0x0040

    INFOC                   : origin = 0x1040, length = 0x0040

    INFOD                   : origin = 0x1000, length = 0x0040

    FLASH                    : origin = 0x2100, length = 0xDEDE  /* 56686 BYTE */

    BSLSIGNATURE            : origin = 0xFFDE, length = 0x0002, fill = 0xFFFF

    INT00                   : origin = 0xFFE0, length = 0x0002

    INT01                   : origin = 0xFFE2, length = 0x0002

    INT02                   : origin = 0xFFE4, length = 0x0002

    INT03                   : origin = 0xFFE6, length = 0x0002

    INT04                   : origin = 0xFFE8, length = 0x0002

    INT05                   : origin = 0xFFEA, length = 0x0002

    INT06                   : origin = 0xFFEC, length = 0x0002

    INT07                   : origin = 0xFFEE, length = 0x0002

    INT08                   : origin = 0xFFF0, length = 0x0002

    INT09                   : origin = 0xFFF2, length = 0x0002

    INT10                   : origin = 0xFFF4, length = 0x0002

    INT11                   : origin = 0xFFF6, length = 0x0002

    INT12                   : origin = 0xFFF8, length = 0x0002

    INT13                   : origin = 0xFFFA, length = 0x0002

    INT14                   : origin = 0xFFFC, length = 0x0002

    RESET                   : origin = 0xFFFE, length = 0x0002

}

 

/****************************************************************************/

/* Specify the sections allocation into memory                              */

/****************************************************************************/

 

SECTIONS

{

    .bss        : {} > RAM                  /* Global & static vars              */

    .data       : {} > RAM                  /* Global & static vars              */

    .TI.noinit  : {} > RAM                  /* For #pragma noinit                */

    .sysmem     : {} > RAM                  /* Dynamic memory allocation area    */

    .stack      : {} > RAM (HIGH)           /* Software system stack             */

 

    .text       : {} > FLASH                /* Code                              */

    .cinit      : {} > FLASH                /* Initialization tables             */

    .const      : {} > FLASH                /* Constant data                     */

    .bslsignature  : {} > BSLSIGNATURE      /* BSL Signature                     */

    .cio        : {} > RAM                  /* C I/O Buffer                      */

 

    .pinit      : {} > FLASH                /* C++ Constructor tables            */

    .binit      : {} > FLASH                /* Boot-time Initialization tables   */

    .init_array : {} > FLASH                /* C++ Constructor tables            */

    .mspabi.exidx : {} > FLASH              /* C++ Constructor tables            */

    .mspabi.extab : {} > FLASH              /* C++ Constructor tables            */

#ifdef __TI_COMPILER_VERSION__

  #if __TI_COMPILER_VERSION__ >= 15009000

    #ifndef __LARGE_CODE_MODEL__

    .TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)

    #else

    .TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)

    #endif

  #endif

#endif

 

/******* AGGIUNTA **************************/

       .ram_default        : {} > RAM_DEF                  /* RAM ZONA DEI DEFAULT */

       .ram_lcdzone        : {} > RAM_LCD                  /* RAM ZONA LCD */

 

       .valori_default_D   : {} > INFOD              /* RAM ZONA LCD */

       .valori_default_C   : {} > INFOC              /* RAM ZONA LCD */

       .valori_default_B   : {} > INFOB              /* RAM ZONA LCD */

       .inizio_programma   : {} > FLASH              /* RAM dove inizia il programma  */

 

 

/*************************************************/

 

    .infoA     : {} > INFOA              /* MSP430 INFO FLASH Memory segments */

    .infoB     : {} > INFOB

    .infoC     : {} > INFOC

    .infoD     : {} > INFOD

 

    /* MSP430 Interrupt vectors          */

    TIMER1_A1_a    : { * ( .int00 ) } > INT00 type = VECT_INIT

    TIMER1_A0_a    : { * ( .int01 ) } > INT01 type = VECT_INIT

    PORT1_a        : { * ( .int02 ) } > INT02 type = VECT_INIT

    PORT2_a        : { * ( .int03 ) } > INT03 type = VECT_INIT

    TRAPINT_a      : { * ( .int04 ) } > INT04 type = VECT_INIT

    ADC10_a        : { * ( .int05 ) } > INT05 type = VECT_INIT

    USCIAB0TX_a    : { * ( .int06 ) } > INT06 type = VECT_INIT

    USCIAB0RX_a    : { * ( .int07 ) } > INT07 type = VECT_INIT

    TIMER0_A1_a    : { * ( .int08 ) } > INT08 type = VECT_INIT

    TIMER0_A0_a    : { * ( .int09 ) } > INT09 type = VECT_INIT

    WDT_a          : { * ( .int10 ) } > INT10 type = VECT_INIT

    COMPARATORA_a  : { * ( .int11 ) } > INT11 type = VECT_INIT

    TIMERB1_a      : { * ( .int12 ) } > INT12 type = VECT_INIT

    TIMERB0_a      : { * ( .int13 ) } > INT13 type = VECT_INIT

    NMI_a          : { * ( .int14 ) } > INT14 type = VECT_INIT

       .reset          : {}               > RESET  /* MSP430 Reset vector         */

}

 

 

/****************************************************************************/

/* Include peripherals memory map                                           */

/****************************************************************************/

 

-l msp430g2955.cmd

 

//************************** END *******************************************//

 

 

Honestly I don’t understand why the compiler give me this error and why one portion of memory is unused and is not possible to use

FLASH        size: 0xdede       unused: 0x440        max hole: 0x440    

 

 

Question 2 ) 

 After I had reduced the size of firmware the compiler have compile well for many time without any problem, but at certain point showed me this error and not compile more,

I don't know why, I have closed the program and reopen code composer,   after I had open again not compile more.

//************************** start  *******************************************//

 

 

*** Build of configuration Debug for project el_0006_18_v0601_2955 ****

 

"C:\\ti\\ccs1030\\ccs\\utils\\bin\\gmake" -k -j 4 all -O

 

Building file: "../messaggi_di_testo.ASM"

Invoking: MSP430 Compiler

"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-msp430_20.2.4.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --include_path="C:/ti/ccs1030/ccs/ccs_base/msp430/include" --include_path="C:/FIRMWARE/Code_Composer_V8/el_0006_18_v0601_2955/work" --include_path="C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-msp430_20.2.4.LTS/include" --advice:power="all" --define=__MSP430G2955__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="messaggi_di_testo.d_raw"  "../messaggi_di_testo.ASM"

Finished building: "../messaggi_di_testo.ASM"

 

Building target: "el_0006_18_v0601_2955.out"

Invoking: MSP430 Linker

"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-msp430_20.2.4.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --advice:power="all" --define=__MSP430G2955__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number -z -m"el_0006_18_v0601_2955.map" --heap_size=0 --stack_size=0 --cinit_hold_wdt=on -i"C:/ti/ccs1030/ccs/ccs_base/msp430/include" -i"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-msp430_20.2.4.LTS/lib" -i"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-msp430_20.2.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="el_0006_18_v0601_2955_linkInfo.xml" --entry_point=RESET --use_hw_mpy=none -o "el_0006_18_v0601_2955.out" "./ANALOGICHE.obj" "./CALIBRI_10.obj" "./CARICA_TESTI_LCD.obj" "./CICLO.obj" "./CONV_NUM_ASCII.obj" "./COSTANTI.obj" "./DEFAULT.obj" "./DEFAULT_LOAD.obj" "./FACTORY_SETTING.obj" "./FUNZIONE_BLACK_OUT.obj" "./FUNZIONE_HOLD.obj" "./GESTIONE_DRV10983.obj" "./GEST_ALARM.obj" "./I2CBUS.obj" "./MASCHERE_LCD.obj" "./MATEMATICHE.obj" "./MINI_SIMBOLI.obj" "./PICCHI_TEMPER.obj" "./SETTING.obj" "./SPI_SONDE.obj" "./TOUTCH_PANEL.obj" "./UTILITY.obj" "./VECTOR_SEG.obj" "./VETTORI_TIMER.obj" "./VISUALIZZAZIONI.obj" "./inizializza_LCD.obj" "./macro.obj" "./macro_lcd_128x64.obj" "./main.obj" "./messaggi_di_testo.obj" "./random_memory.obj" "./terminal_14.obj" "../lnk_msp430g2955.cmd"  -llibc.a

<Linking>

 

 undefined first referenced

  symbol       in file    

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

 RESET                    

 

error #10234-D: unresolved symbols remain

warning #10062-D: entry-point symbol "RESET" undefined

warning #10202-D: no suitable entry-point found; setting to 0

error #10010: errors encountered during linking; "el_0006_18_v0601_2955.out" not built

 

>> Compilation failure

makefile:172: recipe for target 'el_0006_18_v0601_2955.out' failed

gmake[1]: *** [el_0006_18_v0601_2955.out] Error 1

makefile:168: recipe for target 'all' failed

gmake: *** [all] Error 2

 

**** Build Finished ****

 

 

//************************** END *******************************************//

 

 

I try to find error but nothing, the symbol RESET is only here

    RESET                   : origin = 0xFFFE, length = 0x0002

And  Here

.reset             : {}               > RESET  /* MSP430 Reset vector        

 

I don’t fine any other RESET symbol , and don’t have undefinited symbol

On the files are not show any error

 

I’m not expert in code composer but I have try to make many action without success

How I can find the undefinited Symbol ?

thank you 

 Luigi 

  • Hi Luigi,

    To answer the first question,

    For your second question, the build should have generated a ".map" file.

    Search for "reset".  Do you find something like this?

  • Hi Dennis

    thank you for your reply 

    now Compile right but the program do not running I will check why. 

    t ocompile i must reduce the firmware 

    my code is only assembler not C code, my processor is msp430g2955

    Is normal that with from Iar to Code composer the optmimizzation is 

    so different?

    with iar my full firmware start from 2100 and finish to 0xFFCE

    to compile with code composer  the same code I must reduce it almost for 4 kb 

    is normal ? 

    Luigi 

  • Hi Luigi,

    That doesn't sound right.  It's true that the CCS compiler may not create as small code footprint as IAR, but 4kb is a big difference.

  • HDenis 

    I calculate bettert, the space lost is from 2.5k and 3 kb not 4 kb sorry for bad information , but i think are the same a lot and not justified

    because my code is only in assembler so is not possible.

    I have in my code 5 languages and have disabled 4 languages to compile right, for 25. to 3 k. 

    I have cheched also how the ccs compile, and all address are consecutive, example 

    my structure have many files in base at the function, 

    file 1    start to 0x2100 and finish  0x222F

    file 2  start 0x2230  and so on, so is right  

    I have also some include file and are compile with consecutive address.

    i don't find in the memory the free space zone.

     

    there is some setting to optimize the code ? I have not found it  

    Best Regards 

    Luigi  

  • Hi Denis 

    I found the problem,
    I have used the directive .include so some routine I have insert in the program like include because I want consecutive program and not call or branch, I used directive .include , in a portion of my program i put
    .include " targer.asm", I inadvertently have copying the same file inside the program tree with name target.asm.
    the compiler don't give me any error and compiled both files, also if had the same name and same label.
    I think is because with iar is not necessary to declare nothing
    and with ccs if are not declared like .def .global etc are local declaration and don't see of the rest of the program.
    I see also that form translation from iar to ccs there are some mistake because the iar knowing the /* before comment and */ at the end of the comment, example
    /* this is all commet
    this is all commet
    this is all commet
    */ until here is all comment,
    /* simbol for open comment line
    */simbol for closing comment line

    ccs don't know this structure so if is disabled the code in this manner in the ccs is compiled, example:
    */ cmp.w ...
    jeq.... in iar is not compile, ccs is compiled
    bit.b.... in iar is not compile, ccs is compiled
    mov.w in iar is not compile, ccs is compiled
    */
    sorry for mistake and thank you for your cooperation

**Attention** This is a public forum