diff --git a/src/avr/Makefile b/src/avr/Makefile index c9315b99..db6d5461 100644 --- a/src/avr/Makefile +++ b/src/avr/Makefile @@ -5,7 +5,8 @@ CROSS_PREFIX=avr- dirs-y += src/avr src/generic -CFLAGS += -mmcu=$(CONFIG_MCU) +CFLAGS-$(CONFIG_HAVE_LIMITED_CODE_SIZE) += -Os +CFLAGS += $(CFLAGS-y) -mmcu=$(CONFIG_MCU) # Add avr source files src-y += avr/main.c avr/timer.c