AVR-GCC

From ElectroDragon Wiki
Revision as of 18:07, 27 July 2021 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Build Log

Make hex:

avr-gcc -DF_CPU=16000000         -Iusbdrv -I. -DDEBUG_LEVEL=0  -Os  -ffunction-sections -fdata-sections -save-temps  -Wl,--gc-sections,--relax -mmcu=attiny441   -c main.c -o main.o
avr-gcc -DF_CPU=16000000         -Iusbdrv -I. -DDEBUG_LEVEL=0  -Os  -ffunction-sections -fdata-sections -save-temps  -Wl,--gc-sections,--relax -mmcu=attiny441   -c thermistor.c -o thermistor.o
avr-gcc -DF_CPU=16000000         -Iusbdrv -I. -DDEBUG_LEVEL=0  -Os  -ffunction-sections -fdata-sections -save-temps  -Wl,--gc-sections,--relax -mmcu=attiny441   -c twi.c -o twi.o
avr-gcc -DF_CPU=16000000         -Iusbdrv -I. -DDEBUG_LEVEL=0  -Os  -ffunction-sections -fdata-sections -save-temps  -Wl,--gc-sections,--relax -mmcu=attiny441   -L /usr/lib/avr/lib/ldscripts/ -o main.elf main.o thermistor.o twi.o
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
  text    data     bss     dec     hex filename
     0    1700       0    1700     6a4 main.hex