1

Scenario

When I upload my project via the Arduino ide I see this at the bottom:

Writing | ################################################## | 100% 4.14s

avrdude: 25698 bytes of flash written
avrdude: verifying flash memory against /var/folders/r4/s_j4c02s3wvcx6wy41__rnwh0000gp/T/build5447a2e9a95ee46ba2ad71abe5de02d6.tmp/SwatBotSpine.ino.hex:
avrdude: load data flash data from input file /var/folders/r4/s_j4c02s3wvcx6wy41__rnwh0000gp/T/build5447a2e9a95ee46ba2ad71abe5de02d6.tmp/SwatBotSpine.ino.hex:
avrdude: input file /var/folders/r4/s_j4c02s3wvcx6wy41__rnwh0000gp/T/build5447a2e9a95ee46ba2ad71abe5de02d6.tmp/SwatBotSpine.ino.hex contains 25698 bytes

Question

I'm uploading to an Arduino Uno, does this mean I have 32256 - 25698 bytes left?

  • Only if you're using a 512byte bootloader. – Ignacio Vazquez-Abrams Sep 20 '16 at 22:11
  • @IgnacioVazquez-Abrams Are there unos with a bootloader other than 512b? I suppose people could be using custom bootloaders.. – Jacksonkr Sep 20 '16 at 22:12
  • 1
    Older Arduinos used larger bootloaders, then they switched to the smaller “optiboot”. I do not know when they did the switch, but it may well be after the first Unos started shipping. – Edgar Bonet Sep 21 '16 at 7:53
2

Short answer: Yes.

At the end of a successful compilation (not upload), at least in ArduinoIDE 1.6.9, the final 2 messages look like:

Sketch uses 23,442 bytes (72%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,093 bytes (53%) of dynamic memory, leaving 955 bytes for local variables. Maximum is 2,048 bytes.

In this case, 8814 bytes of flash remain unused, and 955 bytes remain for the use of the stack and the heap, combined.

  • I see it now. I was looking in the avrdude messages but the sketch info is right before that. – Jacksonkr Sep 21 '16 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.