Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed automatic downloading and install scripts for getting leon tool…
… chain.
  • Loading branch information
Pete Blacker authored and Pete Blacker committed Jul 9, 2019
1 parent 7287d5b commit 4185233
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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}
Expand All @@ -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}

Expand Down
Expand Up @@ -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/

Expand Down

0 comments on commit 4185233

Please sign in to comment.