[En-Nut-Discussion] Nut/OS Code Size (was AT91 EMAC Fix in Rev-2561)
Harald Kipp
harald.kipp at egnite.de
Sat Mar 28 09:20:16 CET 2009
Thiago A. Corrêa wrote:
> <ole.reinhardt at embedded-it.de> wrote:
>> Another idea: What's about providing
>> a table with valid phy IDs and just probing for any of it? So we'll
>> simply need to add new IDs if there is any new board. So basicaly the
>> same like before, but not a bunch of if statements.
>
> I think this would be a bit overkill. The table itself would be
> "wasted" space for most users and the loop looking for the right value
> could be seen too as unnecessary.
Yes, every piece of code that isn't required by a specific hardware
should be removed via configuration.
Please take a look at Ernst Stippl's statistics at
http://www.es-business.com/ethernut/eng/vers_avr.php
These are the .text segment sizes of app/httpd, all using the same
compiler (AVR-GCC 3.4.5):
4.0.2 0x013338
4.1.5 0x0134e4
4.2.1 0x013c22
4.4.0 0x013c62
4.5.4 0x015804
4.7.4 0x015f48
>From version 4.0.2 the code size had grown by 11280 bytes, when using
GCC 4.3.0 and a later avr-libc, the increase is even 12630 bytes!!!
This is a bad development and must be stopped.
Harald
More information about the En-Nut-Discussion
mailing list