Revision 4c72a54c bootloader/bootloader.mk

View differences:

bootloader/bootloader.mk
24 24

  
25 25

  
26 26
# the path to this makefile
27
BOOTLOADER_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
27
AMIROOS_BOOTLOADER_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
28 28

  
29
# the interface for the bootloader
30
BOOTLOADERINC = $(BOOTLOADER_DIR)AMiRo-BLT/Target/Source/AMiRo
29
# set AMiRo-BLT path variable
30
AMIROBLT := $(AMIROOS_BOOTLOADER_DIR)AMiRo-BLT
31 31

  
32
include $(BOOTLOADER_DIR)AMiRo-BLT/Target/Modules/moduleids.mk
32
# include paths
33
AMIROOS_BOOTLOADER_INC = $(AMIROBLT)/Target/Source/AMiRo
34

  
35
# load module ID constants
36
include $(AMIROBLT)/Target/Modules/moduleids.mk
33 37

  
34 38
# some flashing parameters
35 39
ifeq ($(OS),Windows_NT)
......
52 56
FLASH_BAUDRATE ?= 115200
53 57

  
54 58
# set the flashing tool, the command to call it, arguments, and file extensions
55
ifneq ($(wildcard $(BOOTLOADER_DIR)AMiRo-BLT/Host/Source/SerialBoot/build/SerialBoot),)
59
ifneq ($(wildcard $(AMIROBLT)/Host/Source/SerialBoot/build/SerialBoot),)
56 60
	# if AMiRo-BLT project is available, use SerialBoot
57
	FLASHTOOL = SerialBoot
58
	FLASHTOOL_CMD = $(BOOTLOADER_DIR)AMiRo-BLT/Host/Source/SerialBoot/build/SerialBoot
59
	FLASHTOOL_EXT = srec
61
	FLASHTOOL := SerialBoot
62
	FLASHTOOL_CMD := $(AMIROBLT)/Host/Source/SerialBoot/build/SerialBoot
63
	FLASHTOOL_EXT := srec
60 64
	FLASHTOOL_ARGS = -d$(FLASH_PORT) -b$(FLASH_BAUDRATE) $(foreach module,$(FLASH_MODULES),-T$($(module)_ID_HEX) $(BUILDDIR)/$(module).$(FLASHTOOL_EXT))
61 65
else
62 66
	# the default tool to use is stm32flash
63 67
	ifneq ($(words $(FLASH_MODULES)),1)
64 68
		FLASH_MODULES := $(firstword $(FLASH_MODULES))
65 69
	endif
66
	FLASHTOOL = stm32flash
67
	FLASHTOOL_CMD = stm32flash
68
	FLASHTOOL_EXT = hex
70
	FLASHTOOL := stm32flash
71
	FLASHTOOL_CMD := stm32flash
72
	FLASHTOOL_EXT := hex
69 73
	FLASHTOOL_ARGS = $(FLASH_PORT) -i "rts,-dtr,-rts":"rts,dtr,-rts" -R -b $(FLASH_BAUDRATE) -w $(BUILDDIR)/$(FLASH_MODULES).$(FLASHTOOL_EXT)
70 74
endif
71 75

  

Also available in: Unified diff