Skip to content
Permalink
Browse files

Fixed automatic downloading and install scripts for getting leon tool…

… chain.
  • Loading branch information
Pete Blacker Pete Blacker
Pete Blacker authored and Pete Blacker committed Jul 9, 2019
1 parent 7287d5b commit 41852334f233565bbb9aa73d7aa719ec21fb731c
@@ -32,8 +32,9 @@ mkdir -p ${MICRO_LOG_PATH}
SCRIPT_PATH="`dirname \"$BASH_SOURCE\"`"
SCRIPT_PATH="`( cd \"$SCRIPT_PATH\" && pwd )`"
LEON_COMMANDS="$SCRIPT_PATH/leon_commands"
TSIM_PATH="tensorflow/lite/experimental/micro/tools/make/downloads/tsim/tsim/linux-x64/tsim-leon3"

tsim-leon3 $1 -c ${LEON_COMMANDS} 2>&1 | tee ${MICRO_LOG_FILENAME}
${TSIM_PATH} $1 -c ${LEON_COMMANDS} 2>&1 | tee ${MICRO_LOG_FILENAME}

if grep -q "$2" ${MICRO_LOG_FILENAME}
then
@@ -92,6 +92,8 @@ download_and_extract() {

if [[ "${url}" == *gz ]]; then
tar -C "${dir}" --strip-components=1 -xzf ${tempfile}
elif [[ "${url}" == *tar.xz ]]; then
tar -C "${dir}" --strip-components=1 -xf ${tempfile}
elif [[ "${url}" == *bz2 ]]; then
curl -Ls "${url}" > ${tempdir}/tarred.bz2
tar -C "${dir}" --strip-components=1 -xjf ${tempfile}
@@ -106,6 +108,8 @@ download_and_extract() {
else
cp -R ${tempdir2}/* ${dir}/
fi
else
echo "Error unsupported archive type. Failed to extract tool after download."
fi
rm -rf ${tempdir2} ${tempdir}

@@ -4,7 +4,7 @@ ifeq ($(TARGET), leon)
CXXFLAGS += -std=c++11 $(PLATFORM_FLAGS)
CCFLAGS += $(PLATFORM_FLAGS)
TARGET_ARCH := leon
TARGET_TOOLCHAIN_PREFIX := sparc-gaisler-elf-
TARGET_TOOLCHAIN_PREFIX := tensorflow/lite/experimental/micro/tools/make/downloads/leon_bcc2/bin/sparc-gaisler-elf-
TEST_SCRIPT := tensorflow/lite/experimental/micro/testing/test_leon_binary.sh
GCC_LEON := $(MAKEFILE_DIR)/downloads/leon_bcc2/

0 comments on commit 4185233

Please sign in to comment.
You can’t perform that action at this time.