Initial commit
This commit is contained in:
parent
726a76eeff
commit
08477b5f83
51
Makefile
Normal file
51
Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
SDCC ?= sdcc
|
||||
SDAR ?= sdar
|
||||
STCCODESIZE ?= 8192
|
||||
SDCCOPTS ?= -mmcs51 --iram-size 512 --code-size $(STCCODESIZE) --xram-size 0 --opt-code-size --stack-auto
|
||||
SDCCREV ?= -Dstc15f204ea
|
||||
STCGAL ?= stcgal
|
||||
#/stcgal.py
|
||||
STCGALOPTS ?=
|
||||
STCGALPORT ?= /dev/ttyUSB0
|
||||
STCGALPROT ?= auto
|
||||
FLASHFILE ?= main.ihx
|
||||
SYSCLK ?= 11056
|
||||
FOSC ?=11056000L
|
||||
CFLAGS ?= -DWITH_ALT_LED9 -DWITHOUT_LEDTABLE_RELOC -DSHOW_TEMP_DATE_WEEKDAY
|
||||
|
||||
LIBSRC = uart_init.c
|
||||
|
||||
LIBOBJ =$(patsubst %.c,%.rel, $(LIBSRC))
|
||||
LIBNAME=mc8051fun.lib
|
||||
|
||||
|
||||
PRGOBJ =$(patsubst %.c,%.rel, $(PRGSRC))
|
||||
|
||||
|
||||
$(LIBNAME): $(LIBOBJ)
|
||||
$(SDAR) -rc $(LIBNAME) $(LIBOBJ)
|
||||
#all:
|
||||
# make uart2.ihx
|
||||
|
||||
%.rel: %.c
|
||||
$(SDCC) $(SDCCOPTS) $(SDCCREV) -DFOSC=$(FOSC) -o $@ -c $<
|
||||
|
||||
#eeprom:
|
||||
# sed -ne '/:..1/ { s/1/0/2; p }' main.hex > eeprom.hex
|
||||
|
||||
flash: $(FLASHFILE)
|
||||
$(STCGAL) -p $(STCGALPORT) -P $(STCGALPROT) -t $(SYSCLK) $(STCGALOPTS) $(FLASHFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.ihx *.hex *.bin *.rst
|
||||
rm -f *.map
|
||||
rm -f *.rel
|
||||
rm -f *.lst
|
||||
rm -f *.sym
|
||||
rm -f *.asm
|
||||
rm -f *.lk
|
||||
rm -f *.mem
|
||||
rm -f *.lib
|
||||
|
||||
cpp: SDCCOPTS+=-E
|
||||
cpp: main
|
Loading…
Reference in New Issue
Block a user