Hi,
I'm actually trying to change the optiboot bootloader for Arduino UNO to have a specific behavior.
I've tried to change the code on the optiboot.c file and when I tried to compile it told me "avr-gcc: error: unrecognized command line option ‘-mshort-calls’". I've also tried with the basic version of the code.
So after some research I tried to change by "-mrelax". It compile correctly and the output was
text data bss dec hex filename
544 0 0 544 220 optiboot_atmega328.elf.
But when I tried to upload using the IDE arduino it told me this :
avrdude: ERROR: address 0x800a out of range at line 33 ""/optiboot_atmega328.hex.
I tried to use other flag for OPTIMIZE line of the Makefile like -ffunction-sections, -fno-move-loop-invariants without success.
So I think it's because the size of the file is too big or something like that.
So if somebody encounter this problem and if he has found a solution it would help me a lot.
I'm using avr-gcc (GCC) 4.9.2 and gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609.
Thanks !