TI E2E Community (Beta)
Welcome to the TI E2E (Engineer-to-Engineer) Community! We invite you to freely and openly interact with your peer Engineers, TI Engineers, and other experts in order to ask questions, share knowledge, explore ideas, and help solve problems.
More Search Options

Get Started with the New Code Composer Essentials Version 3!

This post has 116 Replies | 29 Followers

Top 25 Contributor
Posts 197
Texas Instruments Employee

John,

I created a test case to duplicate this using the template you provided, and can recreate the "undefined symbol" linker error if the project is compiled with optimization level 3 (which is the level at which automatic inlining is enabled). At lower optimization levels, the function is not inlined, hence the "undefined symbol" error does not appear.

I assume you are using opt level 3, is that correct?

If I add the --auto_inline=0 option, it prevents it from getting inlined and resolves the symbol correctly. Are you saying you tried this and did not work?

As per the Compiler Users Guide, using --no_inlining along with --opt_level 3 will still inline small functions. But the --auto_inline=0 option will disable it. Please let us know if this helps resolve the issue. If it does not, we may need to look at your project.

Top 25 Contributor
Posts 202
Community Member

Aarti,

I need to correct myself on the previous post on one point - plus, yes, I did too build an example project but it worked... I don't know right now if it has anything to do with the assembly function in my 'real' project being an ISR or not --- but here is the real crux of the issue:

No matter what I did - the compiler would never put the .global myCfunc in the listing file (and thus in the obj).  I had to manually add that.

When I turned all optimizations off the function was obviously not inlined anymore and thus I was able to put in the .global statement.

I can send you the c file, generated assembly file, and list file if you think that will help - and I can point out what function this is happening with - will you be able to glean what is going on?

I find it kindof strange that no matter what I did - even declaring the function

extern void myCfunc(void);      // at the top of the file - it never was declared to be a global by the compiler.

Thanks,
johnw

 

 

Top 25 Contributor
Posts 197
Texas Instruments Employee

Yes please send the C source file, generated assembly and listing file, as well as the assembly source file which calls this C function. Also cut and paste the full compile and link command options as they appear in CCE, under Project Properties->C/C++ Build->MSP430 Compiler v3.1 and MSP430 Linker v3.1.

Top 25 Contributor
Posts 202
Community Member

Aarti,

I responded to your e-mail before I read this post - I will send the rest when I am back on my development machine. 

Can you glean anything from the list file?

Thanks,
johnw

Top 25 Contributor
Posts 202
Community Member

Aarti,

Zipped workspace is ~ 70MB which is too large for me to e-mail - so I am going to post on my ftp site and send you the details - did you get my e-mails?

Thanks,
johnw

Not Ranked
Posts 6
Community Member

Great Tutorial Brandon. Could I trouble you to guide me how to implement SimpliciTI in CCE. I've tried importing the simpliciTI 1.1.0 folder into my project but I keep getting errors eg. could not open source file"bsp.h" or error failed to match a default include file.

Not Ranked
Posts 3
Community Member

Hi Brandon:

I used CCE Pro V3.1 for quite some time now. I do not recall the version, but I think it was one of the last available. I received a CC430-based board so I updated my tool applying CCE v3.1 SR1 (Rev F - ZIP 113800kB 28 April 2009). I also installed "SimpliciTI-CC430-1.1.0-Demo". When I try to rebuild an old project I get this: "Errors during build. Errors running builder "Generated Makefile Builder" on project ... This project was created using a version of Code Generation tools that is currently not installed: 3.1.0 [null]. Please install the Code Generation tools of this version, or migrate the project to one of the supported versions."

I tried to create a new project. I get no device variant choices and "No Code Generation tools installed......" message.

I would un-install my CCE v3.1 Build: 3.2.4.3.8 and install MSP-CCE430PRO alias "CCE Pro v3.1 SR1" but I cannot download that version. I also do not know how to transfer license. Thanks.

Not Ranked
Posts 1
Community Member

If you are using a processor with a lot of RAM to initialize, then you may run afoul of the watchdog timeout (it happened to me).  Add a watchdog reset to each time through the loop and everything will be fine.

#define RAMSTARTADDR 0x0200
#define RAMSIZE      0x0400
#define RAMINITEND   (RAMSIZE - 6)

int _system_pre_init(void)
{
    int i ;
    char *ptr = (char *)RAMSTARTADDR;
    
    for (i=0; i<RAMINITEND; i++)
    {
        *ptr = 0x00;
        *ptr++;
        *** reset watchdog here ****

    }
    return 1;
}

Not Ranked
Posts 2
Community Member

Hi, on a similar issue.

 

I have just ported some code that was running on the mspgcc compiler to CCE and I am having some issues. The main problem is with variable initialization. It seems that CCE does not initialize the .bss segment to zeros like

other compilers do. Is there anyway to modify the linker script to do this?

 

The relevent section is:

 

SECTIONS

{

    .bss       : {} > RAM                /* GLOBAL & STATIC VARS              */

    .sysmem    : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */

    .stack     : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

 

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

    .cinit     : {} > FLASH              /* INITIALIZATION TABLES             */

    .const     : {} > FLASH              /* CONSTANT DATA                     */

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

etc etc
I need to know the syntax to change the .bss line to zero out that segment.
Thanks,
Bernie


Top 25 Contributor
Posts 197
Texas Instruments Employee

The MSP430 Compiler Users Guide, http://www-s.ti.com/sc/techlit/slau132, section on "Initializing Static and Global Variables" shows the linker syntax to do this.

Not Ranked
Posts 2
Community Member

That syntax specified in that document to init the .bss segment to zero does not work with Code Composer Essential V3.2 linker script.

I have reverted manually providing a pre-Startup function to zero out bss ram prior to main(), that works.

 

Cheers,

Bernie

Top 500 Contributor
Posts 23
Community Member
Kai replied on 30 Sep 2009 10:21 PM

CCS is out, what is going to happen to all those CCE Pro user?

Page 8 of 8 (117 items) « First ... < Previous 4 5 6 7 8 |

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.