Disable -mrelax due to avr-gcc/linker bugs

pull/224/head
D.R.racer 2022-10-20 09:02:31 +02:00 committed by DRracer
parent 2c6f2d7533
commit 0e427ae37c
1 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,10 @@ if(CMAKE_CROSSCOMPILING)
set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
# mcu related settings
set(MCU_FLAGS -mmcu=atmega32u4 -DF_CPU=16000000L -mrelax)
# Tt would be nice to add "-mrelax" but due to some avr-gcc/linker bug it breaks functionality of the FW
# (LoadFilament stopped working and only return Finished)
# The bad news is that -mrelax was saving ~450B of CPU FLASH
set(MCU_FLAGS -mmcu=atmega32u4 -DF_CPU=16000000L)
add_compile_options(${MCU_FLAGS})
add_link_options(${MCU_FLAGS})