Skip to content

Commit

Permalink
[ota-requestor] Switch shell commands to use the common code
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Dec 9, 2021
1 parent 96f6d65 commit b96d504
Show file tree
Hide file tree
Showing 12 changed files with 322 additions and 786 deletions.
8 changes: 8 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ config CHIP_OTA_REQUESTOR
imply DFU_TARGET
imply STREAM_FLASH
imply STREAM_FLASH_ERASE

config CHIP_OTA_REQUESTOR_BUFFER_SIZE
int "OTA Requestor image buffer size"
default 1024
depends on CHIP_OTA_REQUESTOR
help
Configures size of the buffer used by OTA Requestor when downloading and
writing a new firmware image to flash.
2 changes: 1 addition & 1 deletion src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
'ON_OFF_SWITCH_CONFIG_CLUSTER': [],
'OPERATIONAL_CREDENTIALS_CLUSTER': [],
'OTA_BOOTLOAD_CLUSTER': [],
'OTA_PROVIDER_CLUSTER': [],
'OTA_PROVIDER_CLUSTER': ['ota-requestor'],
'OTA_REQUESTOR_CLUSTER': [],
'POLL_CONTROL_CLUSTER': [],
'POWER_CONFIG_CLUSTER': [],
Expand Down
14 changes: 3 additions & 11 deletions src/lib/shell/commands/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,9 @@ source_set("commands") {

if (chip_enable_ota_requestor && chip_device_platform != "none") {
sources += [ "Ota.cpp" ]
configs += [ "${chip_root}/src/controller:config" ]

if (chip_device_platform == "nrfconnect") {
sources += [ "DFUManager_nrfconnect.h" ]
}
if (chip_device_platform == "esp32") {
sources += [
"DFUManager_esp32.h",
"OTAUpdater_esp32.h",
]
}
public_deps += [ "${chip_root}/src/app/clusters/ota-requestor:headers" ]
# TODO: remove dependency of OTA shell on controller-clusters
include_dirs = [ "${chip_root}/zzz_generated/controller-clusters" ]
}

if (chip_device_platform != "none") {
Expand Down
147 changes: 0 additions & 147 deletions src/lib/shell/commands/DFUManager_esp32.h

This file was deleted.

142 changes: 0 additions & 142 deletions src/lib/shell/commands/DFUManager_nrfconnect.h

This file was deleted.

Loading

0 comments on commit b96d504

Please sign in to comment.