Arduino: What is the size of the program?

7 次查看(过去 30 天)
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.

回答(1 个)

Abhishek GS
Abhishek GS 2015-4-13
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 个评论
Scott Garabedian
Scott Garabedian 2015-4-13
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 2015-5-6
Hi Abhishek, can you confirm my calculation in the previous comment? Is the program 81.4% full?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by