Commit 64006d5c authored by Lucas Russo's avatar Lucas Russo

*compile.sh: add EXTRA_FLAGS option to be passed to Makefiles

parent 5d540d0a
......@@ -27,6 +27,8 @@ if [ -n "$WITH_EXAMPLES" ] && [ "$WITH_EXAMPLES" != "with_examples" ] && [ "$WIT
exit 1
fi
EXTRA_FLAGS=$3
# Select if we want to have the AFCv3 DDR memory shrink to 2^28 or the full size 2^32. Options are: (y)es ot (n)o.
# This is a TEMPORARY fix until the AFCv3 FPGA firmware is fixed. If unsure, select (y)es.
SHRINK_AFCV3_DDR_SIZE=y
......@@ -61,11 +63,13 @@ CFG=lnls_defconfig
export CFG
COMMAND_DEPS="\
make deps && \
make ${EXTRA_FLAGS} deps && \
sudo make deps_install"
COMMAND_HAL="\
make BOARD=${BOARD} \
make \
${EXTRA_FLAGS} \
BOARD=${BOARD} \
SHRINK_AFCV3_DDR_SIZE=${SHRINK_AFCV3_DDR_SIZE} \
ERRHAND_DBG=${ERRHAND_DBG} \
ERRHAND_MIN_LEVEL=${ERRHAND_MIN_LEVEL} \
......@@ -80,7 +84,9 @@ COMMAND_HAL="\
sudo make CFG=${CFG} install"
COMMAND_LIBBPMCLIENT="\
make BOARD=${BOARD} \
make \
${EXTRA_FLAGS} \
BOARD=${BOARD} \
ERRHAND_DBG=${ERRHAND_DBG} \
ERRHAND_MIN_LEVEL=${ERRHAND_MIN_LEVEL} \
ERRHAND_SUBSYS_ON='"${ERRHAND_SUBSYS_ON}"' \
......@@ -89,7 +95,7 @@ COMMAND_LIBBPMCLIENT="\
if [ "$WITH_EXAMPLES" = "with_examples" ]; then
COMMAND_EXAMPLES="\
make examples"
make ${EXTRA_FLAGS} examples"
else
COMMAND_EXAMPLES=""
fi
......
#!/bin/bash
#!/usr/bin/env bash
VALID_BOARDS_STR="Valid values are: \"ml605\" and \"afcv3\"."
#######################################
# All of our Makefile options
#######################################
# Select board in which we will work. Options are: ml605 or afcv3
BOARD=afcv3
BOARD=$1
if [ -z "$BOARD" ]; then
echo "\"BOARD\" variable unset. "$VALID_BOARDS_STR
exit 1
fi
if [ "$BOARD" != "afcv3" ] && [ "$BOARD" != "ml605" ]; then
echo "Unsupported board. "$VALID_BOARDS_STR
exit 1
fi
EXTRA_FLAGS=$2
#Select if we want to compile with debug mode on. Options are: y(es) or n(o)
ERRHAND_DBG=y
# Select the minimum debug verbosity. See liberrhand file errhand_opts.h for more info.
......@@ -13,7 +30,9 @@ ERRHAND_SUBSYS_ON='"(DBG_DEV_MNGR | DBG_DEV_IO | DBG_SM_IO | DBG_LIB_CLIENT | DB
# Select the FMC ADC board type. Options are: passive or active
COMMAND_LIBBPMCLIENT="\
make BOARD=${BOARD} \
make \
${EXTRA_FLAGS} \
BOARD=${BOARD} \
ERRHAND_DBG=${ERRHAND_DBG} \
ERRHAND_MIN_LEVEL=${ERRHAND_MIN_LEVEL} \
ERRHAND_SUBSYS_ON='"${ERRHAND_SUBSYS_ON}"' && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment