AVR Makefile: Rozdiel medzi revíziami
Zo stránky SensorWiki
Nová stránka: Minimálny makefile <source lang="make"> TRG = example1 CC = avr-gcc OBJCOPY = avr-objcopy CFLAGS = -g -mmcu=atmega16 $(TRG).hex : $(TRG).out $(OBJCOPY) -j .text -O ... |
Bez shrnutí editace |
||
Riadok 2: | Riadok 2: | ||
<source lang="make"> | <source lang="make"> | ||
TRG = example1 | |||
CC = avr-gcc | CC = avr-gcc | ||
OBJCOPY = avr-objcopy | OBJCOPY = avr-objcopy | ||
CFLAGS = -g -mmcu= | CFLAGS = -g -mmcu=atmega328p | ||
$(TRG).hex : $(TRG).out | $(TRG).hex : $(TRG).out | ||
$(OBJCOPY) -j .text -O ihex $(TRG).out $(TRG).hex | |||
$(TRG).out : $(TRG).o | $(TRG).out : $(TRG).o | ||
$(CC) $(CFLAGS) -o $(TRG).out -Wl,-Map,$(TRG).map $(TRG).o | |||
$(TRG).o : $(TRG).c | $(TRG).o : $(TRG).c | ||
$(CC) $(CFLAGS) -Os -c $(TRG).c | |||
</source> | </source> | ||
[[Category:AVR]] | [[Category:AVR]] |
Aktuálna revízia z 14:00, 30. september 2010
Minimálny makefile
TRG = example1
CC = avr-gcc
OBJCOPY = avr-objcopy
CFLAGS = -g -mmcu=atmega328p
$(TRG).hex : $(TRG).out
$(OBJCOPY) -j .text -O ihex $(TRG).out $(TRG).hex
$(TRG).out : $(TRG).o
$(CC) $(CFLAGS) -o $(TRG).out -Wl,-Map,$(TRG).map $(TRG).o
$(TRG).o : $(TRG).c
$(CC) $(CFLAGS) -Os -c $(TRG).c