📄 makefile
字号:
## Makefile for Mega32 test version of the NanoVM#VERSION = 1.0CONFIG = Mega32-LCD.configDEVICE = atmega32DEFAULT_FILE = LcdDemo# DEFAULT_FILE = FloatTestROOT_DIR = ../../..# CFLAGS += -DDEBUG# AVR compiler setupPREFIX =CC = $(PREFIX)avr-gccOBJCOPY = $(PREFIX)avr-objcopyOBJDUMP = $(PREFIX)avr-objdump# AVR compiler and linker flagsCFLAGS += -Os -ffunction-sections -DAVR -I. -mmcu=$(DEVICE) -DVERSION="\"$(VERSION)\""CLDFLAGS += -mmcu=$(DEVICE)# build intel hex filesall: NanoVM.hex NanoVM_eeprom.hexinclude ../../src/Makefileinclude ../../src/avr/Makefilenvmdefault.h: Makefile%.o: %.c Makefile $(CC) $(CFLAGS) -c $< -o $@%.d:%.c set -e; $(CC) -MM $(CFLAGS) $< \ | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@ ; \ [ -s $@ ] || rm -f $@# avr specific entries%.elf: $(OBJS) $(CC) $(CLDFLAGS) -o $@ $(OBJS) avr-size -A $@%.hex: %.elf $(OBJCOPY) -j .text -j .data -O ihex $< $@%_eeprom.hex: %.elf $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@# use uisp tool to configure cpu for external crystaluisp: NanoVM.hex NanoVM_eeprom.hex uisp -dprog=stk200 --erase --wr_fuse_l=0xbf --wr_fuse_h=0xd9 uisp --segment=flash -dprog=stk200 --upload if=NanoVM.hex --verify uisp --segment=eeprom -dprog=stk200 --upload if=NanoVM_eeprom.hex --verify# use avrdude tool to configure cpu for external crystalavrdude: NanoVM.hex NanoVM_eeprom.hex avrdude -c usbasp -p atmega32 -U lfuse:w:0xbf:m -U hfuse:w:0xd9:m -U flash:w:NanoVM.hex -U eeprom:w:NanoVM_eeprom.hexclean:: rm -f *.d *.o *~ nvmdefault.h *.elfinclude $(OBJS:.o=.d)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -