diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-08-31 01:21:54 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-08-31 01:21:54 +0200 |
commit | dbb8ce2c63e8fa8ba351e13f6702853aa6b08ab5 (patch) | |
tree | f4186a4dc4c84bf8cfebfdd9de6f28f1f682d432 | |
parent | added stm8-serial-flasher (diff) |
stm8_serial_flasher is now stm8gal
added new board devminimum (aka little blue stm8s dev board from ali express)
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | blink/Makefile | 2 | ||||
-rw-r--r-- | contrib/Makefile | 26 | ||||
-rw-r--r-- | defines.mk | 10 | ||||
-rw-r--r-- | include.mk | 10 |
5 files changed, 38 insertions, 12 deletions
@@ -14,3 +14,5 @@ contrib/stsw-stm8069.zip contrib/STM8S_StdPeriph_Lib/ contrib/.stm8flash.prepared contrib/stm8flash +contrib/.stm8gal.prepared +contrib/STM8gal diff --git a/blink/Makefile b/blink/Makefile index e89d98f..cca47ea 100644 --- a/blink/Makefile +++ b/blink/Makefile @@ -21,7 +21,7 @@ ## NAME := blink -BOARD_TYPE := discovery +BOARD_TYPE := devminimum OBJ := $(NAME).rel LIBS := util led EXTERNAL_LIBS := spl diff --git a/contrib/Makefile b/contrib/Makefile index 8e94812..79f730a 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -20,9 +20,11 @@ ## along with spreadspace stm8 utils. If not, see <http://www.gnu.org/licenses/>. ## -all: download-spl update-stm8flash update-stm8_serial_flasher +all: download-spl update-stm8flash update-stm8gal doxygen := $(shell which doxygen) +clean: clean-spl clean-stm8flash clean-stm8gal + download-spl: stsw-stm8069.zip stsw-stm8069.zip: @@ -30,6 +32,11 @@ stsw-stm8069.zip: unzip $@ cd STM8S_StdPeriph_Lib; patch -p1 < ../STM8_SPL_v2.2.0_SDCC.patch; $(doxygen) +clean-spl: + rm -rf STM8S_StdPeriph_Lib + rm -f stsw-stm8069.zip + + .stm8flash.prepared: git clone https://github.com/vdudouyt/stm8flash.git touch $@ @@ -37,9 +44,18 @@ stsw-stm8069.zip: update-stm8flash: .stm8flash.prepared cd stm8flash; git pull; make -.stm8_serial_flasher.prepared: - git clone https://github.com/gicking/STM8_serial_flasher.git +clean-stm8flash: + rm -rf stm8flash + rm -f .stm8flash.prepared + + +.stm8gal.prepared: + git clone https://github.com/gicking/STM8gal.git touch $@ -update-stm8_serial_flasher: .stm8_serial_flasher.prepared - cd STM8_serial_flasher; git pull; make +update-stm8gal: .stm8gal.prepared + cd STM8gal; git pull; make + +clean-stm8gal: + rm -rf STM8gal + rm -f .stm8gal.prepared @@ -29,6 +29,14 @@ ifeq ($(BOARD_TYPE),discovery) LED_PINNUM := 0 PROG := stm8flash endif +ifeq ($(BOARD_TYPE),devminimum) + MCU := stm8s103f3 + SPL_MCU := STM8S103 + LED_CNT := 1 + LED_GPIO := GPIOD + LED_PINNUM := 3 + PROG := stm8flash +endif CC = sdcc PP = sdcpp @@ -37,7 +45,7 @@ AR = sdar rcs LIB_DIR = $(SPREADSTM8_PATH)/lib stm8flash = $(SPREADSTM8_PATH)/contrib/stm8flash/stm8flash -stm8_serial_flasher = $(SPREADSTM8_PATH)/contrib/STM8_serial_flasher/STM8_serial_flasher +stm8gal = $(SPREADSTM8_PATH)/contrib/STM8gal/stm8gal ## Options common to C compiler CFLAGS = -mstm8 @@ -141,15 +141,15 @@ endef define stm8flash/run endef -### stm8_serial_flasher -define stm8flash/erase +### stm8gal +define stm8gal/erase endef -define stm8flash/flash - $(stm8_serial_flasher) -p $(UPLOAD_PORT) -b $(UPLOAD_RATE) -w $1 -Q +define stm8gal/flash + $(stm8gal) -p $(UPLOAD_PORT) -b $(UPLOAD_RATE) -w $1 -Q endef -define stm8flash/run +define stm8gal/run endef ### Program Targets |