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

[EFR32] Implement methods for NotifyUpdateApplied after an OTA update #18584

Merged
merged 30 commits into from
May 19, 2022

Conversation

selissia
Copy link
Contributor

@selissia selissia commented May 18, 2022

Problem

EFR32 platform needs to transmit a NotifyUpdateApplied after a successful software update

Change overview

  • Implement IsFirstImageRun() and ConfirmCurrentImage() in the EFR32 implementation of OTAImageProcessor. This allows the DefaultOTARequestor object to execute the logic that triggers a NotifyUpdateApplied() call.
  • Introduce EFR32_KVS_SAVE_DELAY_SECONDS to represent the delay amount KeyValueStoreManagerImpl uses before saving the key/vaule pair
  • Delay HandleApply() to give KVS time to store the data in StoreCurrentUpdateInfo()
  • (Unrelated to the NotifyUpdateApplied issue) Define ApplicationCertificate_t structure to carry the boot image certificate

Testing

Verified that NotifyUpdateApplied() is triggered after an OTA update and reboot

kowsisoundhar12 and others added 26 commits March 8, 2022 22:28
* Added new manual scripts

* Added Auto generated File
* [ota] Store Default OTA Providers in flash

Store Default OTA Providers in flash each time the attribute
is modified and load it back on the application startup.

* Restyled by clang-format

* Fix build and reduce flash usage

Co-authored-by: Restyled.io <commits@restyled.io>
Delay HandleApply() to give KVS time to store the data in StoreCurrentUpdateInfo(). Introduce EFR32_KVS_SAVE_DELAY_SECONDS to represent the delay amount KeyValueStoreManagerImpl uses before saving the key/vaule pair
@github-actions
Copy link

github-actions bot commented May 18, 2022

PR #18584: Size comparison from 927afdf to e312dcd

Full report (14 builds for cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 927afdf e312dcd change % change
cyw30739 light cyw930739m2evb_01 (read/write) 625490 625490 0 0.0
.app_xip_area 529104 529104 0 0.0
.bss 79028 79028 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628454 628454 0 0.0
.app_xip_area 533524 533524 0 0.0
.bss 77604 77604 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 572886 572886 0 0.0
.app_xip_area 468240 468240 0 0.0
.bss 87024 87024 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w061+release (read/write) 683000 683000 0 0.0
.bss 80224 80224 0 0.0
.data 2016 2016 0 0.0
.text 599056 599056 0 0.0
lock k32w061+release (read/write) 729520 729520 0 0.0
.bss 80656 80656 0 0.0
.data 1976 1976 0 0.0
.text 645184 645184 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9078148 9078148 0 0.0
(read/write) 646209 646209 0 0.0
.bss 42209 42209 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 583944 583944 0 0.0
.dynamic 560 560 0 0.0
.got 15016 15016 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 444948 444948 0 0.0
.text 7168996 7168996 0 0.0
thermostat-no-ble arm64 (read only) 2352748 2352748 0 0.0
(read/write) 176289 176289 0 0.0
.bss 87585 87585 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79376 79376 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 147148 147148 0 0.0
.text 1975616 1975616 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2420632 2420632 0 0.0
.bss 202668 202668 0 0.0
.data 5872 5872 0 0.0
.text 1383276 1383276 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181007 1181007 0 0.0
bss 138380 138380 0 0.0
rodata 153080 153080 0 0.0
text 810672 810672 0 0.0
p6 all-clusters-app default (read/write) 2539008 2539008 0 0.0
.bss 136176 136176 0 0.0
.data 2808 2808 0 0.0
.text 1497272 1497272 0 0.0
light-app default (read/write) 2425416 2425416 0 0.0
.bss 129488 129488 0 0.0
.data 2608 2608 0 0.0
.text 1383680 1383680 0 0.0
lock-app default (read/write) 2436136 2436136 0 0.0
.bss 129304 129304 0 0.0
.data 2568 2568 0 0.0
.text 1394400 1394400 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 782668 782668 0 0.0
bss 70608 70608 0 0.0
noinit 40416 40416 0 0.0
text 553480 553480 0 0.0
lighting-app tlsr9518adk80d (read/write) 802760 802760 0 0.0
bss 70864 70864 0 0.0
noinit 40416 40416 0 0.0
text 570246 570246 0 0.0

@github-actions
Copy link

github-actions bot commented May 19, 2022

PR #18584: Size comparison from 927afdf to cd3e78b

Increases (5 builds for efr32)
platform target config section 927afdf cd3e78b4 change % change
efr32 lighting-app BRD4161A (read only) 917604 917940 336 0.0
.text 917596 917932 336 0.0
BRD4161A+rpc (read only) 951776 952112 336 0.0
.text 951768 952104 336 0.0
BRD4161A+rs911x (read only) 791044 791380 336 0.0
.text 791036 791372 336 0.0
lock-app BRD4161A+wf200 (read only) 946996 947332 336 0.0
.text 946988 947324 336 0.0
window-app BRD4161A (read only) 897708 898044 336 0.0
.text 897700 898036 336 0.0
Full report (21 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 927afdf cd3e78b4 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 625490 625490 0 0.0
.app_xip_area 529104 529104 0 0.0
.bss 79028 79028 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628454 628454 0 0.0
.app_xip_area 533524 533524 0 0.0
.bss 77604 77604 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 572886 572886 0 0.0
.app_xip_area 468240 468240 0 0.0
.bss 87024 87024 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 917604 917940 336 0.0
(read/write) 133244 133244 0 0.0
.bss 131184 131184 0 0.0
.data 2060 2060 0 0.0
.text 917596 917932 336 0.0
BRD4161A+rpc (read only) 951776 952112 336 0.0
(read/write) 149928 149928 0 0.0
.bss 147664 147664 0 0.0
.data 2264 2264 0 0.0
.text 951768 952104 336 0.0
BRD4161A+rs911x (read only) 791044 791380 336 0.0
(read/write) 129512 129512 0 0.0
.bss 127444 127444 0 0.0
.data 2068 2068 0 0.0
.text 791036 791372 336 0.0
lock-app BRD4161A+wf200 (read only) 946996 947332 336 0.0
(read/write) 123996 123996 0 0.0
.bss 121972 121972 0 0.0
.data 2024 2024 0 0.0
.text 946988 947324 336 0.0
window-app BRD4161A (read only) 897708 898044 336 0.0
(read/write) 133304 133304 0 0.0
.bss 131256 131256 0 0.0
.data 2048 2048 0 0.0
.text 897700 898036 336 0.0
esp32 all-clusters-app c3devkit (read only) 1000886 1000886 0 0.0
(read/write) 1478122 1478122 0 0.0
.dram0.bss 68208 68208 0 0.0
.dram0.data 14624 14624 0 0.0
.flash.rodata 209864 209864 0 0.0
.flash.text 1000886 1000886 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1056023 1056023 0 0.0
(read/write) 480124 480124 0 0.0
.dram0.bss 73728 73728 0 0.0
.dram0.data 34200 34200 0 0.0
.flash.rodata 240200 240200 0 0.0
.flash.text 1050639 1050639 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 683000 683000 0 0.0
.bss 80224 80224 0 0.0
.data 2016 2016 0 0.0
.text 599056 599056 0 0.0
lock k32w061+release (read/write) 729520 729520 0 0.0
.bss 80656 80656 0 0.0
.data 1976 1976 0 0.0
.text 645184 645184 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9078148 9078148 0 0.0
(read/write) 646209 646209 0 0.0
.bss 42209 42209 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 583944 583944 0 0.0
.dynamic 560 560 0 0.0
.got 15016 15016 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 444948 444948 0 0.0
.text 7168996 7168996 0 0.0
thermostat-no-ble arm64 (read only) 2352748 2352748 0 0.0
(read/write) 176289 176289 0 0.0
.bss 87585 87585 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79376 79376 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 147148 147148 0 0.0
.text 1975616 1975616 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2420632 2420632 0 0.0
.bss 202668 202668 0 0.0
.data 5872 5872 0 0.0
.text 1383276 1383276 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181007 1181007 0 0.0
bss 138380 138380 0 0.0
rodata 153080 153080 0 0.0
text 810672 810672 0 0.0
p6 all-clusters-app default (read/write) 2539008 2539008 0 0.0
.bss 136176 136176 0 0.0
.data 2808 2808 0 0.0
.text 1497272 1497272 0 0.0
light-app default (read/write) 2425416 2425416 0 0.0
.bss 129488 129488 0 0.0
.data 2608 2608 0 0.0
.text 1383680 1383680 0 0.0
lock-app default (read/write) 2436136 2436136 0 0.0
.bss 129304 129304 0 0.0
.data 2568 2568 0 0.0
.text 1394400 1394400 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 782668 782668 0 0.0
bss 70608 70608 0 0.0
noinit 40416 40416 0 0.0
text 553480 553480 0 0.0
lighting-app tlsr9518adk80d (read/write) 802760 802760 0 0.0
bss 70864 70864 0 0.0
noinit 40416 40416 0 0.0
text 570246 570246 0 0.0

@Damian-Nordic Damian-Nordic merged commit 8a872fd into project-chip:master May 19, 2022
@selissia selissia deleted the silabs-image-applied branch June 20, 2022 11:39
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.

7 participants