Skip to content

Commit

Permalink
Tasmota (#17)
Browse files Browse the repository at this point in the history
* S3 16MB fix (#4)

* fix(setup): Use latest reedsolo package which can be installed with Python3.10 and Cython

Closes espressif#711

* feat(ci): Publish development releases with custom pipeline

* fix(ci): The development release job should not run by default

Gitlab rules:if adds the job if any of the rules are true.

* fix(ci): Merge two "ci" directories and build_tools into one

* fix(secure download mode): Fix SDM detection on S2/S3

* fix(secure download mode): Reconnect if ROM refuses to respond

Closes espressif#813

* fix(flasher_stub): Correct boundaries for SPIWrite4B and SPIRead4B

SPIWrite4B and SPIRead4B functions are required for flash sizes bigger
than 16MB. This fix corrects the boundaries so SPIWrite and SPIRead
would be used for the whole 16MB area.

The octal flash support for 32 MB chips
(espressif#795) will be added in a
follow-up commit.

Closes espressif#745

Co-authored-by: Roland Dobai <roland@espressif.com>
Co-authored-by: radim.karnis <radim.karnis@espressif.com>

* Update stub_flasher_32s3beta2.json

* Update build_esptool.yml

* Update build_esptool.yml

* stubs updated

Co-authored-by: Github BUILD <github-actions@github.com>
Co-authored-by: Roland Dobai <roland@espressif.com>
Co-authored-by: radim.karnis <radim.karnis@espressif.com>

* stubs updated

* stubs updated

Co-authored-by: Github BUILD <github-actions@github.com>
Co-authored-by: Roland Dobai <roland@espressif.com>
Co-authored-by: radim.karnis <radim.karnis@espressif.com>
  • Loading branch information
4 people authored Dec 28, 2022
1 parent 21e5914 commit 53918ae
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 124 deletions.
84 changes: 69 additions & 15 deletions .github/workflows/build_esptool.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Build esptool

on: [push, pull_request]
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory

jobs:
build-esptool-binaries:
name: Build esptool binaries for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-10.15, ubuntu-latest, windows-latest]
include:
- os: macos-latest
- os: macos-10.15
TARGET: macos
SEPARATOR: ':'
- os: ubuntu-latest
Expand All @@ -35,23 +39,30 @@ jobs:
python -m pip install --upgrade pip
pip install pyinstaller
pip install --user -e .
- name: Build stub
if: matrix.os == 'ubuntu-latest'
run: |
export TOOLCHAIN_DIR=$HOME/toolchain
export ESP8266_BINDIR=$TOOLCHAIN_DIR/xtensa-lx106-elf/bin
export ESP32_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32-elf/bin
export ESP32S2_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s2-elf/bin
export ESP32S3_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s3-elf/bin
export ESP32C3_BINDIR=$TOOLCHAIN_DIR/riscv32-esp-elf/bin
export PATH=$PATH:$ESP8266_BINDIR:$ESP32_BINDIR:$ESP32S2_BINDIR:$ESP32S3_BINDIR:$ESP32C3_BINDIR
./ci/setup_ci_build_env.sh
make -C flasher_stub V=1
- name: Archive stubs artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@master
with:
name: stubs
path: /home/runner/work/esptool/esptool/flasher_stub/build
- name: Build with PyInstaller
run: |
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico --add-data=".${{ env.STUBS_DIR }}*.json${{ matrix.SEPARATOR }}${{ env.STUBS_DIR }}" esptool.py
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico espefuse.py
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico espsecure.py
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=ci/espressif.ico esp_rfc2217_server.py
- name: Sign binaries
if: matrix.os == 'windows-latest' && github.event_name != 'pull_request'
env:
CERTIFICATE: ${{ secrets.CERTIFICATE }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
shell: pwsh
run: |
./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/esptool.exe
./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/espefuse.exe
./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/espsecure.exe
./ci/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/esp_rfc2217_server.exe
- name: Test binaries
shell: bash
run: |
Expand All @@ -61,13 +72,56 @@ jobs:
./${{ env.DISTPATH }}/esp_rfc2217_server${{ matrix.EXTEN }} -h
- name: Add license and readme
shell: bash
run: mv LICENSE README.md ./${{ env.DISTPATH }}
run: cp LICENSE README.md ./${{ env.DISTPATH }}
- name: Archive artifact
uses: actions/upload-artifact@master
with:
name: ${{ env.DISTPATH }}
path: ${{ env.DISTPATH }}

push_stubs:
name: Commit changed files
needs: build-esptool-binaries
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Download builded stubs
uses: actions/download-artifact@master
with:
name: stubs
path: ./mv_stubs
- name: Display structure of downloaded files
run: |
ls -R
- name: Move stubs in folder
run: |
rm ./esptool/targets/stub_flasher/*
cp -R ./mv_stubs/*.json ./esptool/targets/stub_flasher
ls -R ./esptool/targets/stub_flasher
- name: Init git
run: |
git config --local user.name "Github BUILD"
git config user.email github-actions@github.com
git add ./esptool/targets/stub_flasher/*
git diff --cached >> diff
echo $diff
echo "dif=$diff" >> $GITHUB_ENV
echo ${{ env.dif }}
- name: Check for changes in stub files
if: contains(${{ env.dif }}, 'json') == true
run: git commit --allow-empty -m "stubs updated"
- name: Get branch
uses: jason2866/branch-name@master
- run: echo "brnch=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Push to current branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.brnch }}

create_release:
name: Create GitHub release
if: startsWith(github.ref, 'refs/tags/')
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/issue_comment.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/new_issues.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/new_prs.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/release_esptool_pypi.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test_esptool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
espefuse.py --help
espsecure.py --help
- name: Build stub (Python 3.7 only)
if: matrix.python-version == 3.7
- name: Build stub (Python 3.8 only)
if: matrix.python-version == 3.8
run: |
export TOOLCHAIN_DIR=$HOME/toolchain
Expand Down
5 changes: 3 additions & 2 deletions esptool/targets/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ def get_chip_description(self):

chip_name = {
0: "ESP32-S0WDQ6" if single_core else "ESP32-D0WDQ6",
1: "ESP32-S0WD" if single_core else "ESP32-D0WD",
2: "ESP32-D2WD",
1: "ESP32-S0WDQ5" if single_core else "ESP32-D0WDQ5",
2: "ESP32-S2WDQ5" if single_core else "ESP32-D2WDQ5",
3: "ESP32-S0WD-OEM" if single_core else "ESP32-D0WD-OEM",
4: "ESP32-U4WDH",
5: "ESP32-PICO-V3" if rev3 else "ESP32-PICO-D4",
6: "ESP32-PICO-V3-02",
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "tool-esptoolpy",
"version": "1.40401",
"description": "Espressif ESP8266 and ESP32 serial bootloader utility",
"keywords": [
"tools",
"uploader",
"espressif"
],
"license": "GPL-2.0-or-later",
"repository": {
"type": "git",
"url": "https://github.com/tasmota/esptool"
}
}

0 comments on commit 53918ae

Please sign in to comment.