summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/product-mini/platforms/esp-idf/build_and_run.sh
blob: dd8dd5ca9b597c4e0e23f7895a94ed6181ae9b4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash -e

# Copyright (C) 2019-21 Intel Corporation and others.  All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

ESP32_TARGET="esp32"
ESP32C3_TARGET="esp32c3"

usage ()
{
        echo "USAGE:"
        echo "$0 $ESP32_TARGET|$ESP32C3_TARGET"
        echo "Example:"
        echo "        $0 $ESP32_TARGET"
        echo "        $0 $ESP32C3_TARGET"
        exit 1
}

if [ $# != 1 ] ; then
        usage
fi

TARGET=$1

if [[ -z "${WAMR_PATH}" ]]; then
        export WAMR_PATH=$PWD/../../..
fi

rm -rf build
idf.py set-target $TARGET
idf.py build
idf.py flash