Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion esp_flasher/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ App(
"src/esp_loader.c",
"src/esp_targets.c",
"src/md5_hash.c",
"src/protocol_common.c",
"src/protocol_serial.c",
"src/protocol_uart.c",
"src/slip.c",
"src/esp_stubs.c",
],
cincludes=["lib/esp-serial-flasher/private_include"],
cdefines=[
Expand Down
1 change: 1 addition & 0 deletions esp_flasher/esp_flasher_app_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

typedef enum SelectedFlashOptions {
SelectedFlashS3Mode,
SelectedFlashC5Mode,
SelectedFlashBoot,
SelectedFlashPart,
SelectedFlashNvs,
Expand Down
8 changes: 4 additions & 4 deletions esp_flasher/esp_flasher_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ static void _flash_all_files(EspFlasherApp* app) {
#define NUM_FLASH_ITEMS 7
FlashItem items[NUM_FLASH_ITEMS] = {
{SelectedFlashBoot,
"bootloader",
"bootloader",
app->bin_file_path_boot,
app->selected_flash_options[SelectedFlashS3Mode] ? ESP_ADDR_BOOT_S3 : ESP_ADDR_BOOT},
app->selected_flash_options[SelectedFlashC5Mode] ? ESP_ADDR_BOOT_C5 :
(app->selected_flash_options[SelectedFlashS3Mode] ? ESP_ADDR_BOOT_S3 : ESP_ADDR_BOOT)},
{SelectedFlashPart, "partition table", app->bin_file_path_part, ESP_ADDR_PART},
{SelectedFlashNvs, "NVS", app->bin_file_path_nvs, ESP_ADDR_NVS},
{SelectedFlashBootApp0, "boot_app0", app->bin_file_path_boot_app0, ESP_ADDR_BOOT_APP0},
{SelectedFlashAppA, "firmware A", app->bin_file_path_app_a, ESP_ADDR_APP_A},
{SelectedFlashAppB, "firmware B", app->bin_file_path_app_b, ESP_ADDR_APP_B},
{SelectedFlashCustom, "custom data", app->bin_file_path_custom, 0x0},
/* if you add more entries, update NUM_FLASH_ITEMS above! */
};
};

char user_msg[256];

Expand Down
1 change: 1 addition & 0 deletions esp_flasher/esp_flasher_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "esp_loader_io.h"

#define ESP_ADDR_BOOT_S3 0x0
#define ESP_ADDR_BOOT_C5 0x2000
#define ESP_ADDR_BOOT 0x1000
#define ESP_ADDR_PART 0x8000
#define ESP_ADDR_NVS 0x9000
Expand Down
12 changes: 12 additions & 0 deletions esp_flasher/lib/esp-serial-flasher/.cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tool.commitizen]
name = "czespressif"
version = "1.8.0"
update_changelog_on_bump = true
tag_format = "v$version"
changelog_merge_prerelease = true
annotated_tag = true
changelog_start_rev = "v1.0.0"
bump_message = "change: Update version to $new_version"
version_files = [
"idf_component.yml:version"
]
2 changes: 2 additions & 0 deletions esp_flasher/lib/esp-serial-flasher/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# First pre-commit pass
7d17569be1a805527df3045c110c744b20015713
22 changes: 22 additions & 0 deletions esp_flasher/lib/esp-serial-flasher/.github/workflows/dangerjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: DangerJS Check
on:
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
contents: write

jobs:
pull-request-style-linter:
runs-on: ubuntu-latest
steps:
- name: Check out PR head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: DangerJS pull request linter
uses: espressif/github-actions/danger_pr_review@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions esp_flasher/lib/esp-serial-flasher/.github/workflows/issue_bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Bot response to issues

on:
issues:
types: [opened, edited]

jobs:
docs_bot:
name: Generate automated response by docs bot
runs-on: ubuntu-latest
steps:
- name: Docs bot action
if: ${{ github.repository_owner == 'espressif' }}
uses: espressif/docs-bot-action@master
env:
BOT_API_KEY: ${{ secrets.BOT_API_KEY }}
BOT_INTEGRATION_ID: ${{ secrets.BOT_INTEGRATION_ID }}
BOT_API_ENDPOINT: ${{ secrets.BOT_API_ENDPOINT }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }}
github_issue_number: ${{ github.event.issue.number }}
title: ${{ github.event.issue.title }}
in_msg: ${{ github.event.issue.body }}
prefix_out_msg: >
Hi @${{ github.event.issue.user.login }}! Please be aware that
(1) the following suggestions are generated by a bot and haven't been fact-checked by Espressif
Systems,
(2) burning eFuses and enabling security features are irreversible operations and can damage your ESP32 device.
We hope that this message will help you until an Espressif Engineer looks at your issue.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create a new release from a tag

on:
push:
tags:
- v*

jobs:
create_release:
name: Create GitHub release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: pip install commitizen czespressif>=1.3.1
- name: Generate changelog
run: |
cz changelog ${{ steps.get_version.outputs.VERSION }} --file-name changelog_body.md
cat changelog_body.md
- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: changelog_body.md
name: Version ${{ steps.get_version.outputs.VERSION }}
draft: true
prerelease: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check pre-commit rules

on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
pre_commit_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch head and base refs
# This is necessary for pre-commit to check the changes in the PR branch
run: |
git fetch origin ${{ github.base_ref }}:base_ref
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr_ref
- name: Set up Python environment
uses: actions/setup-python@master
with:
python-version: v3.11
- name: Install python packages
run: |
pip install pre-commit
pre-commit install-hooks
- name: Run pre-commit and check for any changes
run: |
echo "Commits being checked:"
git log --oneline --no-decorate base_ref..pr_ref
echo ""
if ! pre-commit run --from-ref base_ref --to-ref pr_ref --show-diff-on-failure ; then
echo ""
echo "::notice::It looks like the commits in this PR have been made without having pre-commit hooks installed."
echo "::notice::Please see https://github.com/espressif/esp-serial-flasher?tab=readme-ov-file#contributing for instructions."
echo ""
exit 1
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Stub sources correctness checks

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
pre_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure the stub example with the stub version argument
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.2.2
path: 'examples/esp32_stub_example'
command: idf.py reconfigure -DSERIAL_FLASHER_STUB_PULL_VERSION='0.3.0'

- name: Run git diff to check if the sources in the repo match the generated ones
run: git diff --exit-code
9 changes: 7 additions & 2 deletions esp_flasher/lib/esp-serial-flasher/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
build
build*/
sdkconfig
sdkconfig.old
empty_file.bin
binaries.c
*.lock
*.lock
python_venv
managed_components
__pycache__
.pytest_cache
pytest_embedded_log
Loading