On Tue, 26 Nov 2024 18:25:07 +0000 Scott Ashcroft <scott.ashcr...@hotmail.com> wrote: > I think the fix for this is to add: > > -fno-jump-tables > > to the OPTIMIZE flags but I don't have atmega8 to test if the produced > bootloader actually works. > >
I've now managed to find an atmega8 to test and the bootloader produced with my fix works. Only the attached patch is needed.
diff --git a/bootloaders/atmega8/Makefile b/bootloaders/atmega8/Makefile index 9202b52..bfd9d83 100644 --- a/bootloaders/atmega8/Makefile +++ b/bootloaders/atmega8/Makefile @@ -26,7 +26,7 @@ ISPFLASH = $(DIRAVRBIN)/uisp -dpart=ATmega8 $(ISPPARAMS) --erase --upload if=$ OBJ = $(PROGRAM).o -OPTIMIZE = -Os -funsigned-char -funsigned-bitfields -fno-inline-small-functions +OPTIMIZE = -Os -funsigned-char -funsigned-bitfields -fno-inline-small-functions -fno-jump-tables DEFS = -DF_CPU=16000000 -DBAUD_RATE=19200 LIBS =