Statistics
| Branch: | Tag: | Revision:

amiro-os / os / modules / flash.mk @ 76ca5065

History | View | Annotate | Download (2.663 KB)

1 e545e620 Thomas Schöpping
################################################################################
2
# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23
24
25
26
# the path to this makefile
27
FLASH_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
28
29
include $(FLASH_DIR)../../bootloader/bootloader.mk
30
31
#FLASH_MODULES = $(PROJECT)
32
#FLASH_FILE = build/$(FLASH_MODULES).$(FLASHTOOL_EXT)
33
34
# supported modules and according IDs
35
#MODULES := DiWheelDrive_1-1 PowerManagement_1-1 LightRing_1-0
36
#DiWheelDrive_1-1 := $(shell printf "%u" 0x01000101)
37
#PowerManagement_1-1 := $(shell printf "%u" 0x01010101)
38
#LightRing_1-0 := $(shell printf "%u" 0x017F0100)
39
40
# the files to flash
41
ifdef PROJECT
42
  FLASH_MODULES = $(PROJECT)
43
  FLASH_FILES = build/$(PROJECT).$(FLASHTOOL_EXT)
44
else
45
  FLASH_MODULES = $(MODULES)
46
  FLASH_FILES = $(foreach module,$(MODULES),$(module)/build/$(module).$(FLASHTOOL_EXT))
47
endif
48
49
flash: $(FLASH_FILES)
50
	$(info )
51
ifeq ($(FLASHTOOL),SerialBoot)
52
	$(info Flashing ($(FLASHTOOL)):)
53
	$(FLASHTOOL_CMD) $(FLASHTOOL_ARGS)
54
else
55
	$(info ERROR: unable to flash the module (SerialBoot unavailable))
56
endif