I just lowered the clock speed of my arduino promini 3.3v - 328p from 8Mhz to 1Mhz on the external clock disabling the brounout detection and when I compiled I my old sketch it wouldn't upload any more because suddenly the size has increased from 31KB to 35KB.
Does anyone know why this could happen. I didn't make any changes in the code and it still loads into the 8Mhz Arduino without any problems.
I used these low power config files: https://github.com/joe-speedboat/Arduino-LowPower
1 Answer 1
Does your code have delays in it? If you changed the clock speed, then the compiled assembly for the delays may require more NOP instructions or something similar to achieve the same real-time delay. As a result, the size of the compiled sketch could increase.
-
Delays are implemented by loops, not by long strings or
nop
s.Edgar Bonet– Edgar Bonet2018年07月22日 20:45:59 +00:00Commented Jul 22, 2018 at 20:45
-flto
?