how can you do it on smt32CubeIde? i tried it, that functions works with numbers ex: log(8) or log10f(1000) but when you have variable x= 100 and you do log(x) or logf(x) the compiler give an error
And what exactly is not clear from that error message? Check if your linker script (*.ld file) has the correct FLASH size corresponding to the real MCU part. If it has, then... reduce the code size or/and change the MCU to one with a bigger flash. This is a clear example of the fact that HAL library and CubeMX generated code is not only full of bugs, but also a bloatware...
If the compiler doesn't provide math.lib or if the code size is important, use interpolation, create a look up table of precalculated points and linearly interpolate between them. It's usually what is done in 8 bit MCU when speed and codesize is optimized in exchange or a lower accuracy. Sometime the variables are integer (value_x1000) to go a notch further. Check on Q31 pseudo fixed point type.
Use linear interpolation. The stepsize will determine how closely the linear interpolation is to the real thing. I use Octave (mathlab) to generate comma seperated lists that i cut & paste into a C array.