Revision 2f5f6722

View differences:

bootloader/bootloader.mk
57 57
	FLASHTOOL = SerialBoot
58 58
	FLASHTOOL_CMD = $(BOOTLOADER_DIR)AMiRo-BLT/Host/Source/SerialBoot/build/SerialBoot
59 59
	FLASHTOOL_EXT = srec
60
	ifdef PROJECT
61
		FLASHTOOL_ARGS = -d$(FLASH_PORT) -b$(FLASH_BAUDRATE) $(foreach module,$(FLASH_MODULES),-T$($(module)_ID_HEX) build/$(module).$(FLASHTOOL_EXT))
62
	else
63
		FLASHTOOL_ARGS = -d$(FLASH_PORT) -b$(FLASH_BAUDRATE) $(foreach module,$(FLASH_MODULES),-T$($(module)_ID_HEX) $(FLASH_DIR)$(module)/build/$(module).$(FLASHTOOL_EXT))
64
	endif
60
	FLASHTOOL_ARGS = -d$(FLASH_PORT) -b$(FLASH_BAUDRATE) $(foreach module,$(FLASH_MODULES),-T$($(module)_ID_HEX) $(BUILDDIR)/$(module).$(FLASHTOOL_EXT))
65 61
else
66 62
	# the default tool to use is stm32flash
67 63
	ifneq ($(words $(FLASH_MODULES)),1)
......
70 66
	FLASHTOOL = stm32flash
71 67
	FLASHTOOL_CMD = stm32flash
72 68
	FLASHTOOL_EXT = hex
73
	ifdef PROJECT
74
		FLASHTOOL_ARGS = $(FLASH_PORT) -i "rts,-dtr,-rts":"rts,dtr,-rts" -R -b $(FLASH_BAUDRATE) -w build/$(FLASH_MODULES).$(FLASHTOOL_EXT)
75
	else
76
		FLASHTOOL_ARGS = $(FLASH_PORT) -i "rts,-dtr,-rts":"rts,dtr,-rts" -R -b $(FLASH_BAUDRATE) -w $(FLASH_MODULES)/build/$(FLASH_MODULES).$(FLASHTOOL_EXT)
77
	endif
69
	FLASHTOOL_ARGS = $(FLASH_PORT) -i "rts,-dtr,-rts":"rts,dtr,-rts" -R -b $(FLASH_BAUDRATE) -w $(BUILDDIR)/$(FLASH_MODULES).$(FLASHTOOL_EXT)
78 70
endif
79 71

  
modules/DiWheelDrive_1-1/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m3
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..
modules/LightRing_1-0/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m3
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..
modules/NUCLEO-F103RB/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m3
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..
modules/NUCLEO-L476RG/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m4
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..
modules/PowerManagement_1-1/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m4
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..
modules/STM32F407G-DISC1/Makefile
112 112
# Project, target, sources and paths                                           #
113 113
#                                                                              #
114 114

  
115
# Absolute path to the project
116
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
117

  
115 118
# Define project name here
116
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
119
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
117 120

  
118 121
# Target settings.
119 122
MCU = cortex-m4
......
123 126
CHIBIOS    := $(AMIROOS_KERNEL)
124 127
CONFDIR    := .
125 128
ifeq ($(BUILDDIR),)
126
  BUILDDIR := ./build
129
  BUILDDIR := $(PROJECT_PATH)/build
127 130
endif
128 131
DEPDIR     := $(dir $(BUILDDIR)).dep
129 132
AMIROOS    := ../..

Also available in: Unified diff