make, tmpl/tagged: Add basic microcontroller support

Add support for building the firmware of the Cortex M3 ST-NUCLEO-F103RB development board with an STM32 microcontroller. This commit add some hooks, notably support for tagged templates, but adds lots of crap, too, notably makefiles and variables that should have different names and / or functionality.

New makefiles are: Mcu-defs.mk mcu-exe.mk mcu-flash.mk mcu-tags.mk mcu-topdir.mk tagged-tmpl.mk, a new directory is tmpl/tagged.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-06 12:19:42 +00:00
commit df6c1ef9a1
12 changed files with 682 additions and 22 deletions

View file

@ -6,6 +6,8 @@
# endif
#endef
include $(MODDIR)/make/mcu-tags.mk
ifeq ($(MCU_BOARD_MODEL),)
error MCU_BOARD_MODEL not specified
endif
@ -18,6 +20,8 @@ ifeq ($(MCU_FLASH_SIZE),)
error MCU_FLASH_SIZE not specified
endif
MCU_PRODUCT_TMPL_DIR ?= $(MODDIR)/tmpl/products
MCU_BOARD_MODEL_LC ?= $(shell echo $(MCU_BOARD_MODEL) | tr '[A-Z]' '[a-z]')
MCU_BOARD ?= $(MCU_BOARD_MODEL)
MCU_BOARD_LC ?= $(shell echo $(MCU_BOARD) | tr '[A-Z]' '[a-z]')