Arduino: What is the size of the program?

9 views (last 30 days)
Hello, I am using the Simulink Support Package for Arduino Hardware (Matlab R2013b). It is programming the code to the target successfully. How can I find the size of the program written for the UNO?
Comparably, when I use the Arduino IDE, after programming the hardware, the log window will state something like: "Binary sketch size: 1,082 bytes (of a 32,256 byte maximum)" . I would like to know the size of what Simulink is programming so that I have an understanding of how much space is still available.

Answers (1)

Abhishek GS
Abhishek GS on 13 Apr 2015
Hi Scott Garabedian,
The size of the of program, deployed onto the board, is displayed on the MATLAB Command prompt from MATLAB 8.3 (R2014a) onwards.
For previous releases, you may have to use the 'avr-size' utility present in arduino-x.x/hardware/tools/avr/bin. The format to use it in system command prompt is :
avr-size filename.elf
Hope it helps, Abhishek
  2 Comments
Scott Garabedian
Scott Garabedian on 13 Apr 2015
Thank you for the help. Here is the response it gave me:
text data bss dec hex filename
25632 352 276 26260 6694 Arduino_Blink.elf
So the program size is text + data + bss = 26260 bytes? 26260/32256 = 81.4% full? Am I understanding this correctly?
Scott Garabedian
Scott Garabedian on 6 May 2015
Hi Abhishek, can you confirm my calculation in the previous comment? Is the program 81.4% full?

Sign in to comment.

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!