0

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

Glorfindel
5781 gold badge7 silver badges18 bronze badges
asked May 15, 2018 at 20:50
2
  • Compare the platform.txt from the Arduino IDE with the one in the low power config files above. There is a vital difference in compiler/linker setting. Commented May 17, 2018 at 21:55
  • @MikaelPatel: You mean -flto? Commented Jul 22, 2018 at 20:45

1 Answer 1

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.

answered May 16, 2018 at 1:48
1
  • Delays are implemented by loops, not by long strings or nops. Commented Jul 22, 2018 at 20:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.