Skip to content

Commit

Permalink
[nxp toup][mcxw71_k32w1] Update build system after moving some compon…
Browse files Browse the repository at this point in the history
…ents

Signed-off-by: marius-alex-tache <[email protected]>
  • Loading branch information
marius-alex-tache committed Sep 11, 2024
1 parent 361d6f7 commit bb7b02c
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 109 deletions.
18 changes: 13 additions & 5 deletions examples/contact-sensor-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -54,6 +55,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
Expand All @@ -69,6 +73,7 @@ mcxw71_k32w1_sdk("sdk") {
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
"${support_common_platform_dir}/ble/ble_function_mux.c"
]

if (is_debug) {
Expand Down Expand Up @@ -104,7 +109,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"CONFIG_NETWORK_LAYER_BLE=1",
"CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice",
"CONFIG_OPERATIONAL_KEYSTORE=1",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"",
]

if (chip_with_diag_logs_demo) {
Expand Down Expand Up @@ -141,6 +146,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
"${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
"${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
"${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

Expand All @@ -149,19 +155,22 @@ mcxw71_k32w1_executable("contact_sensor_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"",

# The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
"LED_MANAGER_ENABLE_STATUS_LED=0",
]

include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
"${chip_root}/src/platform/nxp/common/ota"
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -183,7 +192,6 @@ mcxw71_k32w1_executable("contact_sensor_app") {
sources += [
"${example_platform_dir}/button/ButtonManager.cpp",
"${example_platform_dir}/clusters/Identify.cpp",
"${example_platform_dir}/operational_keystore/OperationalKeystore.cpp",
]

if (chip_enable_ota_requestor) {
Expand Down
22 changes: 14 additions & 8 deletions examples/contact-sensor-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -53,6 +54,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/MCXW716C"
Expand All @@ -67,7 +71,8 @@ mcxw71_k32w1_sdk("sdk") {
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c"
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
"${support_common_platform_dir}/ble/ble_function_mux.c"
]

if (is_debug) {
Expand Down Expand Up @@ -104,7 +109,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"CONFIG_NETWORK_LAYER_BLE=1",
"CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice",
"CONFIG_OPERATIONAL_KEYSTORE=1",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\""
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\""
]

if (chip_with_diag_logs_demo) {
Expand Down Expand Up @@ -141,6 +146,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
"${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
"${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
"${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp"
]

Expand All @@ -149,20 +155,21 @@ mcxw71_k32w1_executable("contact_sensor_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [
"${chip_root}/src/platform/nxp/common/legacy"
]
include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"",
# The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
"LED_MANAGER_ENABLE_STATUS_LED=0",
]

include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
"${chip_root}/src/platform/nxp/common/ota"
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -184,7 +191,6 @@ mcxw71_k32w1_executable("contact_sensor_app") {
sources += [
"${example_platform_dir}/button/ButtonManager.cpp",
"${example_platform_dir}/clusters/Identify.cpp",
"${example_platform_dir}/operational_keystore/OperationalKeystore.cpp"
]

if (chip_enable_ota_requestor) {
Expand Down
17 changes: 12 additions & 5 deletions examples/lighting-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -59,6 +60,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
Expand All @@ -74,6 +78,7 @@ mcxw71_k32w1_sdk("sdk") {
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
"${support_common_platform_dir}/ble/ble_function_mux.c"
]

if (is_debug) {
Expand Down Expand Up @@ -125,7 +130,7 @@ mcxw71_k32w1_executable("light_app") {
"CONFIG_OPERATIONAL_KEYSTORE=1",
"CONFIG_ENABLE_FEEDBACK=1",
"APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"",
]

# App common files
Expand All @@ -148,18 +153,21 @@ mcxw71_k32w1_executable("light_app") {
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
"${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
"${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
"${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"",

# The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
"LED_MANAGER_ENABLE_STATUS_LED=0",
]

include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -174,7 +182,6 @@ mcxw71_k32w1_executable("light_app") {
sources += [
"${example_platform_dir}/button/ButtonManager.cpp",
"${example_platform_dir}/clusters/Identify.cpp",
"${example_platform_dir}/operational_keystore/OperationalKeystore.cpp",
]

if (chip_enable_ota_requestor) {
Expand All @@ -186,7 +193,7 @@ mcxw71_k32w1_executable("light_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

Expand Down
28 changes: 16 additions & 12 deletions examples/lighting-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -58,6 +59,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/MCXW716C"
Expand All @@ -72,7 +76,8 @@ mcxw71_k32w1_sdk("sdk") {
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c"
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
"${support_common_platform_dir}/ble/ble_function_mux.c"
]

if (is_debug) {
Expand Down Expand Up @@ -125,7 +130,7 @@ mcxw71_k32w1_executable("light_app") {
"CONFIG_OPERATIONAL_KEYSTORE=1",
"CONFIG_ENABLE_FEEDBACK=1",
"APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\""
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\""
]

# App common files
Expand All @@ -148,17 +153,21 @@ mcxw71_k32w1_executable("light_app") {
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
"${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
"${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp"
"${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"",
# The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
"LED_MANAGER_ENABLE_STATUS_LED=0",
]

include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
"${chip_root}/src/platform/nxp/common/ota"
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -173,13 +182,10 @@ mcxw71_k32w1_executable("light_app") {
sources += [
"${example_platform_dir}/button/ButtonManager.cpp",
"${example_platform_dir}/clusters/Identify.cpp",
"${example_platform_dir}/operational_keystore/OperationalKeystore.cpp"
]

if (chip_enable_ota_requestor) {
sources += [
"${example_platform_dir}/ota/OtaUtils.cpp"
]
sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ]
}

if (chip_enable_pw_rpc) {
Expand All @@ -189,9 +195,7 @@ mcxw71_k32w1_executable("light_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [
"${chip_root}/src/platform/nxp/common/legacy"
]
include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "controller_api.h"
#include "controller_interface.h"

#include <src/platform/nxp/common/legacy/BLEManagerCommon.h>
#include <src/platform/nxp/common/ble/BLEManagerCommon.h>

/* host task configuration */
#define HOST_TASK_PRIORITY (4U)
Expand Down
Loading

0 comments on commit bb7b02c

Please sign in to comment.