* Rework the lib-builder for ESP-IDF v5.1 * Update package json with tolls matching the ESP-IDF version * fix: rainmaker examples crashing on s3 due to low stack memory. (#106) (#107) * Update scripts with the latest requirements * Update configs + SR Support * Add esp-elf-gdp to the list of packages * Fix RainMaker builds and new sr models path * Temporary force arduino branch for CI to work * fix target branch * Delete esp-dl component manifest for requiring IDF 4.4.x * Temporary changes to allow Cron CI to run * Support builds based on ESP-IDF tag * Push to esp32-arduino-libs * Update repository_dispatch.sh * Rework scripts to allow build when either dst needs it * Github complains when pushing to the libs repo * Authenticate to the libs repo * Attempt at splitting SDK from Arduino * Archive only the result and reorder deploy commands * Update cron.sh * Fix script and zip paths * Fix download URL and json merger * Change sdk folder structure and fix json generation * Switch output folder from sdk to esp32-arduino-libs * arduino_tinyusb: compile support for DFU mode (#116) * Update PlatformIO build script templates (#118) Adds support for new package with precompiled SDK libraries * Autogenerate PlatformIO manifest file for prebuilt SDK libs (#119) * Autogenerate PlatformIO manifest file for prebuilt SDK libs - Add a special Python script that generates "package.json" with IDF revision from the "version.txt" according to SemVer * Tidy up * Refactor manifest generator Now IDF version and commit hash are passed directly from Git client instead of reading from a pregenerated "version.txt" file * Move IDF definitions to be available with any build * Use more components from registry and add mp3 decoder * esp-sr component requires clearing before each build * revert ESP_SR from component manager * Build ESP_SR only for ESP32-S3 for now * [TinyUSB] Update esp32sx dcd and add dwc2 option * Workaround for recent change in ESP-Insights * Add initial support for ESP32-C6 * Run build tests on ESP32-C6 * Remove -mlongcalls for non-xtensa chips * Temp fix for ESP-Insights on C6 * Add support for ESP32H2 * Added tflite-micro component (#128) * Update build badge in README.md * Added tflite-micro component --------- Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> * Make cron rebuild the libs if they need to be pushed to Arduino For when we change something in the lib-builder, but no new updates are available in ESP-IDF * Update build actions * Fix permissions * Do not build for obsolete Flash modes * Try separate detect for cron builds * Add permissions to github api * Try more basic commit detection * another try to pass vars and get commit * Update push.yml * Update config.sh * Enable builds again * Update build.sh * Combine the artifacts from all jobs * fix and test deploy check * Update push.yml * Disable Memprot to allow loading external elfs * Fix archive name * Disable coredump to flash * Enable SPI ETH KSZ8851SNL * Add temporary support for Arduino SPI Ethernet * Add a temporary fix for relative include in BT lib * Enable Classic BT HID Host and Device for ESP32 * Revert "Enable Classic BT HID Host and Device for ESP32" This reverts commit aa0040ad271d00ac507fd2b478ee143b6c118615. * C6 was added to ESP-SR * Update Ethernet and remove SR workaround * Pin RainMaker version * Update target branch * Add back cron.sh --------- Co-authored-by: Sanket Wadekar <67091512+sanketwadekar@users.noreply.github.com> Co-authored-by: Luca Burelli <pil@iol.it> Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
124 lines
No EOL
3.7 KiB
Python
124 lines
No EOL
3.7 KiB
Python
# This file is expected to be present in ${COMPONENT_DIR}
|
|
# accessed from components/esp_insights/CMakeLists.txt
|
|
# Used in:
|
|
# 1. Project ESP Insights build package tar file
|
|
|
|
#from __future__ import unicode_literals
|
|
import os
|
|
import sys
|
|
import json
|
|
import subprocess
|
|
from builtins import range, str
|
|
from io import open
|
|
|
|
# Input project directory from CMakeLists.txt
|
|
PROJ_DIR=sys.argv[1]
|
|
# Input project name
|
|
PROJ_NAME=sys.argv[2]
|
|
# Input project version
|
|
PROJ_VER=sys.argv[3]
|
|
# Input custom config filename from CMakeLists.txt
|
|
FILENAME=sys.argv[4]
|
|
# Input IDF_PATH from CMakeLists.txt
|
|
IDF_PATH=sys.argv[5]
|
|
# Input target
|
|
TARGET=sys.argv[6]
|
|
|
|
NEWLINE = "\n"
|
|
|
|
CONFIG = {}
|
|
|
|
# Set Config
|
|
|
|
# Set current directory i.e Set ${COMPONENT_DIR} as current directory
|
|
CURR_DIR = os.getcwd()
|
|
|
|
def _change_dir(dirname):
|
|
# Change directory
|
|
os.chdir(dirname)
|
|
|
|
|
|
def _set_submodule_cfg(submodules, repo_name):
|
|
# Set config for submodules
|
|
CFG_TITLE = "submodules"
|
|
NAME_STR = "name"
|
|
VERSION_STR = "version"
|
|
CONFIG[repo_name][CFG_TITLE] = []
|
|
|
|
if submodules:
|
|
# Get the submodule name and version
|
|
submodules_list = submodules.strip().split(NEWLINE)
|
|
for i in range(0, len(submodules_list), 2):
|
|
name = submodules_list[i].split('\'')[1]
|
|
version = submodules_list[i+1]
|
|
submodule_json = { NAME_STR: name, VERSION_STR: version }
|
|
CONFIG[repo_name][CFG_TITLE].append(submodule_json)
|
|
|
|
|
|
def run_cmd(command, get_basename=False):
|
|
try:
|
|
resp = subprocess.check_output(command, shell=True).strip().decode('utf-8')
|
|
if get_basename:
|
|
resp = os.path.basename(resp)
|
|
return resp
|
|
except subprocess.CalledProcessError:
|
|
raise Exception("ERROR: Please check command : {}".format(command))
|
|
|
|
def set_cfg(config_name):
|
|
# Set config for ESP-IDF Repo
|
|
if config_name == "esp-idf":
|
|
# Get repo name (for IDF repo)
|
|
REPO_CMD='git rev-parse --show-toplevel'
|
|
repo_name = run_cmd(REPO_CMD, get_basename=True)
|
|
CONFIG[repo_name] = {}
|
|
|
|
# Get commit HEAD
|
|
GITHEAD_STR = "HEAD"
|
|
HEAD='git describe --always --tags --dirty'
|
|
head_ver = run_cmd(HEAD)
|
|
CONFIG[repo_name][GITHEAD_STR] = head_ver
|
|
|
|
# Get submodule latest refs
|
|
SUBMODULE = 'git submodule foreach git describe --always --tags --dirty'
|
|
submodules = run_cmd(SUBMODULE)
|
|
_set_submodule_cfg(submodules, repo_name)
|
|
elif config_name == "toolchain":
|
|
# Set config for Toolchain Version
|
|
arch_target = "xtensa-" + TARGET
|
|
if TARGET == "esp32c3" or TARGET == "esp32c2" or TARGET == "esp32h2" or TARGET == "esp32c6":
|
|
arch_target = "riscv32-esp"
|
|
# Get toolchain version
|
|
TOOLCHAIN_STR = "toolchain"
|
|
TOOLCHAIN = arch_target + '-elf-gcc --version'
|
|
toolchain = run_cmd(TOOLCHAIN)
|
|
CONFIG[TOOLCHAIN_STR] = toolchain.strip().split(NEWLINE)[0]
|
|
|
|
# Set project details - name and version
|
|
def set_project_details():
|
|
# Set project name and version
|
|
CONFIG['project'] = {}
|
|
CONFIG['project']['name'] = PROJ_NAME
|
|
CONFIG['project']['version'] = PROJ_VER
|
|
|
|
try:
|
|
with open(FILENAME, "w+", encoding="utf-8") as output_file:
|
|
# ESP-IDF REPO CONFIG
|
|
# Change to ESP-IDF Directory
|
|
_change_dir(IDF_PATH)
|
|
set_cfg("esp-idf")
|
|
|
|
# Change back to ${COMPONENT_DIR}
|
|
_change_dir(CURR_DIR)
|
|
|
|
# Set project name and version
|
|
set_project_details()
|
|
|
|
# GET TOOLCHAIN VERSION
|
|
set_cfg("toolchain")
|
|
|
|
output_file.write(str(json.dumps(CONFIG, indent=4, sort_keys=True)))
|
|
|
|
except Exception as e:
|
|
# Remove config file created if error occurs
|
|
os.system("rm " + FILENAME)
|
|
sys.exit(e) |