Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>At a linux system you can do some experiments with static compiled example programs. E.g.</p> <pre><code>$ size `which busybox ` text data bss dec hex filename 1830468 4448 25650 1860566 1c63d6 /bin/busybox </code></pre> <p>The sizes are given in bytes. This output is independent from the executable file format, since the sizes of the different sections inside the file format. The text section contains the machine code and const stufff. The data section contains data for static initialization of variables. The bss size is the size of uninitialized data - of course uninitialized data does not need to be stored in the executable file.)</p> <p>Well, <a href="http://www.busybox.net/" rel="nofollow noreferrer">busybox</a> contains a lot of functionality (like all common shell commands, a shell etc.).</p> <p>If you link own examples with <strong>gcc -static</strong>, keep in mind, that your used libc may dramatically increase the program size and that using an embedded libc may be much more space efficient.</p> <p>To test that you can check out the <a href="http://www.fefe.de/dietlibc/" rel="nofollow noreferrer">diet-libc</a> or <a href="http://www.uclibc.org/" rel="nofollow noreferrer">uclibc</a> and link against that. Actually, busybox is usually linked against uclibc.</p> <p>Note that the sizes you get this way give you only <em>an order of magnitude</em>. For example, your workstation probably uses another CPU architecture than the arduino board and the machine code of different architecture may differ, more or less, in its size (because of operand sizes, available instructions, opcode encoding and so one).</p> <p>To go on with <em>rough order of magnitude</em> reasoning, busybox contains roughly <a href="http://www.busybox.net/downloads/BusyBox.html" rel="nofollow noreferrer">309 tools</a> (including ftp daemon and such stuff), i.e. the average code size of a busybox tool is roughly 5k.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload