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

[TI] CC13x4_26x4 OTA #30757

Merged
merged 28 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
499cd33
image is downloaded but apply fails
abiradarti Aug 30, 2023
0427b56
increased size of mcuboot_max_img_sectors
abiradarti Sep 1, 2023
6d689dc
ota header debug ongoing
abiradarti Sep 20, 2023
7a48d9e
modified first block so that the Matter OTA header is skipped when wr…
abiradarti Sep 25, 2023
b6f0eea
added header offset in first block to account for img magic, img leng…
abiradarti Nov 17, 2023
fb64c69
OTA working with SDK MCUBoot build
abiradarti Nov 30, 2023
667ee85
code cleanup and enable OTA for all apps
abiradarti Nov 30, 2023
b490a6e
more code cleanup
abiradarti Nov 30, 2023
0125b0f
various build error fixes
abiradarti Nov 30, 2023
8ad3ff8
image is downloaded but apply fails
abiradarti Aug 30, 2023
8402517
increased size of mcuboot_max_img_sectors
abiradarti Sep 1, 2023
dbfba71
ota header debug ongoing
abiradarti Sep 20, 2023
762b2ad
modified first block so that the Matter OTA header is skipped when wr…
abiradarti Sep 25, 2023
88d3fd5
added header offset in first block to account for img magic, img leng…
abiradarti Nov 17, 2023
fbd19db
OTA working with SDK MCUBoot build
abiradarti Nov 30, 2023
f6f67f4
code cleanup and enable OTA for all apps
abiradarti Nov 30, 2023
6b1d39c
more code cleanup
abiradarti Nov 30, 2023
4da682f
various build error fixes
abiradarti Nov 30, 2023
ddbcd15
Merge branch 'cc13x4_26x4_ota' of github.com:abiradarti/connectedhome…
abiradarti Nov 30, 2023
6321266
added merged ti_simplelink_sdk.gni
abiradarti Nov 30, 2023
bede0af
ti_simplelink_sdk.gni fix
abiradarti Nov 30, 2023
b7d0684
updated TI OTA readme
abiradarti Dec 1, 2023
79e52b7
added back in MCUBoot, updates README docs, fixed spelling errors
abiradarti Dec 5, 2023
02ce72a
Restyled by whitespace
restyled-commits Dec 5, 2023
8f57aa0
Restyled by clang-format
restyled-commits Dec 5, 2023
0beb56f
Restyled by gn
restyled-commits Dec 5, 2023
cfd2b7a
fixed clang formatting in flash_map_backend.c
abiradarti Dec 5, 2023
29fae17
Restyled by clang-format
restyled-commits Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/all-clusters-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_devices_config.c",
"ti_radio_config.c",
"ti_radio_config.h",
"ti_drivers_config.c",
Expand All @@ -47,6 +46,10 @@ ti_sysconfig("sysconfig") {
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included. The flag to enable or disable the OTA
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and `MCUBoot` included. The flag to enable or disable the OTA
feature is determined by "chip_enable_ota_requestor" in the application's
args.gni file.

Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
optimize_debug_level = "s"
lwip_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"
chip_openthread_ftd = true
Expand All @@ -49,4 +49,4 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x8006"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
3 changes: 2 additions & 1 deletion examples/all-clusters-app/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <platform/cc13x2_26x2/OTAImageProcessorImpl.h>
#include <platform/cc13xx_26xx/OTAImageProcessorImpl.h>
#endif
#include <lib/support/CHIPMem.h>
#include <lib/support/CHIPPlatformMemory.h>
Expand Down
6 changes: 4 additions & 2 deletions examples/lighting-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ ti_sysconfig("sysconfig") {
"ti_ble_config.h",
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",
"ti_devices_config.c",
"ti_devices_config.h",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included. The flag to enable or disable the OTA
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and `MCUBoot` included. The flag to enable or disable the OTA
feature is determined by "chip_enable_ota_requestor" in the application's
args.gni file.

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
optimize_debug_level = "s"
lwip_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

chip_openthread_ftd = true
openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"
Expand All @@ -47,4 +47,4 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x8005"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
3 changes: 2 additions & 1 deletion examples/lighting-app/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
8 changes: 3 additions & 5 deletions examples/lock-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ ti_sysconfig("sysconfig") {
"ti_radio_config.h",
"ti_drivers_config.c",
"ti_drivers_config.h",
"ti_devices_config.c",
"ti_devices_config.h",
"ti_ble_config.c",
"ti_ble_config.h",
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",
# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# not traditional source files
#"ti_utils_build_linker.cmd.genlibs",
Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included. The flag to enable or disable the OTA
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and `MCUBoot` included. The flag to enable or disable the OTA
feature is determined by "chip_enable_ota_requestor" in the application's
args.gni file.

Expand Down
11 changes: 6 additions & 5 deletions examples/lock-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
optimize_debug_level = "s"
lwip_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

chip_openthread_ftd = true
openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"

# Disable CHIP Logging
#chip_progress_logging = false
#chip_detail_logging = false
#chip_automation_logging = false
chip_progress_logging = true
chip_detail_logging = true
chip_automation_logging = true

# BLE options
chip_config_network_layer_ble = true
Expand All @@ -47,4 +47,5 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x8006"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
# should be maj.min.rev+build with later parts optional for MCUBoot
3 changes: 2 additions & 1 deletion examples/lock-app/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
5 changes: 4 additions & 1 deletion examples/pump-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_devices_config.c",
"ti_radio_config.c",
"ti_radio_config.h",
"ti_drivers_config.c",
Expand All @@ -46,6 +45,10 @@ ti_sysconfig("sysconfig") {
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",
Expand Down
4 changes: 2 additions & 2 deletions examples/pump-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included. The flag to enable or disable the OTA
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and `MCUBoot` included. The flag to enable or disable the OTA
feature is determined by "chip_enable_ota_requestor" in the application's
args.gni file.

Expand Down
4 changes: 2 additions & 2 deletions examples/pump-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
optimize_debug_level = "s"
lwip_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"
chip_openthread_ftd = true
Expand All @@ -47,4 +47,4 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x800A"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
3 changes: 2 additions & 1 deletion examples/pump-app/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
5 changes: 4 additions & 1 deletion examples/pump-controller-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_devices_config.c",
"ti_radio_config.c",
"ti_radio_config.h",
"ti_drivers_config.c",
Expand All @@ -47,6 +46,10 @@ ti_sysconfig("sysconfig") {
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",
Expand Down
4 changes: 2 additions & 2 deletions examples/pump-controller-app/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included. The flag to enable or disable the OTA
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and `MCUBoot` included. The flag to enable or disable the OTA
feature is determined by "chip_enable_ota_requestor" in the application's
args.gni file.

Expand Down
4 changes: 2 additions & 2 deletions examples/pump-controller-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
optimize_debug_level = "s"
lwip_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"
chip_openthread_ftd = true
Expand All @@ -47,4 +47,4 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x8011"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
3 changes: 2 additions & 1 deletion examples/pump-controller-app/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
4 changes: 2 additions & 2 deletions examples/shell/cc13x4_26x4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ the session.
Select the ELF image to load on the device with the `Browse` button. This file
is placed in the `out/debug` folder by this guide and ends with the `*.out` file
extension. For OTA enabled applications, the standalone image will instead end
with the `*-bim.hex` file extension. This this is a combined image with
application and and `BIM` included.
with the `*-mcuboot.hex` file extension. This this is a combined image with
application and and `MCUBoot` included.

Finally click the `Load Image` button to load the executable image onto the
device. You should be able to see the log output over the XDS110 User UART.
Expand Down
4 changes: 2 additions & 2 deletions examples/shell/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ti_simplelink_board = "LP_EM_CC1354P10_6"
# use -Os instead of -Og, LWIP release build
is_debug = false

chip_enable_ota_requestor = false
chip_enable_ota_requestor = true

# Disable FTD Build for all-clusters app to save Flash
chip_openthread_ftd = false
Expand All @@ -48,4 +48,4 @@ chip_stack_lock_tracking = "none"
matter_device_vid = "0xFFF1"
matter_device_pid = "0x8006"
matter_software_ver = "0x0001"
matter_software_ver_str = "1.0d1"
matter_software_ver_str = "1.0.1+1"
3 changes: 2 additions & 1 deletion examples/shell/cc13x4_26x4/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

CCFG.enableCodeGeneration = true;
/* disable CCFG for OTA-able application */
CCFG.enableCodeGeneration = false;


/* NVS */
Expand Down
3 changes: 3 additions & 0 deletions scripts/setup/requirements.ti.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
cbor>=1.0.0
click
cryptography>=2.6
ecdsa>=0.17.0
intelhex
3 changes: 1 addition & 2 deletions src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ static_library("cc13x2_26x2") {
# this needs to be in the final link to place the data correctly
# see ${chip_root}/third_party/ti_simplelink_sdk/ti_simplelink_executable.gni
#"oad_image_header.c",
"../OTAImageProcessorImpl.cpp",
"../OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.cpp",
]
}

Expand Down
8 changes: 1 addition & 7 deletions src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ static_library("cc13x4_26x4") {
}

if (chip_enable_ota_requestor) {
sources += [
# this needs to be in the final link to place the data correctly
# see ${chip_root}/third_party/ti_simplelink_sdk/ti_simplelink_executable.gni
#"oad_image_header.c",
"../OTAImageProcessorImpl.cpp",
"../OTAImageProcessorImpl.h",
]
sources += [ "OTAImageProcessorImpl.cpp" ]
}

if (chip_enable_openthread) {
Expand Down
Loading
Loading