this my cut from text's and project's, some tests, avr-gcc vs xc8-avr
///////////////////////////////////////////
optimisation / size *.hex-file
///////////////////////////////////////////
gcc1 - avr-gcc-3.6.2 custom Makefile
gcc2 - avr-gcc-3.6.2 build on mplabx
xc8 - xc8-2.10 build on mplabx
///////////////////////////////////////////
opt | gcc1 | gcc2 | xc8
///////////////////////////////////////////
s | 5,496 | 5,696 | 6,357
g | 5,508 | |
fast | 5,504 | |
0 | 5,966 | 8,433 | 9,188
1 | 5,508 | 5,721 | 6,386
2 | 5,500 | 5,700 | 6,361
3 | 5,504 | 5,717 | 6,365
///////////////////////////////////////////
and
///////////////////////////////////////////
avr-gcc toolchain
- avr_gcc 4.9.2
- avr_binutils 2.25
- avr_gdb 7.8.1
- avr_libc 1.8.1
////////////////////////////////////////////////
gcc - avr-gcc build on mplabx
xc8 - xc8-2.20 build on mplabx
////////////////////////////////////////////////
opt | gcc | xc8 |
////////////////////////////////////////////////
0 | 8,024 | 8,971 |
1 | 5,402 | 6,169 |
2 | 5,381 | 6,144 |
3 | 5,385 | 6,148 |
s | 5,377 | 6,140 |
////////////////////////////////////////////////
and
////////////////////////////////////////////////
optimisation -S2
////////////////////////////////////////////////
gcc - avr-gcc build on mplabx
xc8 - xc8-2.20 build on mplabx
////////////////////////////////////////////////
avr-gcc | xc8 2.20 |
////////////////////////////////////////////////
3.6.2 - 5,496 | 6,144 |
7.3.0 - 5,361 | |
9.2.0 - 5,336 | |
////////////////////////////////////////////////