pull any variable from meta-info
This commit is contained in:
parent
a725ef2cdd
commit
9eea807d55
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=at_start_f435
|
SHORT_BOARD_NAME=at_start_f435
|
||||||
BOARD_CPU=ARCH_AT32F4
|
PROJECT_CPU=ARCH_AT32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=atlas
|
SHORT_BOARD_NAME=atlas
|
||||||
BOARD_CPU=ARCH_STM32H7
|
PROJECT_CPU=ARCH_STM32H7
|
||||||
|
|
|
@ -8,7 +8,8 @@ if [ -z "$1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOARD_META_PATH=./$1
|
BOARD_META_PATH=./$1
|
||||||
export BOARD_DIR=${BOARD_META_PATH%/*}
|
BOARD_META_DIR=${BOARD_META_PATH%/*}
|
||||||
|
export BOARD_DIR=${BOARD_DIR:-$BOARD_META_DIR}
|
||||||
|
|
||||||
if [ ! -f ${BOARD_META_PATH} ]; then
|
if [ ! -f ${BOARD_META_PATH} ]; then
|
||||||
echo "Read meta.env: The file was not found!"
|
echo "Read meta.env: The file was not found!"
|
||||||
|
@ -21,12 +22,16 @@ fi
|
||||||
|
|
||||||
echo "[META] Reading meta env from ${BOARD_META_PATH}"
|
echo "[META] Reading meta env from ${BOARD_META_PATH}"
|
||||||
|
|
||||||
export SHORT_BOARD_NAME="$(grep "SHORT_BOARD_NAME=" ${BOARD_META_PATH} | cut -d'=' -f2)"
|
VARS=$(grep "=" "$BOARD_META_PATH")
|
||||||
export PROJECT_CPU="$(grep "BOARD_CPU=" ${BOARD_META_PATH} | cut -d'=' -f2)"
|
|
||||||
export POST_BUILD_SCRIPT="$(grep "POST_BUILD_SCRIPT=" ${BOARD_META_PATH} | cut -d'=' -f2)"
|
|
||||||
|
|
||||||
# todo: is PROJECT_BOARD always the same as SHORT_BOARD_NAME?
|
while IFS= read -r L; do
|
||||||
export PROJECT_BOARD=${SHORT_BOARD_NAME}
|
# get the key and delete all spaces
|
||||||
|
K=$(echo "$L" | cut -d '=' -f "-1" | tr -d ' ')
|
||||||
|
# get the value and delete any leading space
|
||||||
|
V=$(echo "$L" | cut -d '=' -f "2-" | awk '{$1=$1};1')
|
||||||
|
# put them together, closing the value in quotes
|
||||||
|
export $K="$V"
|
||||||
|
done <<< "$VARS"
|
||||||
|
|
||||||
echo "[META] PROJECT_BOARD=${PROJECT_BOARD}"
|
echo "[META] PROJECT_BOARD=${PROJECT_BOARD}"
|
||||||
echo "[META] PROJECT_CPU=${PROJECT_CPU}"
|
echo "[META] PROJECT_CPU=${PROJECT_CPU}"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=cypress
|
SHORT_BOARD_NAME=cypress
|
||||||
BOARD_CPU=custom_platform
|
PROJECT_CPU=custom_platform
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=f407-discovery
|
SHORT_BOARD_NAME=f407-discovery
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=f407-discovery
|
SHORT_BOARD_NAME=f407-discovery
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=haba208
|
SHORT_BOARD_NAME=haba208
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=f429-discovery
|
SHORT_BOARD_NAME=f429-discovery
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=f469-discovery
|
SHORT_BOARD_NAME=f469-discovery
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=frankenso_na6
|
SHORT_BOARD_NAME=frankenso_na6
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-2chan
|
SHORT_BOARD_NAME=alphax-2chan
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-4chan
|
SHORT_BOARD_NAME=alphax-4chan
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-4chan_f7
|
SHORT_BOARD_NAME=alphax-4chan_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-8chan-revA
|
SHORT_BOARD_NAME=alphax-8chan-revA
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-8chan
|
SHORT_BOARD_NAME=alphax-8chan
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-8chan
|
SHORT_BOARD_NAME=alphax-8chan
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=alphax-8chan_f7
|
SHORT_BOARD_NAME=alphax-8chan_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-112-17
|
SHORT_BOARD_NAME=hellen-112-17
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-112-17
|
SHORT_BOARD_NAME=hellen-112-17
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-gm-e67
|
SHORT_BOARD_NAME=hellen-gm-e67
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-honda-k
|
SHORT_BOARD_NAME=hellen-honda-k
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-honda-k
|
SHORT_BOARD_NAME=hellen-honda-k
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen-nb1
|
SHORT_BOARD_NAME=hellen-nb1
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen121nissan
|
SHORT_BOARD_NAME=hellen121nissan
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen121vag
|
SHORT_BOARD_NAME=hellen121vag
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen128
|
SHORT_BOARD_NAME=hellen128
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen154hyundai
|
SHORT_BOARD_NAME=hellen154hyundai
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen154hyundai_f7
|
SHORT_BOARD_NAME=hellen154hyundai_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellenNA6
|
SHORT_BOARD_NAME=hellenNA6
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen72
|
SHORT_BOARD_NAME=hellen72
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen81
|
SHORT_BOARD_NAME=hellen81
|
||||||
BOARD_CPU=ARCH_STM32H7
|
PROJECT_CPU=ARCH_STM32H7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen88bmw
|
SHORT_BOARD_NAME=hellen88bmw
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellen88bmw
|
SHORT_BOARD_NAME=hellen88bmw
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=hellenNA8_96
|
SHORT_BOARD_NAME=hellenNA8_96
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=small-can-board
|
SHORT_BOARD_NAME=small-can-board
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=small-can-board
|
SHORT_BOARD_NAME=small-can-board
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=uaefi
|
SHORT_BOARD_NAME=uaefi
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=kin
|
SHORT_BOARD_NAME=kin
|
||||||
BOARD_CPU=custom_platform
|
PROJECT_CPU=custom_platform
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=m74_9
|
SHORT_BOARD_NAME=m74_9
|
||||||
BOARD_CPU=ARCH_AT32F4
|
PROJECT_CPU=ARCH_AT32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=mre_f4
|
SHORT_BOARD_NAME=mre_f4
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=mre_f4
|
SHORT_BOARD_NAME=mre_f4
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=nucleo_f413
|
SHORT_BOARD_NAME=nucleo_f413
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=stm32f429_nucleo
|
SHORT_BOARD_NAME=stm32f429_nucleo
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=stm32f767_nucleo
|
SHORT_BOARD_NAME=stm32f767_nucleo
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=stm32f767_nucleo
|
SHORT_BOARD_NAME=stm32f767_nucleo
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=stm32f767_nucleo
|
SHORT_BOARD_NAME=stm32f767_nucleo
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=stm32h743_nucleo
|
SHORT_BOARD_NAME=stm32h743_nucleo
|
||||||
BOARD_CPU=ARCH_STM32H7
|
PROJECT_CPU=ARCH_STM32H7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=prometheus_405
|
SHORT_BOARD_NAME=prometheus_405
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=prometheus_469
|
SHORT_BOARD_NAME=prometheus_469
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f4
|
SHORT_BOARD_NAME=proteus_f4
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f4
|
SHORT_BOARD_NAME=proteus_f4
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f4
|
SHORT_BOARD_NAME=proteus_f4
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f7
|
SHORT_BOARD_NAME=proteus_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f7
|
SHORT_BOARD_NAME=proteus_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f7
|
SHORT_BOARD_NAME=proteus_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_h7
|
SHORT_BOARD_NAME=proteus_h7
|
||||||
BOARD_CPU=ARCH_STM32H7
|
PROJECT_CPU=ARCH_STM32H7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_h7
|
SHORT_BOARD_NAME=proteus_h7
|
||||||
BOARD_CPU=ARCH_STM32H7
|
PROJECT_CPU=ARCH_STM32H7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=proteus_f7
|
SHORT_BOARD_NAME=proteus_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=s105
|
SHORT_BOARD_NAME=s105
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=subaru_eg33_f7
|
SHORT_BOARD_NAME=subaru_eg33_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=subaru_eg33_f7
|
SHORT_BOARD_NAME=subaru_eg33_f7
|
||||||
BOARD_CPU=ARCH_STM32F7
|
PROJECT_CPU=ARCH_STM32F7
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=tdg-pdm8
|
SHORT_BOARD_NAME=tdg-pdm8
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHORT_BOARD_NAME=t-b-g
|
SHORT_BOARD_NAME=t-b-g
|
||||||
BOARD_CPU=ARCH_STM32F4
|
PROJECT_CPU=ARCH_STM32F4
|
||||||
|
|
|
@ -18,8 +18,12 @@ $(error Please run 'make' again. Please make sure you have 'git' command in PATH
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_BOARD),)
|
ifeq ($(PROJECT_BOARD),)
|
||||||
|
ifneq ($(SHORT_BOARD_NAME),)
|
||||||
|
PROJECT_BOARD = $(SHORT_BOARD_NAME)
|
||||||
|
else
|
||||||
PROJECT_BOARD = f407-discovery
|
PROJECT_BOARD = f407-discovery
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
BOARDS_DIR = $(PROJECT_DIR)/config/boards
|
BOARDS_DIR = $(PROJECT_DIR)/config/boards
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue