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 5.3, MSP430F2272 links in debug but nor release config

Other Parts Discussed in Thread: MSP430F2272, MSP430F2232

I am using a MSP430f2272  on a custom board using CCS 5.3.0.00083.    I can build run and debug the application fine in “Build Configuration->Set Active ->Debug” mode but I can’t build and link in “Build Configuration->Set Active ->release” mode.  The project originally started out with a MSP430F2232 and we upgraded to a MSP430F2272 for more flash.  I have gone through every config screen in the CCS build “properties” and I have yet to find any difference in the configuration that would cause the release build / link to fail.  I can confirm that both debug and release use MSP340F2272 as a variant and the linker command file is lnk_msp430f2272.cmd for both debug and release. 

I know the release compile works because I see the .PP files in the release folder but the link fails.  Here is the errors I get:  Any ideas on why me release build won’t link?  What should I check?

'Invoking: MSP430 Linker'

"C:/ccs5p3_float/ccsv5/tools/compiler/msp430_4.1.3/bin/cl430" -vmsp --abi=eabi -O2 --advice:power=all --define=__MSP430F2272__ --diag_warning=225 --display_error_number --printf_support=minimal -z --stack_size=80 -m"eraseApplication.map" --heap_size=80 -i"C:/ccs5p3_float/ccsv5/ccs_base/msp430/include" -i"C:/ccs5p3_float/ccsv5/tools/compiler/msp430_4.1.3/lib" -i"C:/ccs5p3_float/ccsv5/tools/compiler/msp430_4.1.3/include" --reread_libs --warn_sections --display_error_number --rom_model -o "eraseApplication.out" -l"./configPkg/linker.cmd"  "./utils.obj" "./timer.obj" "./rs232.obj" "./main.obj" "./io.obj" "./ints.obj" "./i2c.obj" "./globals.obj" "./cmd_parser.obj" "./adc.obj" -l"libc.a"

<Linking>

warning #10247-D: creating output section ".bss" without a SECTIONS

   specification

warning #10247-D: creating output section ".data" without a SECTIONS

   specification

warning #10247-D: creating output section ".int02" without a SECTIONS

   specification

warning #10247-D: creating output section ".int03" without a SECTIONS

   specification

warning #10247-D: creating output section ".int05" without a SECTIONS

 

   specification

warning #10247-D: creating output section ".int06" without a SECTIONS

   specification

warning #10247-D: creating output section ".int07" without a SECTIONS

   specification

warning #10247-D: creating output section ".int08" without a SECTIONS

   specification

warning #10247-D: creating output section ".int09" without a SECTIONS

   specification

warning #10247-D: creating output section ".int10" without a SECTIONS

   specification

warning #10247-D: creating output section ".int12" without a SECTIONS

>> Compilation failure

   specification

warning #10247-D: creating output section ".int13" without a SECTIONS

   specification

warning #10247-D: creating output section ".int14" without a SECTIONS

   specification

warning #10247-D: creating output section ".reset" without a SECTIONS

   specification

warning #10247-D: creating output section ".stack" without a SECTIONS

   specification

warning #10247-D: creating output section ".text" without a SECTIONS

   specification

warning #10247-D: creating output section ".cinit" without a SECTIONS

   specification

 

 undefined    first referenced

  symbol          in file    

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

 ADC10AE0     ./adc.obj      

 ADC10AE1     ./adc.obj      

 ADC10CTL0    ./adc.obj      

 ADC10CTL1    ./adc.obj      

 ADC10DTC0    ./adc.obj      

 ADC10DTC1    ./adc.obj      

 ADC10SA      ./adc.obj      

 BCSCTL1      ./utils.obj    

 BCSCTL2      ./utils.obj    

 BCSCTL3      ./utils.obj    

 CALBC1_16MHZ ./utils.obj    

 CALBC1_8MHZ  ./utils.obj    

 CALDCO_16MHZ ./utils.obj    

 CALDCO_8MHZ  ./utils.obj    

 DCOCTL       ./utils.obj    

 IE2          ./rs232.obj    

 IFG2         ./i2c.obj      

 P1DIR        ./io.obj       

 P1IE         ./io.obj       

 P1IES        ./io.obj       

 P1IFG        ./io.obj       

 P1IN         ./utils.obj    

 P1OUT        ./io.obj       

 P1REN        ./io.obj       

 P1SEL        ./io.obj       

 P2DIR        ./io.obj       

 P2IE         ./io.obj       

 P2IES        ./io.obj       

 P2IFG        ./io.obj       

 P2OUT        ./main.obj     

 P2REN        ./io.obj       

 P2SEL        ./io.obj       

 P3DIR        ./io.obj       

 P3OUT        ./io.obj       

 P3REN        ./io.obj       

 P3SEL        ./rs232.obj    

 P4DIR        ./io.obj       

 P4IN         ./main.obj     

 P4OUT        ./main.obj     

 P4REN        ./io.obj        

 P4SEL        ./io.obj       

 TACCR0       ./timer.obj    

 TACCTL0      ./timer.obj    

 TACTL        ./timer.obj    

 UCB0BR0      ./i2c.obj      

 UCB0BR1      ./i2c.obj      

 UCB0CTL0     ./i2c.obj      

 UCB0CTL1     ./i2c.obj      

 UCB0I2CIE    ./i2c.obj      

 UCB0I2COA    ./i2c.obj      

 UCB0I2CSA    ./i2c.obj      

 UCB0RXBUF    ./i2c.obj      

 UCB0STAT     ./i2c.obj      

 UCB0TXBUF    ./i2c.obj      

 WDTCTL       ./utils.obj    

 

error #10234-D: unresolved symbols remain

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

   built

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

gmake: Target `all' not remade because of errors.

 

**** Build Finished ****

 

  • Doug Baker said:
    I can confirm that both debug and release use MSP340F2272 as a variant and the linker command file is lnk_msp430f2272.cmd for both debug and release.

    Looking at the linker command which fails I can't see lnk_msp430f2272.cmd being used for the failed release link.

    Instead, the only linker command file I see on the failed release link is:

    -l"./configPkg/linker.cmd"
    Note that the linker command file ./configPkg/linker.cmd is prefixed with -l which means it is treated as a library file and NOT a linker command file. All the warnings about missing SECTIONS specifications and errors about unresolved symbols are caused by the linker not being given a linker command file.

    Under CCS Project Properties -> General -> Main is the "Linker command file:" shown as lnk_msp430f2272.cmd when the Configuration is selected as both Debug and Release?

  • I can confirm the following: 

    Under CCS Project Properties -> General -> Main is the "Linker command file:" shown as lnk_msp430f2272.cmd when the Configuration is selected as both Debug and Release?

  • Doug,

    Chester is correct in his analysis. For some reason, the linker command file lnk_msp430f2272.cmd is not getting picked up by the linker for the Release build.

    Is this a Grace project? If so, the presence of -l"./configPkg/linker.cmd" is fine, but the .cmd also needs to be linked in also.

    I wonder if there was a bug in CCS 5.3 that caused this behavior. If you are in a position to install and try out CCS 5.5 (from http://processors.wiki.ti.com/index.php/Download_CCS) I would suggest you do so. If that is not immediately feasible, and you are willing to zip up and share your project with us, we could take a look and see if the issue is reproducible at our end as well.

  • The project originally started out as a msp430f2232 Grace project.  With time the code space outgrew the flash that 2232 had so we went to a 2272 for more flash.   Later I basically stopped using the grace util and no longer called the source the grace sets up and did everything the "old way" by hand.  I never did a release build since I had no need to till now so I don't know what broke and when of if the release build ever worked from the start.  I never had a problem with the debug build so I thought everything was OK with the project

    I decided to start clean and create a new project without grace and add my source back in and now everything is working for debug and release.  I could zip up the project that can't build the release and send the source but I can't publicly post it.   Another option is to debug the problem is I take the project and pull out some code to make it more generic and post that.

    Doug

  • Doug Baker said:
    I decided to start clean and create a new project without grace and add my source back in and now everything is working for debug and release.

    Glad to hear that everything is working now. There was probably something in the move from a Grace project to one without Grace components that may have messed up the Release build configuration (I suspect some changes that were made to the Debug config were not made exactly the same way to the Release config). If you are still interested in pursuing what went wrong with the original project you can send me the project offline (I can send you a friend request and start a private conversation). Let me know if you would still like to pursue this.

  • I can zip it and send it to you to look at.  It's probably worth it to understand what is wrong so in the future I can fix it or if someone else has the same problem, we can post the solution here. 

    Doug

  • The problem was in the release build, the linker cmd file was somehow excluded from the build.  The linker file was included in the properties->general tab under linker command file and it did show up in the Project explorer list but I didn't notice the file was grey in the Project Explorer list.

    Thanks for the help.

    Doug