Skip to content

Conversation

@cvinayak
Copy link
Contributor

@cvinayak cvinayak commented Nov 6, 2024

Workaround failing autopts weekly run due to tester application having Bus Fault in the nRF53 NET core hci_ipc firmware at startup.

Having atleast 32 bytes free in nRF53x hci_ipc sample to avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Reduce supported ISO Broadcaster instance and ISO TX buffer counts in the Controller hci_ipc firmware.

Add sysbuild support for tester application so that the build is CI verified.

sysbuild commandline for LE audio PTS testing:

  # west build --sysbuild -b nrf5340_audio_dk/nrf5340/cpuapp -d build/tester tests/bluetooth/tester -DEXTRA_CONF_FILE="overlay-le-audio.conf"

Fixes #80852.

@cvinayak cvinayak marked this pull request as ready for review November 6, 2024 12:06
@zephyrbot zephyrbot added area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth labels Nov 6, 2024
@Thalley
Copy link
Contributor

Thalley commented Nov 6, 2024

Having atleast 32 bytes free in nRF53x hci_ipc sample to avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Why is this not causing an out-of-memory error when building? isn't it a problem that we have a silent out-of-memory issue during build?

Comment on lines 3 to 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider applying this to the hci_ipc sample instead?

There are no defined use cases for ISO/Audio that uses multiple BIGs, so this may be a better default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done post v4.0 (we we decide to tag this as hotfix) to avoid too much changes/uncertainties to existing test executions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we can consider this a hotfix as it is not causing an CI issues, or otherwise block anyone from working with Zephyr. This is unlikely to get merged before 4.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont we want a PTS run this weekend? or we wait for a run after the v4.0 release 2 week later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give a thumbs up if you want me to revert the overrides here and instead save RAM by reducing heap size?

@cvinayak
Copy link
Contributor Author

cvinayak commented Nov 6, 2024

Having atleast 32 bytes free in nRF53x hci_ipc sample to avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Why is this not causing an out-of-memory error when building? isn't it a problem that we have a silent out-of-memory issue during build?

Need to create a generic bug for not able to use the full RAM. Need to check on other targets and with hello world sample, if have a dummy array to utilize the full RAM causes bus faults due to kernel SYSINITs.

@sjanc
Copy link
Contributor

sjanc commented Nov 6, 2024

#AutoPTS run zephyr AICS/SR/CP/BV-01-C

@codecoup-tester
Copy link

Scheduled PR #80990 (comment), board: nrf53, estimated start time: 14:06:13, test case count: 1, estimated duration: 0:01:02

Test cases to be runAICS/SR/CP/BV-01-C

@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful tests (1)AICS AICS/SR/CP/BV-01-C PASS

@cvinayak
Copy link
Contributor Author

cvinayak commented Nov 7, 2024

Having atleast 32 bytes free in nRF53x hci_ipc sample to avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Why is this not causing an out-of-memory error when building? isn't it a problem that we have a silent out-of-memory issue during build?

Need to create a generic bug for not able to use the full RAM. Need to check on other targets and with hello world sample, if have a dummy array to utilize the full RAM causes bus faults due to kernel SYSINITs.

FYI, #81044

@sjanc
Copy link
Contributor

sjanc commented Nov 7, 2024

looking at #81044, maybe we should simply disable heap for hci samples?

@mmahadevan108
Copy link
Contributor

Do we need this PR. See this comment on Discord.

@sjanc
Copy link
Contributor

sjanc commented Nov 8, 2024

maybe we just reduce CONFIG_HEAP_MEM_POOL_SIZE=8192 ? it seems to be 8k for some reason..

I just smoke tested this with 7k heap and it seems to work OK

Workaround failing autopts weekly run due to tester
application having Bus Fault in the nRF53 NET core hci_ipc
firmware at startup.

Having atleast 32 bytes free in nRF53x hci_ipc sample to
avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Reduce supported ISO Broadcaster instance and ISO TX buffer
counts in the Controller hci_ipc firmware.

Add sysbuild support for tester application so that the
build is CI verified.

sysbuild commandline for LE audio PTS testing:

  # west build --sysbuild -b nrf5340_audio_dk/nrf5340/cpuapp
    -d build/tester tests/bluetooth/tester
    -DEXTRA_CONF_FILE="overlay-le-audio.conf"

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
@cvinayak cvinayak force-pushed the github_tests_bluetooth_tester_fix branch from 154c89f to 234255b Compare November 8, 2024 13:26
@cvinayak cvinayak added the Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc. label Nov 8, 2024
@cvinayak cvinayak added this to the v4.0.0 milestone Nov 8, 2024
@cvinayak
Copy link
Contributor Author

cvinayak commented Nov 8, 2024

@mmahadevan108 This hotfix PR is needed to be able to run weekly Bluetooth LE Audio Profile Tuning Suite tests hosted by CodeCoup

@mmahadevan108 mmahadevan108 merged commit 525ba38 into zephyrproject-rtos:main Nov 8, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enabling Bluetooth on nRF5340 fails

7 participants