Skip to content

Commit 228acb8

Browse files
authored
feat(flash_args): Add file with flash parameters for the built image (#12056)
* feat(flash_args): Add file with flash parameters for the built image * fix(ci): Fix paths order
1 parent d027ba1 commit 228acb8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/build_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ on:
2626
- "idf_component_examples/**"
2727
- "idf_component.yml"
2828
- "Kconfig.projbuild"
29-
- "CMakeLists.txt"
3029
- ".github/workflows/build_component.yml"
3130
- ".github/scripts/check-cmakelists.sh"
3231
- ".github/scripts/on-push-idf.sh"
@@ -45,6 +44,7 @@ on:
4544
- "!*.md"
4645
- "!*.txt"
4746
- "!*.properties"
47+
- "CMakeLists.txt"
4848

4949
permissions:
5050
contents: read

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ on:
3232
- "libraries/**/ci.yml"
3333
- "package/**"
3434
- "tools/get.*"
35-
- "platform.txt"
36-
- "programmers.txt"
3735
- "package.json"
3836
- ".github/workflows/push.yml"
3937
- ".github/scripts/install-*"
@@ -51,6 +49,8 @@ on:
5149
- "!*.md"
5250
- "!*.txt"
5351
- "!*.properties"
52+
- "platform.txt"
53+
- "programmers.txt"
5454

5555
concurrency:
5656
group: build-${{github.event.pull_request.number || github.ref}}

platform.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ recipe.hooks.objcopy.postobjcopy.2.pattern.windows=cmd /c if exist "{build.path}
182182
recipe.hooks.objcopy.postobjcopy.3.pattern_args=--chip {build.mcu} merge-bin -o "{build.path}/{build.project_name}.merged.bin" --pad-to-size {build.flash_size} --flash-mode keep --flash-freq keep --flash-size keep {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin"
183183
recipe.hooks.objcopy.postobjcopy.3.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.hooks.objcopy.postobjcopy.3.pattern_args}
184184

185+
# Generate flash_args file
186+
recipe.hooks.objcopy.postobjcopy.4.pattern=/usr/bin/env bash -c "echo '--flash-mode {build.flash_mode} --flash-freq {build.img_freq} --flash-size {build.flash_size}' > '{build.path}/flash_args' && echo '{build.bootloader_addr} {build.project_name}.bootloader.bin' >> '{build.path}/flash_args' && echo '0x8000 {build.project_name}.partitions.bin' >> '{build.path}/flash_args' && echo '0xe000 boot_app0.bin' >> '{build.path}/flash_args' && echo '0x10000 {build.project_name}.bin' >> '{build.path}/flash_args'"
187+
recipe.hooks.objcopy.postobjcopy.4.pattern.windows=cmd /c echo --flash-mode {build.flash_mode} --flash-freq {build.img_freq} --flash-size {build.flash_size} > "{build.path}\flash_args" && echo {build.bootloader_addr} {build.project_name}.bootloader.bin >> "{build.path}\flash_args" && echo 0x8000 {build.project_name}.partitions.bin >> "{build.path}\flash_args" && echo 0xe000 boot_app0.bin >> "{build.path}\flash_args" && echo 0x10000 {build.project_name}.bin >> "{build.path}\flash_args"
188+
185189
## Save bin
186190
recipe.output.tmp_file={build.project_name}.bin
187191
recipe.output.save_file={build.project_name}.{build.variant}.bin

0 commit comments

Comments
 (0)