DSPRelated.com
Forums

error: symbol referencing errors - 'brain.out' not built

Started by xsmokeyx69 September 30, 2007
Hi, I am trying to compile some code in CCE v2.0, but I keep getting
this error:

"

undefined first referenced
symbol in file
--------- ----------------
BCSCTL1 ./bestusrutil.obj
BCSCTL2 ./bestusrutil.obj
>> error: symbol referencing errors - 'brain.out' not built"

It says BCSCTL1 and BCSCTL2 are undefined but when I go to the
MSP430x14x.h they are there...

from msp430x14x.h:

/* External references resolved by a device-specific linker command
file */
#define SFR_8BIT(address) extern volatile unsigned char address
#define SFR_16BIT(address) extern volatile unsigned int address

SFR_8BIT(BCSCTL1); /* Basic Clock System
Control 1 */
SFR_8BIT(BCSCTL2); /* Basic Clock System
Control 2 */
Since they are defined in that header file I have been staring at
this for hours and can't figure out what the problem is. Does
anybody have a clue?
P.S. Please don't say use v3.3 because I don't have access or $$ to
it.


The problem is that you have the "extern" definition only.


"extern" does not allocate the variable in the data segment. It merely tells the compiler that there exists somewhere this variable.


So, for example, in addition to extern, you need to define in some .c file (not in a .h file) the variable:


volatile unsigned char BSCTL1;


However, notice the comment above the macro definition. It says that external references are resolved by some device specific linker command. This means that you are probably forgetting to link an additional C or assembly language file or something of the kind. And that file is specific to the device you are working with and it contains the equivalent of volatile unsigned char BSCTL1;


Hope this helps.




From: "xsmokeyx69" <b...@Ttu.edu>
To: c...
Subject: [code-comp] error: symbol referencing errors - 'brain.out' not built
Date: Fri, 28 Sep 2007 21:18:21 -0000






Hi, I am trying to compile some code in CCE v2.0, but I keep getting
this error:

"<Linking>

undefined first referenced
symbol in file
--------- ----------------
BCSCTL1 ./bestusrutil.obj
BCSCTL2 ./bestusrutil.obj
>> error: symbol referencing errors - 'brain.out' not built"

It says BCSCTL1 and BCSCTL2 are undefined but when I go to the
MSP430x14x.h they are there...

from msp430x14x.h:

/* External references resolved by a device-specific linker command
file */
#define SFR_8BIT(address) extern volatile unsigned char address
#define SFR_16BIT(address) extern volatile unsigned int address

SFR_8BIT(BCSCTL1); /* Basic Clock System
Control 1 */
SFR_8BIT(BCSCTL2); /* Basic Clock System
Control 2 */

Since they are defined in that header file I have been staring at

this for hours and can't figure out what the problem is. Does
anybody have a clue?

P.S. Please don't say use v3.3 because I don't have access or $$ to
it.






__._,_.___







">http://www.dsprelated.com/groups/code-comp/1.php



_____________________________________




Portable computer

Computer job

Portable computer case

Portable computer printer

Computer technician jobs












__,_._,___