还有个问题请坛里高人帮忙解决一下
我一调用一个函数,MatrixMultiply(F,7,7,P,7,7,A ); //A=F*P
程序就调到这个函数里了void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
调用的函数是
void MatrixMultiply( float* fMatrixA,unsigned int uRowA,unsigned int uColA,
float* fMatrixB,unsigned int uRowB,unsigned int uColB,float* MatrixResult )
{
unsigned int index_i = 0;
unsigned int index_j = 0;
unsigned int index_l = 0;
unsigned int index_u = 0;
unsigned int index_k = 0;
unsigned int index_v = 0;
uRowB = uRowB;
for(index_i=0;index_i<uRowA;index_i++)
for(index_j=0;index_j<uColB;index_j++)
{
index_u = index_i*uColB + index_j;
MatrixResult[index_u] = 0.0;
for(index_l=0;index_l<uColA;index_l++)
{
index_k = index_i*uColA+index_l;
index_v = index_l*uColB+index_j;
if (((*(fMatrixA+index_k))!=0.0) && ((*(fMatrixB+index_v))!=0.0))
*(MatrixResult+index_u) += (*(fMatrixA+index_k)) * (*( fMatrixB+index_v));
}
}
} //void MatrixMultiply
找人看了一下,程序写的语法没问题,用的是mdk4.3编译
|