From 2059ec01c7af4c313ebfb436ca66d703f5dc1503 Mon Sep 17 00:00:00 2001 From: mcuw <112967559+mcuw@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:38:32 +0100 Subject: [PATCH] add T-Display-S3-long board and update platformio --- .github/workflows/build.yml | 10 +++---- .github/workflows/build_release.yml | 10 +++---- README.md | 43 ++++++++++++++++++++++----- platformio.ini | 46 ++++++++++++++++++++--------- 4 files changed, 77 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9495f3..04f6d20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ on: push: tags-ignore: - - '**' + - "**" pull_request: branches: [main] jobs: @@ -14,10 +14,10 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: '3.x' - architecture: 'x64' + python-version: "3.x" + architecture: "x64" - name: Install PlatformIO - run: python -m pip install platformio==6.1.7 + run: python3 -m pip install platformio==6.1.11 - name: Build firmwares run: FIRMWARE_VERSION=main platformio run - name: Archive @@ -25,4 +25,4 @@ jobs: with: name: firmware path: .pio/build/*/firmware_*.bin - retention-days: 1 \ No newline at end of file + retention-days: 1 diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 374ba4c..0a27ddd 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -1,7 +1,7 @@ on: push: tags: - - '*' + - "*" pull_request: branches: [main] jobs: @@ -14,10 +14,10 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: '3.x' - architecture: 'x64' + python-version: "3.x" + architecture: "x64" - name: Install PlatformIO - run: python -m pip install platformio==6.1.7 + run: python3 -m pip install platformio==6.1.11 - name: Build firmwares run: FIRMWARE_VERSION=${{github.ref_name}} platformio run - name: Archive @@ -47,4 +47,4 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: "firmware/*/firmware_*.bin" - bodyFile: "CHANGELOG.md" \ No newline at end of file + bodyFile: "CHANGELOG.md" diff --git a/README.md b/README.md index 9d21c56..33c51ed 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ ## Description -This is a project template to create microcontroller apps with automatized firmware builds for [esp32](https://www.espressif.com/en/products/socs/esp32), [esp32s2](https://www.espressif.com/en/products/socs/esp32-s2) and [esp32s3](https://www.espressif.com/en/products/socs/esp32-s3) microcontroller boards. It uses for that [GitHub Actions](https://github.com/features/actions) and [platformio](https://platformio.org/). - +This is a project template to create microcontroller apps with automatized firmware builds for [esp32](https://www.espressif.com/en/products/socs/esp32), [esp32s2](https://www.espressif.com/en/products/socs/esp32-s2) and [esp32s3](https://www.espressif.com/en/products/socs/esp32-s3) microcontroller boards. It uses for that [GitHub Actions](https://github.com/features/actions) and [platformio](https://platformio.org/). Use this repository as a template for your own esp32 projects. ## Requirements @@ -11,7 +10,6 @@ This is a project template to create microcontroller apps with automatized firmw - [platformio](https://platformio.org/) - [python](https://www.python.org/) - ## GitHub Actions - Workflow The release build happens in the `build & release` workflow: [build_release.yml](.github/workflows/build_release.yml). @@ -19,12 +17,10 @@ It creates a release, after creation of a new git tag (named it like `v1.0.0`). If you want to test the build on all merge w/o creating a tag then the `build` workflow is what you looking for: [build.yml](.github/workflows/build.yml) - ## PlatformIO [PlatformIO](https://platformio.org/) is a tool to create microcontroller apps for arduino platforms and compatibles (esp32). You can install the [Visual Studio Code extension](https://platformio.org/install/ide?install=vscode) in the [Visual Studio Code](https://code.visualstudio.com/) IDE. - ## Python There is a tiny python script needed to customize the firmware filenames within platformio, see documentation: https://docs.platformio.org/en/stable/scripting/examples/custom_program_name.html @@ -32,6 +28,37 @@ There is a tiny python script needed to customize the firmware filenames within The [extra_script.py](extra_script.py) script gets the platformio env (e.g. lolin32) and the git-tag for the firmware filename. This is required to publish several firmware names in the github artifacts of a release. +## Get Started + +1. Create a new git repository and use this [repository](https://github.com/mcuw/ESP32-ghbuild-template) as its template +2. Implement your application in the [src/main.cpp](src/main.cpp) +3. Comment your new change in the [CHANGELOG.md](CHANGELOG.md) file +4. Push your changes + +```sh +git add . +``` + +```sh +git commit -am "my app" +``` + +```sh +git push -u origin main +``` + +5. Create a new tag to trigger a release, e.g. for v1.0.0 + +```sh +git tag v1.0.0 +``` + +```sh +git push origin v1.0.0 +``` + +6. You can find your firmwares under [Releases](releases) + ## CHANGELOG You can write your changes in the [CHANGELOG.md](CHANGELOG.md) before you create a release. It will be shown under the release page. @@ -40,11 +67,11 @@ You can write your changes in the [CHANGELOG.md](CHANGELOG.md) before you create see [Releases](https://github.com/mcuw/esp-ghbuild-template/releases) on the right sidemenu. -## Usage +## Customize your project -Use this repository as a template for your own esp32 repository. You can reduce and adapt your required boards in the [platformio.ini](platformio.ini). Update the [CHANGELOG.md](CHANGELOG.md) file before you are creating a new release. When you create a new git tag then a new release will always includes generated firmwares. +You can reduce and adapt your required boards in the [platformio.ini](platformio.ini). ---- +Update the [CHANGELOG.md](CHANGELOG.md) file before you are creating a new release. By creating a new git tag you trigger a new release which generate for you the firmwares. ## Disclaimer diff --git a/platformio.ini b/platformio.ini index 73a3fa2..9e91bcb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -28,6 +28,8 @@ upload_speed = 921600 build_flags_psram = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ; https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/external-ram.html#esp32-rev-v1 +build_flags_usb_cdc_on_boot = + -UARDUINO_USB_CDC_ON_BOOT lib_deps_builtin = SPI Wire @@ -66,7 +68,7 @@ lib_deps = ; * ESP32 * ; ********* -; https://docs.platformio.org/en/latest/platforms/espressif32.html +; pio board config: https://docs.platformio.org/en/latest/platforms/espressif32.html [env:esp32dev] extends = esp32 board = esp32dev @@ -75,7 +77,7 @@ build_flags = lib_deps = ${esp32.lib_deps} -; https://docs.platformio.org/en/latest/boards/espressif32/lolin32.html +; pio board config: https://docs.platformio.org/en/latest/boards/espressif32/lolin32.html [env:lolin32] extends = esp32 board = lolin32 @@ -84,8 +86,8 @@ build_flags = lib_deps = ${esp32.lib_deps} -; https://docs.platformio.org/en/latest/boards/espressif32/lolin_d32_pro.html -; https://www.wemos.cc/en/latest/d32/d32_pro.html +; Wemos https://www.wemos.cc/en/latest/d32/d32_pro.html +; pio board config: https://docs.platformio.org/en/latest/boards/espressif32/lolin_d32_pro.html [env:lolin-d32-pro] extends = esp32 board = lolin_d32_pro @@ -95,7 +97,7 @@ build_flags = lib_deps = ${esp32.lib_deps} -; https://www.lilygo.cc/products/t-beam-v1-1-esp32-lora-module +; LILYGO https://www.lilygo.cc/products/t-beam-v1-1-esp32-lora-module [env:ttgo-t-beam] extends = esp32 board = ttgo-t-beam @@ -110,17 +112,17 @@ lib_deps = ; ************ ; TODO http://www.lilygo.cn/prod_view.aspx?TypeId=50033&Id=1321 with psram -; https://github.com/Xinyuan-LilyGO/LilyGo-T-Display-S2 +; repository: https://github.com/Xinyuan-LilyGO/LilyGo-T-Display-S2 [env:lilygo-t-display-s2] extends = esp32s2 -board = esp32dev ; platformio board support? +board = esp32dev ; what about platformio board support? ; ************ ; * ESP32-S3 * ; ************ -; https://docs.platformio.org/en/latest/boards/espressif32/esp32s3box.html +; pio board config: https://docs.platformio.org/en/latest/boards/espressif32/esp32s3box.html [env:esp32s3box] extends = esp32s3 board = esp32s3box @@ -129,7 +131,7 @@ build_flags = lib_deps = ${esp32s3.lib_deps} -; https://docs.platformio.org/en/latest/boards/espressif32/esp32-s3-devkitc-1.html +; pio board config: https://docs.platformio.org/en/latest/boards/espressif32/esp32-s3-devkitc-1.html [env:esp32-s3-devkitc-1] extends = esp32s3 board = esp32-s3-devkitc-1 @@ -139,9 +141,10 @@ build_flags = lib_deps = ${esp32s3.lib_deps} -; https://docs.platformio.org/en/latest/boards/espressif32/lilygo-t-display-s3.html -; https://www.lilygo.cc/products/t-display-s3 -; https://github.com/Xinyuan-LilyGO/T-Display-S3 +; LILYGO: https://www.lilygo.cc/products/t-display-s3 +; repository: https://github.com/Xinyuan-LilyGO/T-Display-S3 +; pio board config: https://docs.platformio.org/en/latest/boards/espressif32/lilygo-t-display-s3.html +; Buy and support mcuw (affiliate link): https://s.click.aliexpress.com/e/_DE2TNqz [env:lilygo-t-display-s3] board = lilygo-t-display-s3 build_flags = @@ -150,8 +153,23 @@ build_flags = lib_deps = ${esp32s3.lib_deps} -; https://www.antratek.com/wt32-sco1-plus -; https://www.seeedstudio.com/WT32-3-5-Inch-Display-p-5542.html +; LILYGO: https://www.lilygo.cc/products/t-display-s3-long +; repository: https://github.com/Xinyuan-LilyGO/T-Display-S3-Long +; Buy and support mcuw on aliexpress (affiliate link): https://s.click.aliexpress.com/e/_DEv67TX +[env:lilygo-t-display-s3-long] +board = esp32r8 +board_build.partitions = huge_app.csv +build_flags = + ${esp32s3.build_flags} + ${extra.build_flags_psram} ; 8MB PSRAM + ${extra.build_flags_usb_cdc_on_boot} ; will turn off printing and will not block when using the battery +lib_deps = + ${esp32s3.lib_deps} + +; SeeedStudio: https://www.seeedstudio.com/WT32-3-5-Inch-Display-p-5542.html +; Antratek: https://www.antratek.com/wt32-sco1-plus +; repository: https://github.com/wireless-tag-com/lv_port_esp32 +; ESP32-TUX - github: https://github.com/sukesh-ak/ESP32-TUX [env:wt32-sc01-plus] extends = env:esp32-s3-devkitc-1 build_flags =