2 ms·
Functions you don't call get stripped out of the final binary. The advantage is you get a bunch of high level functions like analogRead() that do all the setup
by TD-Linux 9y ago
Functions you don't call get stripped out of the final binary. The advantage is you get a bunch of high level functions like analogRead() that do all the setup for you. avr-gcc/avr-libc mostly just provides register definitions, so it's likely you're going to duplicate most of the code inside analogRead() anyway if you roll it yourself.
That said, I've done plenty of projects with bare avr-gcc (especially for chips not supported by Arduino at the time) and it's not terribly onerous, but often you don't need that level of control for every little thing.