-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[K32W0] SDK 2.6.12 changes #28489
Merged
Merged
[K32W0] SDK 2.6.12 changes #28489
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR #28489: Size comparison from cfa8212 to f54fa31 Decreases (1 build for cc32xx)
Full report (4 builds for cc32xx, mbed, qpg)
|
doru91
approved these changes
Aug 3, 2023
marius-alex-tache
force-pushed
the
upstream-k32w0-2.6.12
branch
from
August 3, 2023 05:40
f54fa31
to
94a64d5
Compare
PR #28489: Size comparison from 7df6d0a to 94a64d5 Full report (1 build for cc32xx)
|
marius-alex-tache
force-pushed
the
upstream-k32w0-2.6.12
branch
2 times, most recently
from
August 3, 2023 05:57
ef13af4
to
2830bf4
Compare
PR #28489: Size comparison from 7df6d0a to 2830bf4 Increases (8 builds for bl702l, cyw30739, telink)
Decreases (14 builds for bl602, bl702, cc32xx, cyw30739, psoc6, telink)
Full report (57 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
pullapprove
bot
requested review from
andy31415,
andyg-apple,
anush-apple,
arkq,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
gjc13,
harsha-rajendran,
hawk248,
hicklin and
jepenven-silabs
August 3, 2023 06:16
Stop advertising was wrongly scheduled from the timer service daemon task, which has the highest priority. This caused BLE controller task to be preempted when doing the switch from fast to slow advertising mode, which caused some events to not be captured on time, resulting in a failed advertising stop. Stop advertising is now scheduled to run from Matter task. Signed-off-by: Marius Tache <[email protected]>
The example uses template/reference board configuration files. To overwrite the board configuration files, set `override_is_DK6=false` in the `k32w0_sdk` target from the app `BUILD.gn`: ``` k32w0_sdk("sdk") { override_is_DK6 = false ... } ``` This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` option, thus the reference board configuration files will no longer be used. Signed-off-by: Marius Tache <[email protected]>
RAM storage class was moved to k32w0 folder. RamStorageKey files were removed and implementation was moved inside RamStorage. Signed-off-by: Marius Tache <[email protected]>
Increase number of KVS keys to 200. Signed-off-by: Marius Tache <[email protected]>
Not in the scope of the ticket. Signed-off-by: Marius Tache <[email protected]>
…etting If extended search was enabled for a RAM storage instance, then factory reset should remove all PDM ids used, starting with the base one. Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
Restyled by clang-format Restyled by gn Restyled by prettier-markdown Restyled by prettier-yaml
update cPWR_UsePowerDownMode usage to a more generic chip_with_low_power in order to be able to be used by multiple platforms Signed-off-by: Marius Vilvoi <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
…ly under the K32W061 board
Signed-off-by: Marius Tache <[email protected]>
Restyled by gn Restyled by prettier-markdown
The user can specify a custom SDK by setting NXP_K32W0_SDK_ROOT. If such an env variabile is not defined, then the gn env will implicitly set it to the SDK found in the repo: third_party/nxp/k32w0_sdk/repo/core Signed-off-by: Marius Tache <[email protected]>
Signed-off-by: Marius Tache <[email protected]>
marius-alex-tache
force-pushed
the
upstream-k32w0-2.6.12
branch
from
August 8, 2023 14:27
a11bc4c
to
d0b3ee7
Compare
PR #28489: Size comparison from ca3dbdf to d0b3ee7 Increases above 0.2%:
Increases (17 builds for bl702, bl702l, cc32xx, k32w, mbed, nrfconnect, psoc6, telink)
Decreases (9 builds for efr32, k32w, psoc6, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
andy31415
approved these changes
Aug 9, 2023
abpoth
pushed a commit
to abpoth/connectedhomeip
that referenced
this pull request
Aug 15, 2023
* k32w0: Re-use Thread task for BLE processing Signed-off-by: Doru Gucea <[email protected]> * k32w0: Use generic FreeRTOS functions Avoid using messaging/allocation functions specific to K32W0-SDK and use instead generic FreeRTOS functions. This opens the path for a common BLE Manager between K32W0/K32W1. Signed-off-by: Doru Gucea <[email protected]> * k32w0: event queues: use generic FreeRTOS functions Signed-off-by: Doru Gucea <[email protected]> * k32w0: avoid useless advertising restarting There is no need to restart advertising after a connect event. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Place BLE common code in a single file Only specific BLE initialization code is placed under k32w0 folder. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Place specific initialization code in an abstract method Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Avoid useless stop of ble advertising Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Remove unused function Signed-off-by: Doru Gucea <[email protected]> * k32w0: remove useless controller code NVIC Priority set is done inside the controller library. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Small fixes - return codes; - comments. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Add LP API header The LP API was not included in BleManagerImpl when building in low power mode. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Clear unsupported thread metrics Thread metrics optional fields should call ClearValue explicitly, to make sure no garbage is returned in the response message. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Disable CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ for lock/contact sensor This define enables/disables the Gap_LeSetPhy request to switch to 2M. It is disabled here for interoperability reasons just to be extra cautious. Both devices may send a Link Layer control procedure in parallel resulting in a LPM Error Transaction Collision. If the peer device doesn't accept our reject command, this can result in a BLE connection timeout. Signed-off-by: Marius Tache <[email protected]> * [K32W0] FRO 32K mode should be used with 32Mhz cpu clock Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove OTA API dependency in factory data provider If factory data is used, then it is expected that the internal flash section is written, so the factory data provider can memcpy directly, without additional checks that were previously done in OtaUtils. Using the OTA API for reading internal flash data just seems unnatural. In the absence of another API, just memcpy directly assuming the section was written. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Rename factory data flag CONFIG_CHIP_K32W0_REAL_FACTORY_DATA renamed to CONFIG_CHIP_LOAD_REAL_FACTORY_DATA. Also replaced format string in factory data provider logs. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Rename K32W0FactoryDataProvider to FactoryDataProvider Signed-off-by: Marius Tache <[email protected]> * [K32W0] Move FactoryDataProvider to K32W common area Update #include statements to use an absolute path. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add FactoryDataProviderImpl FactoryDataProviderImpl has two main features: - CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER - enables application factory data provider - CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - enables factory data OTA Enclose the corresponding functions in their respective flags. Applications should instantiate a FactoryDataProviderImpl instance, which can be default or custom. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add support for kSoftwareUpdateCompleted boot reason A new K32WConfig key is introduced: kConfigKey_SoftwareUpdateCompleted This key is stored in OTA HandleApply, before the device is reset. Upon initialization, if the reset is caused by a system reset (ResetMCU), then if this key exists, the boot reason is kSoftwareUpdateCompleted. Signed-off-by: Marius Tache <[email protected]> * [K32W0] POWER_GetResetCause() should be called once for each startup, and its return value should be processed bit by bit * [K32W0] the priority is watchdog reset, when software reset and watchdog reset are set at the same time in POWER_GetResetCause() * [K32W0] Remove ble connections state Other changes: * Set fast advertising flag when advertising is stopped * Add device connected state Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove unused members Signed-off-by: Marius Tache <[email protected]> * [K32W0] Move global variables to class members Add HandleForceDisconnect method. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Event queue should be emptied in DoBleProcessing Signed-off-by: Marius Tache <[email protected]> * [K32W0] Cancel BLE advertising timer upon connection close event Signed-off-by: Marius Tache <[email protected]> * [K32W0] Schedule stop advertising from Matter task Stop advertising was wrongly scheduled from the timer service daemon task, which has the highest priority. This caused BLE controller task to be preempted when doing the switch from fast to slow advertising mode, which caused some events to not be captured on time, resulting in a failed advertising stop. Stop advertising is now scheduled to run from Matter task. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add instructions to overwrite board configuration files The example uses template/reference board configuration files. To overwrite the board configuration files, set `override_is_DK6=false` in the `k32w0_sdk` target from the app `BUILD.gn`: ``` k32w0_sdk("sdk") { override_is_DK6 = false ... } ``` This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` option, thus the reference board configuration files will no longer be used. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Restructure RAM storage RAM storage class was moved to k32w0 folder. RamStorageKey files were removed and implementation was moved inside RamStorage. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add extendedSearch option Increase number of KVS keys to 200. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove unused ksdk_mbedtls file Not in the scope of the ticket. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Extended search should be taken into account when factory resetting If extended search was enabled for a RAM storage instance, then factory reset should remove all PDM ids used, starting with the base one. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Update SDK version in README files Signed-off-by: Marius Tache <[email protected]> * [K32W0] Set rotating device id unique id length to max by default Signed-off-by: Marius Tache <[email protected]> * [K32W0] Use west to get K32W0 SDK * [K32W0] Remove deprecated function pointer Signed-off-by: Marius Tache <[email protected]> * [NXP] Bump ot-nxp to latest Signed-off-by: Marius Tache <[email protected]> * Restyled by whitespace Restyled by clang-format Restyled by gn Restyled by prettier-markdown Restyled by prettier-yaml * [K32W0] update cPWR_UsePowerDownMode to chip_with_low_power update cPWR_UsePowerDownMode usage to a more generic chip_with_low_power in order to be able to be used by multiple platforms Signed-off-by: Marius Vilvoi <[email protected]> * [K32W0] Remove unused flag in README files Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove redundant header file Signed-off-by: Marius Tache <[email protected]> * [K32W0] Update path for building K32W041 as this missing files are only under the K32W061 board * [K32W0] Update docker image version in examples job Signed-off-by: Marius Tache <[email protected]> * Restyled by whitespace Restyled by gn Restyled by prettier-markdown * [K32W0] Update documentation for reference apps The user can specify a custom SDK by setting NXP_K32W0_SDK_ROOT. If such an env variabile is not defined, then the gn env will implicitly set it to the SDK found in the repo: third_party/nxp/k32w0_sdk/repo/core Signed-off-by: Marius Tache <[email protected]> * Restyled by gn * Restyled by prettier-markdown * [K32W0] BLE processing should be done under the corresponding flag Signed-off-by: Marius Tache <[email protected]> --------- Signed-off-by: Doru Gucea <[email protected]> Signed-off-by: Marius Tache <[email protected]> Signed-off-by: Marius Vilvoi <[email protected]> Co-authored-by: Doru Gucea <[email protected]> Co-authored-by: tanyue518 <[email protected]> Co-authored-by: Gabriel Couturier <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Marius Vilvoi <[email protected]>
s07641069
pushed a commit
to s07641069/connectedhomeip
that referenced
this pull request
Aug 22, 2023
* k32w0: Re-use Thread task for BLE processing Signed-off-by: Doru Gucea <[email protected]> * k32w0: Use generic FreeRTOS functions Avoid using messaging/allocation functions specific to K32W0-SDK and use instead generic FreeRTOS functions. This opens the path for a common BLE Manager between K32W0/K32W1. Signed-off-by: Doru Gucea <[email protected]> * k32w0: event queues: use generic FreeRTOS functions Signed-off-by: Doru Gucea <[email protected]> * k32w0: avoid useless advertising restarting There is no need to restart advertising after a connect event. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Place BLE common code in a single file Only specific BLE initialization code is placed under k32w0 folder. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Place specific initialization code in an abstract method Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Avoid useless stop of ble advertising Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Remove unused function Signed-off-by: Doru Gucea <[email protected]> * k32w0: remove useless controller code NVIC Priority set is done inside the controller library. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Small fixes - return codes; - comments. Signed-off-by: Doru Gucea <[email protected]> * [K32W0] Add LP API header The LP API was not included in BleManagerImpl when building in low power mode. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Clear unsupported thread metrics Thread metrics optional fields should call ClearValue explicitly, to make sure no garbage is returned in the response message. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Disable CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ for lock/contact sensor This define enables/disables the Gap_LeSetPhy request to switch to 2M. It is disabled here for interoperability reasons just to be extra cautious. Both devices may send a Link Layer control procedure in parallel resulting in a LPM Error Transaction Collision. If the peer device doesn't accept our reject command, this can result in a BLE connection timeout. Signed-off-by: Marius Tache <[email protected]> * [K32W0] FRO 32K mode should be used with 32Mhz cpu clock Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove OTA API dependency in factory data provider If factory data is used, then it is expected that the internal flash section is written, so the factory data provider can memcpy directly, without additional checks that were previously done in OtaUtils. Using the OTA API for reading internal flash data just seems unnatural. In the absence of another API, just memcpy directly assuming the section was written. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Rename factory data flag CONFIG_CHIP_K32W0_REAL_FACTORY_DATA renamed to CONFIG_CHIP_LOAD_REAL_FACTORY_DATA. Also replaced format string in factory data provider logs. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Rename K32W0FactoryDataProvider to FactoryDataProvider Signed-off-by: Marius Tache <[email protected]> * [K32W0] Move FactoryDataProvider to K32W common area Update #include statements to use an absolute path. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add FactoryDataProviderImpl FactoryDataProviderImpl has two main features: - CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER - enables application factory data provider - CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - enables factory data OTA Enclose the corresponding functions in their respective flags. Applications should instantiate a FactoryDataProviderImpl instance, which can be default or custom. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add support for kSoftwareUpdateCompleted boot reason A new K32WConfig key is introduced: kConfigKey_SoftwareUpdateCompleted This key is stored in OTA HandleApply, before the device is reset. Upon initialization, if the reset is caused by a system reset (ResetMCU), then if this key exists, the boot reason is kSoftwareUpdateCompleted. Signed-off-by: Marius Tache <[email protected]> * [K32W0] POWER_GetResetCause() should be called once for each startup, and its return value should be processed bit by bit * [K32W0] the priority is watchdog reset, when software reset and watchdog reset are set at the same time in POWER_GetResetCause() * [K32W0] Remove ble connections state Other changes: * Set fast advertising flag when advertising is stopped * Add device connected state Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove unused members Signed-off-by: Marius Tache <[email protected]> * [K32W0] Move global variables to class members Add HandleForceDisconnect method. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Event queue should be emptied in DoBleProcessing Signed-off-by: Marius Tache <[email protected]> * [K32W0] Cancel BLE advertising timer upon connection close event Signed-off-by: Marius Tache <[email protected]> * [K32W0] Schedule stop advertising from Matter task Stop advertising was wrongly scheduled from the timer service daemon task, which has the highest priority. This caused BLE controller task to be preempted when doing the switch from fast to slow advertising mode, which caused some events to not be captured on time, resulting in a failed advertising stop. Stop advertising is now scheduled to run from Matter task. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add instructions to overwrite board configuration files The example uses template/reference board configuration files. To overwrite the board configuration files, set `override_is_DK6=false` in the `k32w0_sdk` target from the app `BUILD.gn`: ``` k32w0_sdk("sdk") { override_is_DK6 = false ... } ``` This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` option, thus the reference board configuration files will no longer be used. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Restructure RAM storage RAM storage class was moved to k32w0 folder. RamStorageKey files were removed and implementation was moved inside RamStorage. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Add extendedSearch option Increase number of KVS keys to 200. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove unused ksdk_mbedtls file Not in the scope of the ticket. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Extended search should be taken into account when factory resetting If extended search was enabled for a RAM storage instance, then factory reset should remove all PDM ids used, starting with the base one. Signed-off-by: Marius Tache <[email protected]> * [K32W0] Update SDK version in README files Signed-off-by: Marius Tache <[email protected]> * [K32W0] Set rotating device id unique id length to max by default Signed-off-by: Marius Tache <[email protected]> * [K32W0] Use west to get K32W0 SDK * [K32W0] Remove deprecated function pointer Signed-off-by: Marius Tache <[email protected]> * [NXP] Bump ot-nxp to latest Signed-off-by: Marius Tache <[email protected]> * Restyled by whitespace Restyled by clang-format Restyled by gn Restyled by prettier-markdown Restyled by prettier-yaml * [K32W0] update cPWR_UsePowerDownMode to chip_with_low_power update cPWR_UsePowerDownMode usage to a more generic chip_with_low_power in order to be able to be used by multiple platforms Signed-off-by: Marius Vilvoi <[email protected]> * [K32W0] Remove unused flag in README files Signed-off-by: Marius Tache <[email protected]> * [K32W0] Remove redundant header file Signed-off-by: Marius Tache <[email protected]> * [K32W0] Update path for building K32W041 as this missing files are only under the K32W061 board * [K32W0] Update docker image version in examples job Signed-off-by: Marius Tache <[email protected]> * Restyled by whitespace Restyled by gn Restyled by prettier-markdown * [K32W0] Update documentation for reference apps The user can specify a custom SDK by setting NXP_K32W0_SDK_ROOT. If such an env variabile is not defined, then the gn env will implicitly set it to the SDK found in the repo: third_party/nxp/k32w0_sdk/repo/core Signed-off-by: Marius Tache <[email protected]> * Restyled by gn * Restyled by prettier-markdown * [K32W0] BLE processing should be done under the corresponding flag Signed-off-by: Marius Tache <[email protected]> --------- Signed-off-by: Doru Gucea <[email protected]> Signed-off-by: Marius Tache <[email protected]> Signed-off-by: Marius Vilvoi <[email protected]> Co-authored-by: Doru Gucea <[email protected]> Co-authored-by: tanyue518 <[email protected]> Co-authored-by: Gabriel Couturier <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Marius Vilvoi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog:
Signed-off-by: Doru Gucea [email protected]
Signed-off-by: Ethan Tan [email protected]
Signed-off-by: Gabriel Couturier [email protected]
Signed-off-by: Marius Vilvoi [email protected]
Signed-off-by: Marius Tache [email protected]
Depends on #28431 to pass CI/CV.