CodeWarrior 8- & 16-bit tools: Linker errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior 8- & 16-bit tools: Linker errors

1,954 Views
marc_paquette
Contributor V
To help you find solutions to problems that have already been solved, we have posted this message. It contains an entire topic ported from a separate forum. The original message and all replies are in this single message.
 

Posted: Jul 26, 2004 - 06:06 AM   

hi,

I am working with CodeWarrior Development Studio for HC(S)08 Microcontrollers v3.0 special edition free license.

When I do a float multiplication seems there are undefined symbols in ansi.lib and I'll receive these messages :

'LINKER ERROR 1822: symbol _DUFLOAT ...'
'LINKER ERROR 1822: symbol _DMUL_RC ...'
'LINKER ERROR 1822: symbol _DSTRUNC ...'

/*this sentence provokes the error linker */
dummy=(unsigned int)((rad.volum*0.1)*0x7fff);

rad.volum is a unsigned char type

How can I solve this problem?.

thanks in advanced.

RJIMENEZ

Posted: Jul 27, 2004 - 04:37 AM   

Hi

It looks like the ANSI library is not part of your project.
I would need to get access to the whole project to investigate that forward.

mw_cbezy

Posted: Jul 27, 2004 - 05:41 AM   

HI,

I don't discover how attach a file (my CW project) yet in this environment. Anyway if you use a wizard to make a new project choose MC68HC908SR12 chip and the followings settings as defaults, substitute the main code for this one:

#define VARINT_BY_FLOAT
//#define VARUCHAR_BY_FLOAT
//#define NUM_BY_FLOAT

#ifndef VARUCHAR_BY_FLOAT
#ifndef VARINT_BY_FLOAT
#define INT_BY_FLOAT
#endif
#endif

void main(void)
{
unsigned int dummy;
unsigned char volum;
unsigned int value;

EnableInterrupts; /* enable interrupts */
/* include your code here */

volum=50;
value=50;

#ifdef NUM_BY_FLOAT
/* this sentence work fine */
dummy=(unsigned int)((50*0.1)*0x7FFF);
#else
#ifdef VARINT_BY_FLOAT
/*this sentence provokes the error linker */
dummy=(unsigned int)((value*0.1)*0x7FFF);
#else
/*this sentence provokes the error linker */
dummy=(unsigned int)((volum*0.1)*0x7FFF);
#endif
#endif

for(; {
__RESET_WATCHDOG(); /* kicks the dog */
} /* loop forever */
}


It seems that there are undefined symbols in the ANSI lib, it looks like the definitions exist but no the associate code function.

Rafa. 

Posted: Jul 27, 2004 - 09:13 AM   

Hi

When creating the project with the wizard, did you specify you want to use floating point arithmetic?

This is the question asked on page 5.

If you are not sure, check which ansi library is inserted in the project. If you get ansii.lib or ansiti.lib, you have linked the library without floating point support.

mw_cbezy

 
Labels (1)
Tags (1)
0 Kudos
0 Replies