Skip to content

Commit

Permalink
add T-Display-S3-long board and update platformio
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuw committed Dec 7, 2023
1 parent 8105f0b commit 2059ec0
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags-ignore:
- '**'
- "**"
pull_request:
branches: [main]
jobs:
Expand All @@ -14,15 +14,15 @@ 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
uses: actions/upload-artifact@v3
with:
name: firmware
path: .pio/build/*/firmware_*.bin
retention-days: 1
retention-days: 1
10 changes: 5 additions & 5 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- '*'
- "*"
pull_request:
branches: [main]
jobs:
Expand All @@ -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
Expand Down Expand Up @@ -47,4 +47,4 @@ jobs:
uses: ncipollo/release-action@v1
with:
artifacts: "firmware/*/firmware_*.bin"
bodyFile: "CHANGELOG.md"
bodyFile: "CHANGELOG.md"
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,63 @@

## 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

- [GitHub Actions](https://github.com/features/actions)
- [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).
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

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.
Expand All @@ -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

Expand Down
46 changes: 32 additions & 14 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 =
Expand All @@ -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 =
Expand Down

0 comments on commit 2059ec0

Please sign in to comment.