Skip to content

Commit

Permalink
[NXP] [rt1060] OTA requestor enablement on RT1060-EVKC+Firecrest
Browse files Browse the repository at this point in the history
  • Loading branch information
jby-nxp committed Sep 30, 2024
1 parent 2e1d43e commit 665b320
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
26 changes: 11 additions & 15 deletions examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,12 @@ rt_executable("all_cluster_app") {
]
}

if (chip_enable_ota_requestor) {
sources += [
"${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp",
"${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp",
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/flash_partitioning.h",

#Adding mcuboot files
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.c",
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.h",
]
include_dirs += [
"$${common_example_dir}/ota_requestor/include",
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support",
]
if (chip_enable_ota_requestor) {
include_dirs += ["${common_example_dir}/ota_requestor/include"]
sources += [
"${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp",
"${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp",
]
}

if (wifi_auto_connect_at_boot) {
Expand Down Expand Up @@ -256,6 +248,10 @@ rt_executable("all_cluster_app") {
"-Wl,--no-warn-rwx-segments",
]

if (evkname == "evkcmimxrt1060"){
ldflags += [ "-Wl,--defsym=gEVKCFlashSize_d=0x1000000" ]
}

if (enable_ota_provider) {
# As the OTA file will be stored in the littlefs file system, it is required to increase the size of the file system
# To be able to store an OTA file with a MAX size of 640K,
Expand All @@ -270,7 +266,7 @@ rt_executable("all_cluster_app") {
# we would need to reserve enough space for the bootloader (MCUBoot)
# MCUBoot requires 0x11000 Bytes to be reserved at the base of the flash
# Consequently, some sections will need to be shifted
ldflags += [ "-Wl,--defsym=__mcu_boot_size__=0x11000" ]
ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ]
}

output_dir = root_out_dir
Expand Down
2 changes: 0 additions & 2 deletions src/platform/nxp/rt/rt1060/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ static_library("nxp_platform") {
"../../common/OTAImageProcessorImpl.cpp",
"../../common/OTAImageProcessorImpl.h",
]
include_dirs =
[ "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/" ]
}

if (chip_enable_openthread) {
Expand Down
12 changes: 10 additions & 2 deletions src/platform/nxp/rt/rt1060/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ chip_build_tests = false
#This enables the EventList global attribute
enable_eventlist_attribute = true

mbedtls_target = "${nxp_sdk_build_root}:nxp_mbedtls"

# TODO : Enable the OTA Requestor by default.
# This requires the mcuboot bootloader to be used, which reserves the first 256 kB of the flash.
# If mcuboot is not used, "no_mcuboot" must be set to true in the gn gen build command
# in order for the application to be linked at the base of the flash.
#chip_enable_ota_requestor = true
declare_args() {
# TODO : set no_mcuboot to false by default when enabling ota requestor by default
no_mcuboot = true

chip_enable_secondary_nwk_if = false
}

mbedtls_target = "${nxp_sdk_build_root}:nxp_mbedtls"

openthread_external_mbedtls = mbedtls_target
openthread_project_core_config_file = "OpenThreadConfig.h"
openthread_core_config_deps = [ "${chip_root}/third_party/openthread/platforms/nxp/${nxp_platform}:openthread_core_config_rt1060" ]
Expand Down

0 comments on commit 665b320

Please sign in to comment.