rename build output
This commit is contained in:
parent
045674745a
commit
0e585570a3
|
@ -3,7 +3,7 @@
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
# Build directory
|
# Build directory
|
||||||
BUILD = _build/build-$(BOARD)
|
BUILD = _build/$(BOARD)
|
||||||
|
|
||||||
# Handy check parameter function
|
# Handy check parameter function
|
||||||
check_defined = \
|
check_defined = \
|
||||||
|
@ -13,6 +13,12 @@ __check_defined = \
|
||||||
$(if $(value $1),, \
|
$(if $(value $1),, \
|
||||||
$(error Undefined make flag: $1$(if $2, ($2))))
|
$(error Undefined make flag: $1$(if $2, ($2))))
|
||||||
|
|
||||||
|
# TODO Check if submodule haven't checkout yet
|
||||||
|
fetch_submodule_if_empty = \
|
||||||
|
ifeq ($(wildcard $(TOP)/$1/*),) \
|
||||||
|
$(info $(shell git -C $(TOP) submodule update --init)) \
|
||||||
|
endif
|
||||||
|
|
||||||
#-------------- Select the board to build for. ------------
|
#-------------- Select the board to build for. ------------
|
||||||
#BOARD_LIST = $(sort $(subst /.,,$(subst $(TOP)/hw/bsp/,,$(wildcard $(TOP)/hw/bsp/*/.))))
|
#BOARD_LIST = $(sort $(subst /.,,$(subst $(TOP)/hw/bsp/,,$(wildcard $(TOP)/hw/bsp/*/.))))
|
||||||
#ifeq ($(filter $(BOARD),$(BOARD_LIST)),)
|
#ifeq ($(filter $(BOARD),$(BOARD_LIST)),)
|
||||||
|
@ -45,6 +51,8 @@ else
|
||||||
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
|
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#TODO $(call fetch_submodule_if_empty,lib/sct_neopixel)
|
||||||
|
|
||||||
#-------------- Cross Compiler ------------
|
#-------------- Cross Compiler ------------
|
||||||
# Can be set by board, default to ARM GCC
|
# Can be set by board, default to ARM GCC
|
||||||
CROSS_COMPILE ?= arm-none-eabi-
|
CROSS_COMPILE ?= arm-none-eabi-
|
||||||
|
|
|
@ -74,8 +74,8 @@ def build_board(example, board):
|
||||||
print(build_result.stdout.decode("utf-8"))
|
print(build_result.stdout.decode("utf-8"))
|
||||||
|
|
||||||
def build_size(example, board):
|
def build_size(example, board):
|
||||||
#elf_file = 'examples/device/{}/_build/build-{}/{}-firmware.elf'.format(example, board, board)
|
#elf_file = 'examples/device/{}/_build/{}/{}-firmware.elf'.format(example, board, board)
|
||||||
elf_file = 'examples/{}/_build/build-{}/*.elf'.format(example, board)
|
elf_file = 'examples/{}/_build/{}/*.elf'.format(example, board)
|
||||||
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
||||||
size_list = size_output.split('\n')[1].split('\t')
|
size_list = size_output.split('\n')[1].split('\t')
|
||||||
flash_size = int(size_list[0])
|
flash_size = int(size_list[0])
|
||||||
|
|
|
@ -72,8 +72,8 @@ def build_board(example, board):
|
||||||
print(build_result.stdout.decode("utf-8"))
|
print(build_result.stdout.decode("utf-8"))
|
||||||
|
|
||||||
def build_size(example, board):
|
def build_size(example, board):
|
||||||
#elf_file = 'examples/device/{}/_build/build-{}/{}-firmware.elf'.format(example, board, board)
|
#elf_file = 'examples/device/{}/_build/{}/{}-firmware.elf'.format(example, board, board)
|
||||||
elf_file = 'examples/device/{}/_build/build-{}/*.elf'.format(example, board)
|
elf_file = 'examples/device/{}/_build/{}/*.elf'.format(example, board)
|
||||||
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
||||||
size_list = size_output.split('\n')[1].split('\t')
|
size_list = size_output.split('\n')[1].split('\t')
|
||||||
flash_size = int(size_list[0])
|
flash_size = int(size_list[0])
|
||||||
|
|
|
@ -85,8 +85,8 @@ def build_board(example, board):
|
||||||
print(build_result.stdout.decode("utf-8"))
|
print(build_result.stdout.decode("utf-8"))
|
||||||
|
|
||||||
def build_size(example, board):
|
def build_size(example, board):
|
||||||
#elf_file = 'examples/device/{}/_build/build-{}/{}-firmware.elf'.format(example, board, board)
|
#elf_file = 'examples/device/{}/_build/{}/{}-firmware.elf'.format(example, board, board)
|
||||||
elf_file = 'examples/{}/_build/build-{}/*.elf'.format(example, board)
|
elf_file = 'examples/{}/_build/{}/*.elf'.format(example, board)
|
||||||
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
|
||||||
size_list = size_output.split('\n')[1].split('\t')
|
size_list = size_output.split('\n')[1].split('\t')
|
||||||
flash_size = int(size_list[0])
|
flash_size = int(size_list[0])
|
||||||
|
|
Loading…
Reference in New Issue