PJasinski91 napisał(a):
Tak czy inaczej pomogło!! Dziękuję bardzo!
Mógłbyś mi jeszcze tylko wytłumaczyć co właściwie zrobiłem?
Nie pamietam gdzie znalazlem to rozwiaznie, ale chyba chodzilo o bibliotke, ktora nie chciala sie skompilowac..pamietam ze po dodaniu ktorejs z bibliotek dostalem taki blad..
Tutaj:
http://www.avrfreaks.net/forum/linker-error-6A missing -lm would lead to a linker complaint if you use sin() from math.h, for example, because the sin function implementation is shipped in libm.a.
The root cause of the problem is #33698, i.e. AVR-LibC uses RCALL/RJMP instruction to external functions. If the assumption that the call target can be encoded in the instruction does not hold, the linker complains.
There are several cases where adding -lm does not work around the problem or does not work as intended.
Reason is that AVR-LibC turned libm.a into a core library like libgcc.a but using -lm will not use it like a system library. To achieve that, you'll have to patch the specs (e.g. using -dumpspecs, patch them and feed them back into the compiler) and not adding -lm wherever on the command line.
-lm work in most cases because this leads to mode efficient float routines, this the RCALL/RJMP targets are inside the valid range again. However, there are cases where is does not work: Using LTO, fixed-point <-> float conversions, C++, ...