From 2a198a1d95b51934556a990f5d790a2fe214361a Mon Sep 17 00:00:00 2001 From: Hays Chan <25737801+hayschan@users.noreply.github.com> Date: Thu, 30 May 2024 17:31:25 +0800 Subject: [PATCH] Initial commit --- .editorconfig | 37 +++++ .github/workflows/espidf-compile-v5.1.yml | 41 ++++++ .gitignore | 162 ++++++++++++++++++++++ CMakeLists.txt | 11 ++ README.md | 9 ++ Squareline/README.md | 3 + components/README.md | 2 + docs/README.md | 0 main/CMakeLists.txt | 7 + main/README.md | 2 + main/main.c | 13 ++ sdkconfig.defaults | 4 + translations/README.md | 3 + translations/en.yml | 0 translations/zh-cn.yml | 0 translations/zh-hk.yml | 0 16 files changed, 294 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/espidf-compile-v5.1.yml create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 README.md create mode 100644 Squareline/README.md create mode 100644 components/README.md create mode 100644 docs/README.md create mode 100644 main/CMakeLists.txt create mode 100644 main/README.md create mode 100644 main/main.c create mode 100644 sdkconfig.defaults create mode 100644 translations/README.md create mode 100644 translations/en.yml create mode 100644 translations/zh-cn.yml create mode 100644 translations/zh-hk.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4fd7122 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{*.md,*.rst}] +trim_trailing_whitespace = false + +[{Makefile,*.mk,*.bat}] +indent_style = tab +indent_size = 2 + +[*.pem] +insert_final_newline = false + +[*.py] +max_line_length = 119 + +[{*.cmake,CMakeLists.txt}] +indent_style = space +indent_size = 4 +max_line_length = 120 + +[{*.sh,*.yml,*.yaml}] +indent_size = 2 + +[*.ini] +indent_size = 2 diff --git a/.github/workflows/espidf-compile-v5.1.yml b/.github/workflows/espidf-compile-v5.1.yml new file mode 100644 index 0000000..3c029e5 --- /dev/null +++ b/.github/workflows/espidf-compile-v5.1.yml @@ -0,0 +1,41 @@ +name: Compile ESP-IDF Sketches for v5.1 + +on: + pull_request: + paths: + - ".github/workflows/espidf-compile-*.yml" + - "main/**" + - "components/**" + - "CMakeLists.txt" + - "Kconfig" + - "partitions.csv" + - "sdkconfig.defaults" + + push: + paths: + - ".github/workflows/espidf-compile-*.yml" + - "main/**" + - "components/**" + - "CMakeLists.txt" + - "Kconfig" + - "partitions.csv" + - "sdkconfig.defaults" + workflow_dispatch: + repository_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build default data polling example on v5.1 + uses: espressif/esp-idf-ci-action@v1 + with: + esp_idf_version: v5.1 + target: esp32s3 + path: '.' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b7a730 --- /dev/null +++ b/.gitignore @@ -0,0 +1,162 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +.config +*.o +*.pyc + +# gtags +GTAGS +GRTAGS +GPATH + +# emacs +.dir-locals.el + +# emacs temp file suffixes +*~ +.#* +\#*# + +# eclipse setting +.settings + +# MacOS directory files +.DS_Store + +# cache dir +.cache/ + +# Components Unit Test Apps files +components/**/build/ +components/**/build_*_*/ +components/**/sdkconfig +components/**/sdkconfig.old + +# Example project files +examples/**/build/ +examples/**/build_esp*_*/ +examples/**/sdkconfig +examples/**/sdkconfig.old + +# Doc build artifacts +docs/_build/ +docs/doxygen_sqlite3.db + +# Downloaded font files +docs/_static/DejaVuSans.ttf +docs/_static/NotoSansSC-Regular.otf + +# sdkconfig +sdkconfig.old +sdkconfig + +# Unit test app files +tools/unit-test-app/sdkconfig +tools/unit-test-app/sdkconfig.old +tools/unit-test-app/build +tools/unit-test-app/build_*_*/ +tools/unit-test-app/output +tools/unit-test-app/test_configs + +# Unit Test CMake compile log folder +log_ut_cmake + +# test application build files +tools/test_apps/**/build/ +tools/test_apps/**/build_*_*/ +tools/test_apps/**/sdkconfig +tools/test_apps/**/sdkconfig.old + +TEST_LOGS + +# gcov coverage reports +*.gcda +*.gcno +coverage.info +coverage_report/ + +test_multi_heap_host + +# VS Code Settings +.vscode/ + +# VIM files +*.swp +*.swo + +# Clion IDE CMake build & config +.idea/ +cmake-build-*/ + +# Results for the checking of the Python coding style and static analysis +.mypy_cache +flake8_output.txt + +# ESP-IDF default build directory name +build + +# lock files for examples and components +dependencies.lock + +# managed_components for examples +managed_components + +# pytest log +pytest_embedded_log/ + +# Squareline Studio +SquarelineStudio/SquarelineStudio_Project/backup/ +SquarelineStudio/SquarelineStudio_Project/autosave/ +SquarelineStudio/SquarelineStudio_Project/cache/ +SquarelineStudio/SquarelineStudio_Project/export/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d1b1679 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,11 @@ +# For more information about build system see +# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html +# The following five lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +add_compile_options("-Wno-format") +get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME) +string(REPLACE " " "_" ProjectId ${ProjectId}) +project(${ProjectId}) \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a102fd --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# ESP-PROJECT-TEMPLATE +用这个作为 ESP 相关的模板 +## c语言开发 +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") + +## c++语言开发 +idf_component_register(SRCS "main.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/Squareline/README.md b/Squareline/README.md new file mode 100644 index 0000000..d631206 --- /dev/null +++ b/Squareline/README.md @@ -0,0 +1,3 @@ +# ESP-PROJECT-TEMPLATE +用这个作为 ESP 相关的模板 + \ No newline at end of file diff --git a/components/README.md b/components/README.md new file mode 100644 index 0000000..a5eff99 --- /dev/null +++ b/components/README.md @@ -0,0 +1,2 @@ +# ESP-PROJECT-TEMPLATE +用这个作为 ESP 相关的模板 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..e69de29 diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt new file mode 100644 index 0000000..117342e --- /dev/null +++ b/main/CMakeLists.txt @@ -0,0 +1,7 @@ +#c语言开发 +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") + +#c++语言开发 +#idf_component_register(SRCS "main.cpp" +# INCLUDE_DIRS ".") \ No newline at end of file diff --git a/main/README.md b/main/README.md new file mode 100644 index 0000000..a5eff99 --- /dev/null +++ b/main/README.md @@ -0,0 +1,2 @@ +# ESP-PROJECT-TEMPLATE +用这个作为 ESP 相关的模板 diff --git a/main/main.c b/main/main.c new file mode 100644 index 0000000..4101838 --- /dev/null +++ b/main/main.c @@ -0,0 +1,13 @@ +#include +/*c语言开发*/ +void app_main(void) +{ + printf("the template successfully created\n"); +} + + +/*c++语言开发*/ +// extern "C" void app_main(void) +// { + +// } \ No newline at end of file diff --git a/sdkconfig.defaults b/sdkconfig.defaults new file mode 100644 index 0000000..36a9513 --- /dev/null +++ b/sdkconfig.defaults @@ -0,0 +1,4 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +CONFIG_IDF_TARGET="esp32s3" \ No newline at end of file diff --git a/translations/README.md b/translations/README.md new file mode 100644 index 0000000..d631206 --- /dev/null +++ b/translations/README.md @@ -0,0 +1,3 @@ +# ESP-PROJECT-TEMPLATE +用这个作为 ESP 相关的模板 + \ No newline at end of file diff --git a/translations/en.yml b/translations/en.yml new file mode 100644 index 0000000..e69de29 diff --git a/translations/zh-cn.yml b/translations/zh-cn.yml new file mode 100644 index 0000000..e69de29 diff --git a/translations/zh-hk.yml b/translations/zh-hk.yml new file mode 100644 index 0000000..e69de29