Files
jerryscript/targets/baremetal-sdk/espressif/esp-idf/Makefile.travis
T
Gergo Csizi baf308a7ae Fix ESPIDF_Build_Test (#5019)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-08-01 22:10:42 +02:00

53 lines
1.9 KiB
Makefile

# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Default target for running the build test outside the Travis CI environment.
all:
$(MAKE) install
$(MAKE) script
## Targets for installing build dependencies of the ESP8266 JerryScript target.
# Install tools via apt.
install-apt-get-deps:
sudo apt-get install -q -y wget
# Fetch and extract Xtensa toolchain.
install-xtensa-esp32-gcc:
wget https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz --no-check-certificate --directory-prefix /tmp
tar xvfz /tmp/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz --directory /tmp
# Fetch Espressif IoT Development Framework and install its dependencies.
install-esp-idf:
git clone https://github.com/espressif/esp-idf.git /tmp/esp-idf -b release/v4.4
IDF_PATH=/tmp/esp-idf python -m pip install --user -r /tmp/esp-idf/requirements.txt
# Perform all the necessary (JerryScript-independent) installation steps.
install-noapt: install-xtensa-esp32-gcc install-esp-idf
install: install-apt-get-deps install-noapt
## Targets for building ESP-IDF with JerryScript.
# Build the firmware (ESP-IDF with JerryScript).
script:
PATH=/tmp/xtensa-esp32-elf/bin:$(PATH) \
python /tmp/esp-idf/tools/idf.py \
--project-dir ./targets/baremetal-sdk/espressif \
--build-dir ./build/esp-idf \
set-target esp32 \
all