Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for esp32 flashing_script #8358

Merged
merged 6 commits into from
Jul 22, 2021
Merged

Fixes for esp32 flashing_script #8358

merged 6 commits into from
Jul 22, 2021

Conversation

cecille
Copy link
Contributor

@cecille cecille commented Jul 14, 2021

Problem

Flash script for ESP32 throws an exception. Also, cmake code is duplicated in multiple projects.

Change overview

  • brings back default for bootloader offset (this is what's causing the crash in most cases)
  • puts cmake code into a macro in a common file rather than in each file.
  • adds a flashing flag to the build-all-clusters-app.sh script that checks for the required environment variables and warns on unset variables (will also cause a crash)

Testing

  • build (idf.py build) and created flashing script (idf.py flashing_script) in all clusters, pigweed and persistent storage

@cecille cecille changed the title [WIP] Draft changes to esp32 flashing_script Fixes for esp32 flashing_script Jul 16, 2021
@cecille cecille marked this pull request as ready for review July 16, 2021 11:43
@cecille cecille requested a review from mspang July 16, 2021 11:43
@github-actions
Copy link

Size increase report for "esp32-example-build" from 110ef41

File Section File VM
chip-shell.elf .flash.text 32 32
chip-all-clusters-app.elf .flash.text 16 16
chip-lock-app.elf .flash.text 64 64
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.flash.text,32,32
[Unmapped],0,-32

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.xt.lit._ZN4chip6System5Mutex6UnlockEv,0,128
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE10_PostEventEPKNS0_15ChipDeviceEventE,0,80
.xt.prop._ZN4chip11DeviceLayer8Internal26GenericPlatformManagerImplINS0_19PlatformManagerImplEE14_InitChipStackEv,0,40
.flash.text,16,16
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE14_LockChipStackEv,0,-12
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE15_StartChipTimerEj,0,-12
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE16_UnlockChipStackEv,0,-12
[Unmapped],0,-16
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE14_LockChipStackEv,0,-48
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE15_StartChipTimerEj,0,-48
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE16_UnlockChipStackEv,0,-48
.xt.prop._ZN4chip6System5Mutex6UnlockEv,0,-108

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
.flash.text,64,64
[Unmapped],0,-64


examples/common/cmake/idf_flashing.cmake Outdated Show resolved Hide resolved
examples/common/cmake/idf_flashing.cmake Outdated Show resolved Hide resolved
Also adding a missed piece to the build-all-clusters-app.sh script.
@sweetymhaiske
Copy link
Contributor

sweetymhaiske commented Jul 20, 2021

@cecille Can you please update the README (Remove setting of baud value explicitly)?
README of all-clusters-app, persistent-storage , lock-app and temperature-measurement-app

@mspang
Copy link
Contributor

mspang commented Jul 21, 2021

@woody-apple woody-apple merged commit 354fc86 into project-chip:master Jul 22, 2021
@cecille cecille deleted the m5 branch July 23, 2021 19:34
mspang pushed a commit that referenced this pull request Aug 12, 2021
* Draft changes to esp32 flash_script

* Fix board type

* Fix pigweed.

* Address review comments

Also adding a missed piece to the build-all-clusters-app.sh script.

* Update readme files.

* Remove warning on ESPPORT not set.

caveat emptor.

(cherry picked from commit 354fc86)
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Draft changes to esp32 flash_script

* Fix board type

* Fix pigweed.

* Address review comments

Also adding a missed piece to the build-all-clusters-app.sh script.

* Update readme files.

* Remove warning on ESPPORT not set.

caveat emptor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants