-
Notifications
You must be signed in to change notification settings - Fork 132
MEGA2560 needs --relax option when linking #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Wierd. The word "relax" is nowhere found in the platform nor the boards.txt file in arduino ide 1.6.1. |
Indeed, the option that I added to platform.txt is just to keep me going and to demonstrate that it indeed fixes the issue I was facing; removing it and it comes back. I also suspect that this option comes at a price. |
I had an issue with a mega and I wanted to be sure it was not related to this --relax option so I thought about a good workaround. |
I build a additional framework in the plugin that allows me to add |
See https://code.google.com/p/arduino/issues/detail?id=729
http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_funcptr_gt128kib.html
When compiling with Arduino IDE:
C:\ProgramFiles\Arduino\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega2560 -o ....
When compiling with Eclipse:
"C:/ProgramFiles/Arduino/hardware/tools/avr/bin/avr-gcc" -Os -Wl,--gc-sections -mmcu=atmega2560 -o ...
I changed the line in platform.txt to
compiler.c.elf.flags=-Os -Wl,--gc-sections,--relax
and all seems fine...
The text was updated successfully, but these errors were encountered: