A few days ago I received an email from someone who is building their own version of Stubby. He reported that my code didn't compile. The error he was getting was a very strange one, including a bunch of lines with things like this:
/usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/libm.a(atan2.o):../../../libm/fplib/atan2.S:140: relocation truncated to fit: R_AVR_13_PCREL against symbol `__addsf3' defined in .text section in /usr/lib/gcc/avr/4.7.2/avr51/libgcc.a(_addsub_sf.o)
I found some sites which suggested adding -lm to the command to work around a bug in AVR-GCC 4.7, but that didn't work either.
In the end, he upgraded to AVR-GCC 4.8.1 (the same version which I am using), and it compiled fine. I am still not sure what caused the errors, but whatever it is, it works on the latest versions. So, if you are trying to compile Stubby code, and are getting errors like this, try upgrading your compiler.
Cheers
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.