add code for STM8-based 2stepper management board

This commit is contained in:
eddyem
2018-10-09 18:18:58 +03:00
parent c975836b2c
commit 3f6b0a3500
40 changed files with 3485 additions and 607 deletions

30
STM8/platform/Makefile Normal file
View File

@@ -0,0 +1,30 @@
NAME=sco_platform
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)
#DEFS = -DEBUG
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
clean:
rm -f $(TRASH)
load: $(NAME).ihx
stm8flash $(FLASHFLAGS) -w $(NAME).ihx
%.rel: %.c
$(SDCC) $(CCFLAGS) $(DEFS) -c $<
$(NAME).ihx: $(OBJ)
$(SDCC) $(LDFLAGS) $(OBJ) -o $(NAME).ihx
.PHONY: all