I'm working with C in Sourcery CodeBench IDE, programming in a STM32F10X, and when I compile this code
int main(void){
RCC_Configuration();
/* NVIC configuration */
NVIC_Configuration();
/* GPIO configuration */
GPIO_Configuration();
SysTick_Configuration();
Timer_Configuration();
dxl_initialize( 0, 1 );
USART_Configuration(USART_PC, Baudrate_PC);
GoalPos1[0]= 333;
GoalPos1[1]= 333;
GoalPos2[0]=690;
GoalPos2[1]=690;
GoalPos5[0]=412;
GoalPos5[1]=412;
GoalPos6[0]=611;
GoalPos6[1]=611;
GoalPos7[0]=355;
GoalPos7[1]=355;
GoalPos8[0]=664;
GoalPos8[1]=664;
double t = 1.0;
while(1)
{
bMoving = dxl_read_byte( id, P_MOVING );
CommStatus = dxl_get_result();
if( CommStatus == COMM_RXSUCCESS )
{
if( bMoving == 0 )
{
if(t<=2){GoalPos3[0]=(int)(-1.5*t+300.7);GoalPos3[1]=(int)(-1.5*t+300.7);}else{GoalPos3[0]=298;GoalPos3[1]=298;}if(t<=2){GoalPos4[0]=(int)(1.5*t+721.0);GoalPos4[1]=(int)(1.5*t+721.0);}else{GoalPos4[0]=724;GoalPos4[1]=724;}GoalPos9[0]=(int)(0.0001661*t*t*t*t*t*t+0.0006153*t*t*t*t*t-0.1318*t*t*t*t+1.254*t*t*t+2.925*t*t-43.64*t+527.9);GoalPos9[1]=GoalPos9[0];GoalPos10[0]=(int)(0.0003296*t*t*t*t*t*t-0.01189*t*t*t*t*t+0.2032*t*t*t*t-2.895*t*t*t+27.86*t*t-109.9*t+613.8);GoalPos10[1]=GoalPos10[0];GoalPos11[0]=(int)(-0.006659*t*t*t*t*t*t+0.2862*t*t*t*t*t-4.584*t*t*t*t+33.35*t*t*t-105.1*t*t+102.1*t+379.3);GoalPos11[1]=GoalPos11[0];GoalPos12[0]=(int)(0.000823*t*t*t*t*t*t-0.01887*t*t*t*t*t-0.09102*t*t*t*t+5.247*t*t*t-44.36*t*t+130.7*t+528.9);GoalPos12[1]=GoalPos12[0];GoalPos13[0]=(int)(-0.003788*t*t*t*t*t*t+0.1389*t*t*t*t*t-1.64*t*t*t*t+5.74*t*t*t+7.459*t*t-24.55*t+297.2);GoalPos13[1]=GoalPos13[0];GoalPos14[0]=(int)(0.002975*t*t*t*t*t*t-0.1283*t*t*t*t*t+2.114*t*t*t*t-16.1*t*t*t+50.88*t*t-38.08*t+744.6);GoalPos14[1]=GoalPos14[0];GoalPos15[0]=(int)(-0.007288*t*t*t*t*t*t+0.3476*t*t*t*t*t-6.384*t*t*t*t+55.4*t*t*t-219.1*t*t+301.6*t+492.8);GoalPos15[1]=GoalPos15[0];GoalPos16[0]=(int)(0.001997*t*t*t*t*t*t-0.07483*t*t*t*t*t+0.881*t*t*t*t-2.857*t*t*t-5.658*t*t+27.76*t+378.4);GoalPos16[1]=GoalPos16[0];GoalPos17[0]=(int)(-0.0002364 *t*t*t*t*t*t+0.02187*t*t*t*t*t-0.5432 *t*t*t*t+4.617*t*t*t-6.029*t*t-49.48*t+537.6);GoalPos17[1]=GoalPos17[0];GoalPos18[0]=(int)(0.000729*t*t*t*t*t*t-0.03161*t*t*t*t*t+0.5943 *t*t*t*t-7.041*t*t*t+52.96*t*t-183.3*t+664.7); GoalPos18[1]=GoalPos18[0];
Posicao();
}
PrintErrorCode();
// Read present position
wPresentPos = dxl_read_word( id, P_PRESENT_POSITION_L );
TxDWord16(GoalPos[INDEX]);
TxDString(" ");
TxDWord16(wPresentPos);
TxDByte_PC('\r');
TxDByte_PC('\n');
}
else
PrintCommStatus(CommStatus);
t = t + 0.01;
}
return 0;}
When I run it, give this message:
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_dcmple'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_dadd'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_d2iz'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_dadd'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_d2iz'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to __aeabi_dmul'
C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: undefined reference to
__aeabi_dmul'
APP/src/main.o:C:\Users\Gilmar\Dropbox\L008 - Bloco Delta\Trabalho\pdpd\PDPD LIBS\CM530\09 DXL READ_WRITE/APP/src/main.c:179: more undefined references to `__aeabi_dmul' follow
How may I solve this problem? When I comment the line t = t + 0.01, the code Works, but I need to add 0.01. I have already tried with float,double and int, any number when I put lonely, works, my problem is only in the sum.