Inspired by: The "bare minimum" sketch isn't the bare minimum ... - Programming Questions - Arduino Forum
Anyway, most is clear, except:this will produce 260 bytes executable on MEGA. What can be expected is just few bytes of executable for endless loop.
int main(){
}
This code will initial MEGA properly for default Arduino setting, but it use 644bytes of flash memory and 9 bytes for RAM,
int main()
{
init();
while(1) {}
}
What for is actually such difference in both cases? What and why is added?
If nothing is used, there is no point to add any library useless code. I believed all not used code functions are excluded from executable automatically.