diff --git a/firmware/rust/avr-specs/avr-atmega328p.json b/firmware/rust/avr-specs/avr-atmega328p.json index e236b08..20752d1 100644 --- a/firmware/rust/avr-specs/avr-atmega328p.json +++ b/firmware/rust/avr-specs/avr-atmega328p.json @@ -8,7 +8,7 @@ "executables": true, "late-link-args": { "gcc": [ - "-lgcc" + "-lgcc" ] }, "linker": "avr-gcc", @@ -18,8 +18,10 @@ "no-default-libraries": false, "pre-link-args": { "gcc": [ - "-mmcu=atmega328p", - "-Wl,--as-needed" + "-mmcu=atmega328p", + "-Os", + "-mrelax", + "-flto" ] }, "target-c-int-width": "16",