05-20-2008 09:17 AM
Hallo.
I'm working with MicroBlaze 9.1.
In my project variables are float type:
float * MaxGradM[image_height][image_width];
(pointer)
i locate this printer to DDR RAM:
for (i=0;i<image_height;i++){
MaxGradM[i][0] = (float *)((DDR_BASEADDR+7*DDR_SHIFT)+ (i+1)*DDR_SHIFT_40);
}
And if I try to assign some value, i got an error:
.....
MaxGradM[i][j]=1.0;
.....
error: incompatible types in assignment
Here is not a soluton too...
MaxGradM[i][j]=(float)1.0;
Please help me, how to solve this error??
Thanks
05-20-2008 09:44 AM
05-20-2008 10:00 AM
I want to assign MaxGradM array to DDR RAM. In for loop do I this correct? Then if I have to change zero values of MaxGradM cells to 1 I must do followings??:
(float *) MaxGradM[i][j]=1;
?
05-20-2008 02:10 PM
I understud now. Realy I impose address on my Pointer (0x1200*****) and then I write a value (*(float *) pointer = new_value;)
No errors, I think it will work :)