diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-08-26 00:12:55 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-08-26 00:12:55 +0200 |
commit | fd1895848012bc5b7f39969aea3759326dbd3ce5 (patch) | |
tree | 20e7eddb2f427e9e18baddfbee90e724b8fdb36a /defines.mk |
initial commit
Diffstat (limited to 'defines.mk')
-rw-r--r-- | defines.mk | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/defines.mk b/defines.mk new file mode 100644 index 0000000..b32a734 --- /dev/null +++ b/defines.mk @@ -0,0 +1,46 @@ +## +## spreadspace stm8 utils +## +## +## Copyright (C) 2017 Christian Pointner <equinox@spreadspace.org> +## +## This file is part of spreadspace stm8 utils. +## +## spreadspace stm8 utils is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## any later version. +## +## spreadspace stm8 utils is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with spreadspace stm8 utils. If not, see <http://www.gnu.org/licenses/>. +## + +ifeq ($(BOARD_TYPE),test) + MCU := stm8s105c6 + PROG := stm8flash + STDPERIPH_MCU := STM8S105 +endif + +CC = sdcc +AR = sdar rcs + +LIB_DIR = $(SPREADSTM8_PATH)/lib + +stm8flash = $(SPREADSTM8_PATH)/contrib/stm8flash/stm8flash + +## Options common to C compiler +CFLAGS = -mstm8 +CFLAGS += -p$(MCU) +# CFLAGS += --opt-code-speed +# CFLAGS += --opt-code-size +CFLAGS += -I$(LIB_DIR) +CFLAGS += -D__BOARD_$(BOARD_TYPE)__ + +## Linker flags +LDFLAGS = -mstm8 +LDFLAGS += -p$(MCU) |