mirror of
https://github.com/eddyem/scorpio.git
synced 2026-03-21 09:11:02 +03:00
add code for STM8-based 2stepper management board
This commit is contained in:
40
STM8/2stepper4reductor/Makefile
Normal file
40
STM8/2stepper4reductor/Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
NAME=twosteppers
|
||||
SDCC=sdcc
|
||||
|
||||
CCFLAGS=-DSTM8S105 -I../ -I/usr/share/sdcc/include -mstm8 --out-fmt-ihx
|
||||
LDFLAGS= -mstm8 --out-fmt-ihx -lstm8
|
||||
FLASHFLAGS=-cstlinkv2 -pstm8s105?4
|
||||
|
||||
SRC=$(wildcard *.c)
|
||||
|
||||
OBJ=$(SRC:%.c=%.rel)
|
||||
TRASH=$(OBJ) $(SRC:%.c=%.rst) $(SRC:%.c=%.asm) $(SRC:%.c=%.lst)
|
||||
TRASH+=$(SRC:%.c=%.sym) $(NAME).lk $(NAME).map $(NAME).cdb
|
||||
INDEPENDENT_HEADERS=../stm8l.h ports_definition.h Makefile
|
||||
|
||||
all: $(NAME).ihx
|
||||
|
||||
#$(SRC) : %.c : %.h $(INDEPENDENT_HEADERS)
|
||||
# @touch $@
|
||||
#
|
||||
#%.h: ;
|
||||
|
||||
clean:
|
||||
rm -f $(TRASH)
|
||||
|
||||
load: $(NAME).ihx
|
||||
stm8flash $(FLASHFLAGS) -w $(NAME).ihx
|
||||
|
||||
gentags:
|
||||
CFLAGS="$(CFLAGS) $(DEFS)" geany -g $(NAME).c.tags *[hc] 2>/dev/null
|
||||
|
||||
%.rel: %.c
|
||||
$(SDCC) $(CCFLAGS) -c $<
|
||||
|
||||
bin: $(NAME).ihx
|
||||
objcopy -I ihex -O binary $< $(NAME).bin
|
||||
|
||||
$(NAME).ihx: $(OBJ)
|
||||
$(SDCC) $(LDFLAGS) $(OBJ) -o $(NAME).ihx
|
||||
|
||||
.PHONY: clean load gentags
|
||||
Reference in New Issue
Block a user