diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..648e1690 --- /dev/null +++ b/.flake8 @@ -0,0 +1,141 @@ +[flake8] + +select = + # Full lists are given in order to suppress all errors from other plugins + # Full list of pyflakes error codes: + F401, # module imported but unused + F402, # import module from line N shadowed by loop variable + F403, # 'from module import *' used; unable to detect undefined names + F404, # future import(s) name after other statements + F405, # name may be undefined, or defined from star imports: module + F406, # 'from module import *' only allowed at module level + F407, # an undefined __future__ feature name was imported + F601, # dictionary key name repeated with different values + F602, # dictionary key variable name repeated with different values + F621, # too many expressions in an assignment with star-unpacking + F622, # two or more starred expressions in an assignment (a, *b, *c = d) + F631, # assertion test is a tuple, which are always True + F701, # a break statement outside of a while or for loop + F702, # a continue statement outside of a while or for loop + F703, # a continue statement in a finally block in a loop + F704, # a yield or yield from statement outside of a function + F705, # a return statement with arguments inside a generator + F706, # a return statement outside of a function/method + F707, # an except: block as not the last exception handler + F721, F722, # doctest syntax error syntax error in forward type annotation + F811, # redefinition of unused name from line N + F812, # list comprehension redefines name from line N + F821, # undefined name name + F822, # undefined name name in __all__ + F823, # local variable name referenced before assignment + F831, # duplicate argument name in function definition + F841, # local variable name is assigned to but never used + F901, # raise NotImplemented should be raise NotImplementedError + + # Full list of pycodestyle violations: + E101, # indentation contains mixed spaces and tabs + E111, # indentation is not a multiple of four + E112, # expected an indented block + E113, # unexpected indentation + E114, # indentation is not a multiple of four (comment) + E115, # expected an indented block (comment) + E116, # unexpected indentation (comment) + E121, # continuation line under-indented for hanging indent + E122, # continuation line missing indentation or outdented + E123, # closing bracket does not match indentation of opening bracket's line + E124, # closing bracket does not match visual indentation + E125, # continuation line with same indent as next logical line + E126, # continuation line over-indented for hanging indent + E127, # continuation line over-indented for visual indent + E128, # continuation line under-indented for visual indent + E129, # visually indented line with same indent as next logical line + E131, # continuation line unaligned for hanging indent + E133, # closing bracket is missing indentation + E201, # whitespace after '(' + E202, # whitespace before ')' + E203, # whitespace before ':' + E211, # whitespace before '(' + E221, # multiple spaces before operator + E222, # multiple spaces after operator + E223, # tab before operator + E224, # tab after operator + E225, # missing whitespace around operator + E226, # missing whitespace around arithmetic operator + E227, # missing whitespace around bitwise or shift operator + E228, # missing whitespace around modulo operator + E231, # missing whitespace after ',', ';', or ':' + E241, # multiple spaces after ',' + E242, # tab after ',' + E251, # unexpected spaces around keyword / parameter equals + E261, # at least two spaces before inline comment + E262, # inline comment should start with '# ' + E265, # block comment should start with '# ' + E266, # too many leading '#' for block comment + E271, # multiple spaces after keyword + E272, # multiple spaces before keyword + E273, # tab after keyword + E274, # tab before keyword + E275, # missing whitespace after keyword + E301, # expected 1 blank line, found 0 + E302, # expected 2 blank lines, found 0 + E303, # too many blank lines + E304, # blank lines found after function decorator + E305, # expected 2 blank lines after end of function or class + E306, # expected 1 blank line before a nested definition + E401, # multiple imports on one line + E402, # module level import not at top of file + E501, # line too long (82 > 79 characters) + E502, # the backslash is redundant between brackets + E701, # multiple statements on one line (colon) + E702, # multiple statements on one line (semicolon) + E703, # statement ends with a semicolon + E704, # multiple statements on one line (def) + E711, # comparison to None should be 'if cond is None:' + E712, # comparison to True should be 'if cond is True:' or 'if cond:' + E713, # test for membership should be 'not in' + E714, # test for object identity should be 'is not' + E721, # do not compare types, use 'isinstance()' + E722, # do not use bare except, specify exception instead + E731, # do not assign a lambda expression, use a def + E741, # do not use variables named 'l', 'O', or 'I' + E742, # do not define classes named 'l', 'O', or 'I' + E743, # do not define functions named 'l', 'O', or 'I' + E901, # SyntaxError or IndentationError + E902, # IOError + W191, # indentation contains tabs + W291, # trailing whitespace + W292, # no newline at end of file + W293, # blank line contains whitespace + W391, # blank line at end of file + W503, # line break before binary operator + W504, # line break after binary operator + W505, # doc line too long (82 > 79 characters) + W601, # .has_key() is deprecated, use 'in' + W602, # deprecated form of raising exception + W603, # '<>' is deprecated, use '!=' + W604, # backticks are deprecated, use 'repr()' + W605, # invalid escape sequence 'x' + W606, # 'async' and 'await' are reserved keywords starting with Python 3.7 + + # Full list of flake8 violations + E999, # failed to compile a file into an Abstract Syntax Tree for the plugins that require it + + # Full list of mccabe violations + C901 # complexity value provided by the user + +ignore = + E221, # multiple spaces before operator + E231, # missing whitespace after ',', ';', or ':' + E241, # multiple spaces after ',' + W503, # line break before binary operator + W504 # line break after binary operator + +max-line-length = 160 + +show_source = True + +statistics = True + +exclude = + .git, + __pycache__, diff --git a/.github/ci/update_readme_dependencies.py b/.github/ci/update_readme_dependencies.py new file mode 100755 index 00000000..eccc297b --- /dev/null +++ b/.github/ci/update_readme_dependencies.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python +# +# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 + +""" +Check if BSP's README.md contains list of dependencies +""" + +import os +import sys +import argparse +from idf_component_tools.manifest import ManifestManager +from py_markdown_table.markdown_table import markdown_table +from typing import Any + +DEPENDENCIES_START = '\n' +DEPENDENCIES_END = '\n' +DEPENDENCIES_HEADER = '### Dependencies\n' +ESP_REGISTRY_URL = 'https://components.espressif.com/components/' + + +def get_dependencies_table(manifest): + """ + Get markdown formatted table of manifest's dependencies + """ + table = DEPENDENCIES_HEADER + table_data = [ + { + "component":item.name, + "version":item.version_spec, + } for item in manifest.dependencies] + for item in table_data: + if item["component"] != "idf": + item_name = item["component"] + item["component"] = "[" + item_name + "](" + ESP_REGISTRY_URL + item_name + ")" + markdown = markdown_table(table_data).set_params(row_sep='markdown', quote=False).get_markdown() + table += markdown + '\n' + return table + + +def check_bsp_readme(file: str) -> Any: + bsp_path = os.path.dirname(file) # File can be idf_component.yml or README.md + # Get list of dependencies of this BSP + manager = ManifestManager(bsp_path, 'bsp') + table = get_dependencies_table(manager.load()) + + with open(os.path.join(bsp_path, 'README.md'), 'r+') as readme: + content = readme.readlines() + # Find or create 'Dependencies section' in the README.md + try: + start_idx = content.index(DEPENDENCIES_START) + end_idx = content.index(DEPENDENCIES_END) + if set(table.splitlines()) <= set([line[:-1] for line in content]): + # The table exists and is correct, we can return here + return 0 + else: + print("[" + bsp_path + "] Incorrect dependencies table, updating...") + del content[start_idx + 1:end_idx] + except ValueError: + print("[" + bsp_path + "] First run on this file. Writing dependencies section...") + content.append(DEPENDENCIES_START) + content.append(DEPENDENCIES_END) + start_idx = content.index(DEPENDENCIES_START) + + # Write the generated table to the README.md + content.insert(start_idx + 1, table) + readme.truncate(0) + readme.seek(0, os.SEEK_SET) + readme.writelines(content) + # We have modified the README.md + return 1 + + +def check_all_bsps(): + parser = argparse.ArgumentParser() + parser.add_argument('filenames', nargs='*', help='Filenames to check.') + args = parser.parse_args() + ret = 0 + for f in args.filenames: + ret += check_bsp_readme(f) + return ret + + +if __name__ == '__main__': + os.environ["IDF_VERSION"] = "5.3.0" # Let's assume IDF v5.3.0 for optional dependencies + sys.exit(check_all_bsps()) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a199eb3d..c49e75fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,25 +1,46 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + repos: -- repo: https://github.com/igrr/astyle_py.git + - repo: https://github.com/igrr/astyle_py.git rev: v1.0.5 hooks: - - id: astyle_py + - id: astyle_py args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper'] -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/espressif/check-copyright/ + rev: v1.0.3 + hooks: + - id: check-copyright + args: ['--config', 'check_copyright_config.yaml'] + + - repo: https://github.com/PyCQA/flake8 + rev: 5.0.4 + hooks: + - id: flake8 + types: [python] + args: ['--config=.flake8', '--tee', '--benchmark'] + + - repo: local + hooks: + - id: bsp-dependencies-readme + name: Update BSP README with dependencies section + entry: .github/ci/update_readme_dependencies.py + language: python + files: 'bsp\/.*idf_component\.yml|bsp\/.*README\.md' # All idf_component.yml and README.md files in bsp directory + additional_dependencies: + - idf_component_manager + - py-markdown-table + + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - - id: trailing-whitespace + - id: trailing-whitespace types_or: [c, c++] - - id: end-of-file-fixer - types_or: [c, c++] - - id: check-merge-conflict - - id: mixed-line-ending + - id: end-of-file-fixer types_or: [c, c++] + - id: check-merge-conflict + - id: mixed-line-ending + types_or: [c, c++, text] args: ['--fix=lf'] description: Forces to replace line ending by the UNIX 'lf' character - -- repo: https://github.com/espressif/check-copyright/ - rev: v1.0.3 - hooks: - - id: check-copyright - args: ['--config', 'check_copyright_config.yaml'] diff --git a/SquareLine/gen.py b/SquareLine/gen.py index a6d0f7f3..60b5d1ea 100644 --- a/SquareLine/gen.py +++ b/SquareLine/gen.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import sys import os @@ -6,6 +6,7 @@ import shutil import argparse from zipfile import ZipFile +from typing import Optional # Directory of all boards BOARDS_DIR = "boards/" @@ -54,20 +55,24 @@ ANSI_GREEN = '\033[1;32m' ANSI_NORMAL = '\033[0m' + # Print colored message def color_print(message, color, newline='\n'): # type: (str, str, Optional[str]) -> None """ Print a message to stderr with colored highlighting """ sys.stderr.write('%s%s%s%s' % (color, message, ANSI_NORMAL, newline)) sys.stderr.flush() + # Print green text def print_ok(message): color_print(message, ANSI_GREEN) + # Print red error def print_error(message): color_print(message, ANSI_RED) + # Remove folder with all inside on specific path def remove_folder(path): for filename in os.listdir(path): @@ -78,11 +83,13 @@ def remove_folder(path): os.remove(new_path) os.rmdir(path) + # When placeholder is not set in JSON, but find in code, it will be ignored (no error and no substituted) class SafeDict(dict): def __missing__(self, key): return '{' + key + '}' + # Replace placeholder, which are set in JSON def replace_placeholders(file, placeholders): if os.path.exists(file): @@ -92,6 +99,7 @@ def replace_placeholders(file, placeholders): with open(file, "w") as f: f.write(file_str) + # Copy file and replace placeholders in copied file def copy_file(src_path, dst_path, placeholders, translate=1): print(f" Copying {src_path} to {dst_path}") @@ -99,6 +107,7 @@ def copy_file(src_path, dst_path, placeholders, translate=1): if translate: replace_placeholders(dst_path, placeholders) + # Copy all files in directory def copy_directory(from_dir, to_dir, placeholders, translate=1): if not os.path.exists(to_dir): @@ -111,6 +120,7 @@ def copy_directory(from_dir, to_dir, placeholders, translate=1): else: copy_file(f, out_f, placeholders, translate) + # Add folder into ZIP archive recursively def zip_add_folder(zip_obj, path, outdir): for filename in os.listdir(path): @@ -121,6 +131,7 @@ def zip_add_folder(zip_obj, path, outdir): if os.path.isdir(file): zip_add_folder(zip_obj, file, out_file) + # Creates ZIP archive def make_zip(board_name, path): zip_obj = ZipFile(os.path.join(path, board_name + ".zip"), 'w') @@ -128,18 +139,21 @@ def make_zip(board_name, path): zip_add_folder(zip_obj, zip_dir, SQUARELINE_OUTDIR) zip_obj.close() + # Check if JSON key exists, if not error and exit the script def check_json_key(manifest, key): if key not in manifest: print_error(f"Missing {key} in manifest JSON file") raise SystemExit(1) + # Get version in filename format def get_board_version(manifest): check_json_key(manifest, "version") v = manifest["version"].split('.') return f"_v{v[0]}_{v[1]}_{v[2]}" + # Create SLB file by JSON manifest data def create_slb_file(output, output_filename, manifest): check_json_key(manifest, "name") @@ -217,6 +231,7 @@ def process_board(board_name, output, dir): print_error(f"ERROR: File '{path}' is not exists!") raise SystemExit(1) + # Print usage def print_help(): print("Not enough arguments! Usage:") @@ -224,7 +239,8 @@ def print_help(): print("\tout: path to the generated output") print("\tboard (optional): generate only specific board") -#Create gitignore file into output folder + +# Create gitignore file into output folder def create_gitignore(path): with open(os.path.join(path, ".gitignore"), "w") as f: f.write("*") @@ -251,7 +267,7 @@ def main(outdir, sel_board): # Remove all in output directory if os.path.exists(output_folder): shutil.rmtree(output_folder) - #loop all boards + # loop all boards for dirname in os.listdir(BOARDS_DIR): d = os.path.join(BOARDS_DIR, dirname) # checking if it is a file @@ -264,10 +280,9 @@ def main(outdir, sel_board): if __name__ == '__main__': parser = argparse.ArgumentParser(description='Generates SquareLine board packages.') parser.add_argument("-o", "--outdir", action="store", dest='outdir', default='out', - help='Output directory for generated files (default: out)') + help='Output directory for generated files (default: out)') parser.add_argument("-b", "--board", action="store", dest='sel_board', default='', - help='Generate only selected board (default: generates all)') + help='Generate only selected board (default: generates all)') args = parser.parse_args() main(args.outdir, args.sel_board) - diff --git a/bsp/esp-box-3/README.md b/bsp/esp-box-3/README.md index 99914f13..8af36589 100644 --- a/bsp/esp-box-3/README.md +++ b/bsp/esp-box-3/README.md @@ -12,3 +12,16 @@ ESP32-S3-BOX-3 comes with 16MB of QSPI flash and 16MB of Octal PSRAM. ESP32-S3-B ESP32-S3-BOX-3 also uses a Type-C USB connector that provides 5 V of power input, while also supporting serial and JTAG debugging, as well as a programming interface; all through the same connector. + +### Dependencies +| component |version| +|--------------------------------------------------------------------------------------------------------------|-------| +| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 | +| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 | +| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 | +| [espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911) | ^1 | +|[espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100)| ^1 | +| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^1 | +| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 | +| idf |>=4.4.5| + diff --git a/bsp/esp-box-lite/README.md b/bsp/esp-box-lite/README.md index 322d033c..e16a93ac 100644 --- a/bsp/esp-box-lite/README.md +++ b/bsp/esp-box-lite/README.md @@ -12,3 +12,12 @@ ESP32-S3-BOX-Lite comes with 16MB of QSPI flash and 8MB of Octal PSRAM. ESP32-S3 ESP32-S3-BOX-Lite also uses a Type-C USB connector that provides 5 V of power input, while also supporting serial and JTAG debugging, as well as a programming interface; all through the same connector. + +### Dependencies +| component |version| +|----------------------------------------------------------------------------------------------|-------| +| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.4 | +|[espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev)| ^1.0.3| +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| idf |>=4.4.5| + diff --git a/bsp/esp-box/README.md b/bsp/esp-box/README.md index 17884de6..ea3de630 100644 --- a/bsp/esp-box/README.md +++ b/bsp/esp-box/README.md @@ -12,3 +12,14 @@ ESP32-S3-BOX comes with 16MB of QSPI flash and 8MB of Octal PSRAM. ESP32-S3-BOX ESP32-S3-BOX also uses a Type-C USB connector that provides 5 V of power input, while also supporting serial and JTAG debugging, as well as a programming interface; all through the same connector. + +### Dependencies +| component |version| +|--------------------------------------------------------------------------------------------------------------|-------| +| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 | +| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1.0.3| +|[espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100)| ^1 | +| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^1 | +| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 | +| idf |>=4.4.5| + diff --git a/bsp/esp32_azure_iot_kit/README.md b/bsp/esp32_azure_iot_kit/README.md index 5a068cc8..cbcb8cae 100644 --- a/bsp/esp32_azure_iot_kit/README.md +++ b/bsp/esp32_azure_iot_kit/README.md @@ -12,3 +12,16 @@ Board support package consists of: ## Example Please refer to specific README.md files in in examples folder. + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/bh1750](https://components.espressif.com/components/espressif/bh1750) | ^1.0.0 | +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| [espressif/fbm320](https://components.espressif.com/components/espressif/fbm320) | ^1.0.0 | +| [espressif/hts221](https://components.espressif.com/components/espressif/hts221) | ^1.1.1 | +| [espressif/mag3110](https://components.espressif.com/components/espressif/mag3110) | ^1.0.0 | +| [espressif/mpu6050](https://components.espressif.com/components/espressif/mpu6050) | ^1.0.0 | +| idf | >=4.4.5 | + diff --git a/bsp/esp32_c3_lcdkit/README.md b/bsp/esp32_c3_lcdkit/README.md index 84e4fd9e..726c6f53 100644 --- a/bsp/esp32_c3_lcdkit/README.md +++ b/bsp/esp32_c3_lcdkit/README.md @@ -8,7 +8,19 @@ ESP32-C3-LCDkit is a development kit that is based on Espressif’s ESP32-C3 Wi-Fi + Bluetooth 5 (LE) SoC. -ESP32-C3-LCDkit comes with 4 MB flash and 400 KB SRAM. ESP32-C3-LCDkit is also equipped with a variety of peripherals, such as a 1.28” LCD screen with SPI interface and 240x240 resolution, a speaker, and IR_RX/IR_TX. +ESP32-C3-LCDkit comes with 4 MB flash and 400 KB SRAM. ESP32-C3-LCDkit is also equipped with a variety of peripherals, such as a 1.28" LCD screen with SPI interface and 240x240 resolution, a speaker, and IR_RX/IR_TX. ESP32-C3-LCDkit also uses a Type-C USB connector that provides 5 V of power input, while also supporting serial and JTAG debugging, as well as a programming interface; all through the same connector. + +### Dependencies +| component | version| +|------------------------------------------------------------------------------------------------|--------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2,<4.0| +| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 | +|[espressif/esp_lcd_gc9a01](https://components.espressif.com/components/espressif/esp_lcd_gc9a01)| ^1 | +| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^1 | +| [espressif/knob](https://components.espressif.com/components/espressif/knob) | ^0.1.3 | +| [espressif/led_strip](https://components.espressif.com/components/espressif/led_strip) | ^2 | +| idf | >=5.0.0| + diff --git a/bsp/esp32_lyrat/README.md b/bsp/esp32_lyrat/README.md index de244dc0..681eb2e2 100644 --- a/bsp/esp32_lyrat/README.md +++ b/bsp/esp32_lyrat/README.md @@ -8,3 +8,11 @@ The ESP32-LyraT is a hardware platform designed for the dual-core ESP32 audio ap The ESP32-LyraT is a stereo audio board. If you are looking for a mono audio board, intended for lower end applications, check ESP32-LyraT-Mini. + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +|[espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev)| ^1.0.3 | +| idf | >=4.4 | + diff --git a/bsp/esp32_s2_kaluga_kit/README.md b/bsp/esp32_s2_kaluga_kit/README.md index d72b43e9..5c8b9625 100644 --- a/bsp/esp32_s2_kaluga_kit/README.md +++ b/bsp/esp32_s2_kaluga_kit/README.md @@ -20,3 +20,15 @@ This Board support package consists of: ## Examples Please refer to README.md in examples folder. + + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +| [espressif/esp32-camera](https://components.espressif.com/components/espressif/esp32-camera) | ^2.0.2 | +|[espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev)| ^1.0.3 | +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| [espressif/led_strip](https://components.espressif.com/components/espressif/led_strip) | ^2.5 | +| idf | >=4.4.5 | + diff --git a/bsp/esp32_s3_eye/README.md b/bsp/esp32_s3_eye/README.md index 1a9f85f3..5740ed85 100644 --- a/bsp/esp32_s3_eye/README.md +++ b/bsp/esp32_s3_eye/README.md @@ -12,3 +12,14 @@ The ESP32-S3-EYE board consists of two parts: the main board (ESP32-S3-EYE-MB) t * Digital microphone * Accelerometer * OV2640 camera + + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +| [espressif/esp32-camera](https://components.espressif.com/components/espressif/esp32-camera) | ^2.0.2 | +|[espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev)| ^1 | +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| idf | >=4.4.5 | + diff --git a/bsp/esp32_s3_korvo_1/README.md b/bsp/esp32_s3_korvo_1/README.md index 6420daa3..c7301495 100644 --- a/bsp/esp32_s3_korvo_1/README.md +++ b/bsp/esp32_s3_korvo_1/README.md @@ -10,3 +10,11 @@ ESP32-S3-Korvo-1 is a development kit that is based on Espressif’s ESP32-S3 So The ESP32-S3-Korvo-1 board consists of two parts: the main board (ESP32-S3-Korvo-1) that integrates the ESP32-S3-WROOM-1 module, function buttons, SD card slot, speaker and USB connectors; and the sub board (ESP32-Korvo-Mic, which is also used as the sub board in ESP32-Korvo v1.1) that contains a three-microphone array, function buttons, and addressable LEDs. The main board and sub board are connected via FPC cable. + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|-----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5,<4.0| +|[espressif/led_indicator](https://components.espressif.com/components/espressif/led_indicator)|>=0.7,<=0.8| +| idf | >=4.4 | + diff --git a/bsp/esp32_s3_korvo_2/README.md b/bsp/esp32_s3_korvo_2/README.md index 392e0530..9c3a0045 100644 --- a/bsp/esp32_s3_korvo_2/README.md +++ b/bsp/esp32_s3_korvo_2/README.md @@ -8,3 +8,16 @@ The ESP32-S3-Korvo-2 is a multimedia development board based on the ESP32-S3 chip. It is equipped with a two-microphone array which is suitable for voice recognition and near/far-field voice wake-up applications. The board integrates multiple peripherals such as LCD, camera, and microSD card. It also supports JPEG video stream processing. With all of its outstanding features, the board is an ideal choice for the development of low-cost and low-power network-connected audio and video products. + +### Dependencies +| component | version | +|------------------------------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +| [espressif/esp32-camera](https://components.espressif.com/components/espressif/esp32-camera) | ^2.0.2 | +| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1.0.2 | +|[espressif/esp_io_expander_tca9554](https://components.espressif.com/components/espressif/esp_io_expander_tca9554)| ^1 | +| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 | +| [espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100) | ^1 | +| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^1 | +| idf | >=4.4.5 | + diff --git a/bsp/esp32_s3_lcd_ev_board/README.md b/bsp/esp32_s3_lcd_ev_board/README.md index f10d4323..cce95e23 100644 --- a/bsp/esp32_s3_lcd_ev_board/README.md +++ b/bsp/esp32_s3_lcd_ev_board/README.md @@ -54,3 +54,18 @@ Based on the above configurations, there are three different anti-tearing modes * RGB triple-buffer + LVGL full-refresh mode: * Set `BSP_LCD_RGB_BUFFER_NUMS` to `3` * Enable `BSP_DISPLAY_LVGL_AVOID_TEAR` and `BSP_DISPLAY_LVGL_FULL_REFRESH` + + +### Dependencies +| component | version | +|------------------------------------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 | +| [espressif/esp_io_expander_tca9554](https://components.espressif.com/components/espressif/esp_io_expander_tca9554) | ^1 | +| [espressif/esp_lcd_gc9503](https://components.espressif.com/components/espressif/esp_lcd_gc9503) | ^3 | +|[espressif/esp_lcd_panel_io_additions](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions)| ^1 | +| [espressif/esp_lcd_touch_ft5x06](https://components.espressif.com/components/espressif/esp_lcd_touch_ft5x06) | ^1 | +| [espressif/esp_lcd_touch_gt1151](https://components.espressif.com/components/espressif/esp_lcd_touch_gt1151) | ^1 | +| idf | >=5.0.1 | +| [lvgl/lvgl](https://components.espressif.com/components/lvgl/lvgl) | ^8 | + diff --git a/bsp/esp32_s3_usb_otg/README.md b/bsp/esp32_s3_usb_otg/README.md index 007c700b..b70be370 100644 --- a/bsp/esp32_s3_usb_otg/README.md +++ b/bsp/esp32_s3_usb_otg/README.md @@ -14,3 +14,12 @@ ESP32-S3-USB-OTG is a development board that focuses on USB-OTG function verific * Onboard 1.3-inch LCD color screen, supports GUI * Onboard SD card interface, compatible with SDIO and SPI interfaces * Onboard charging IC, can be connected to lithium battery + + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| idf | >=4.4 | + diff --git a/bsp/esp_bsp_generic/README.md b/bsp/esp_bsp_generic/README.md index 2642b1f6..46b95742 100644 --- a/bsp/esp_bsp_generic/README.md +++ b/bsp/esp_bsp_generic/README.md @@ -216,3 +216,19 @@ Example code: /* === Your LVGL code here === */ bsp_display_unlock(); ``` + +### Dependencies +| component | version | +|--------------------------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +| [espressif/esp_lcd_gc9a01](https://components.espressif.com/components/espressif/esp_lcd_gc9a01) | ^1 | +| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 | +|[espressif/esp_lcd_touch_cst816s](https://components.espressif.com/components/espressif/esp_lcd_touch_cst816s)| ^1 | +| [espressif/esp_lcd_touch_ft5x06](https://components.espressif.com/components/espressif/esp_lcd_touch_ft5x06) | ^1 | +| [espressif/esp_lcd_touch_gt1151](https://components.espressif.com/components/espressif/esp_lcd_touch_gt1151) | ^1 | +| [espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911) | ^1 | +|[espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100)| ^1 | +| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^1 | +| [espressif/led_indicator](https://components.espressif.com/components/espressif/led_indicator) | ^0.9 | +| idf | >=4.4.2 | + diff --git a/bsp/esp_wrover_kit/README.md b/bsp/esp_wrover_kit/README.md index a7adc762..306346f3 100644 --- a/bsp/esp_wrover_kit/README.md +++ b/bsp/esp_wrover_kit/README.md @@ -17,3 +17,12 @@ ESP-WROVER-KIT features the following integrated components: Its another distinguishing feature is the embedded FTDI FT2232HL chip - an advanced multi-interface USB bridge. This chip enables to use JTAG for direct debugging of ESP32 through the USB interface without a separate JTAG debugger. ESP-WROVER-KIT makes development convenient, easy, and cost-effective. Most of the ESP32 I/O pins are broken out to the board’s pin headers for easy access. + + +### Dependencies +| component | version | +|----------------------------------------------------------------------------------------------|----------| +| [espressif/button](https://components.espressif.com/components/espressif/button) |>=2.5,<4.0| +|[espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port)| ^1 | +| idf | >=4.4.5 | + diff --git a/examples/bsp_ext.py b/examples/bsp_ext.py index 858ea0e7..360b0f9b 100644 --- a/examples/bsp_ext.py +++ b/examples/bsp_ext.py @@ -21,7 +21,7 @@ def action_extensions(base_actions, project_path=os.getcwd()): red_print('ruamel.yaml package is not installed. No BSP extension is added!') return {} - bsp_sdkconfig_regex = compile('^SDKCONFIG_DEFAULTS=.*sdkconfig\.bsp\.') + bsp_sdkconfig_regex = compile(r'^SDKCONFIG_DEFAULTS=.*sdkconfig\.bsp\.') def global_callback(ctx: Context, global_args: PropertyDict, tasks: List) -> None: # In case the user has defined his own BSP configuration, run set-bsp action before anything else @@ -57,9 +57,10 @@ def set_bsp_callback(action: str, ctx: Context, args: PropertyDict, **kwargs: st 'esp32_c3_lcdkit', 'esp_bsp_generic', 'esp32_s3_korvo_1', - } + } - if bsp == '': return + if bsp == '': + return if bsp not in bsps: print("Invalid BSP configuration " + bsp) return diff --git a/examples/display_camera/main/CMakeLists.txt b/examples/display_camera/main/CMakeLists.txt index dc7a8454..d13d5f68 100644 --- a/examples/display_camera/main/CMakeLists.txt +++ b/examples/display_camera/main/CMakeLists.txt @@ -1,2 +1,2 @@ -idf_component_register(SRCS "display_camera.c" - INCLUDE_DIRS ".") +idf_component_register(SRCS "display_camera.c" + INCLUDE_DIRS ".")