thanks for your replay
but my problem is with hardware floating point. if i use software floating point the program run correctly
but when chose hardware floating point the hard fault occur.
Note that -mfloat-abi=hard has been added to GCC flags correctly
i use sprintf(..) and in Disassembly it is vcvt.f64.f32
how can i solved this problem.
This problem means that the standard C library has been compiled in a way that treats the ‘%f’ format in a way that uses the double type. We would recommend simply using an alternative implementation of sprintf() from some open-source library and tweaking it so that it only uses the float type.
The problem is that printf() inside itself uses ‘double’. Although you pass a float there, it reads ‘%f’ in your string and somehow converts it to double. You cannot change this behavior by modifying your program as it is located inside the printf() that is a part of the standard library. You could either modify the standard library used by GCC (which is somewhat cumbersome), or simply use another open-source implementation of printf() (there should be plenty of those available online).