?? makefile
字號:
# adapted from avr-libc examplePRG = voltmeterOBJ = main.o lcd_spi.o ad7714.o serial.o rotary_switch.oMCU_TARGET = atmega168OPTIMIZE = -OsDEFS =LIBS =# You should not have to change anything below here.CC = avr-gcc# Override is only needed by avr-lib build system.override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)override LDFLAGS = -Wl,-Map,$(PRG).mapOBJCOPY = avr-objcopyOBJDUMP = avr-objdumpall: $(PRG).elf lst text $(PRG).elf: $(OBJ) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)clean: rm -rf *.o $(PRG).elf rm -rf *.lst *.map *.hex *.bin *.srec *.epslst: $(PRG).lst%.lst: %.elf $(OBJDUMP) -h -S $< > $@# Rules for building the .text rom imagestext: hex bin srechex: $(PRG).hexbin: $(PRG).binsrec: $(PRG).srec%.hex: %.elf $(OBJCOPY) -j .text -j .data -O ihex $< $@%.srec: %.elf $(OBJCOPY) -j .text -j .data -O srec $< $@%.bin: %.elf $(OBJCOPY) -j .text -j .data -O binary $< $@# Rules for building the .eeprom rom imageseeprom: ehex ebin esrecehex: $(PRG)_eeprom.hexebin: $(PRG)_eeprom.binesrec: $(PRG)_eeprom.srec%_eeprom.hex: %.elf $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@%_eeprom.srec: %.elf $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@%_eeprom.bin: %.elf $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@upload: all sudo avrdude -q -q -c usbtiny -p m168 -U flash:w:voltmeter.hex
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -