-
Notifications
You must be signed in to change notification settings - Fork 6.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
spi_loopback test fails on MCUs with SRAM blocks smaller than 128KB #72792
Comments
Hi @ttmut! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
@krish2718 Can you look at it? (perhaps make the test optional via a dedicated option into tests/drivers/spi/spi_loopback/Kconfig ) |
I can make |
I think you should add a new test variant "long-transfer" that enable BUF3 testing using a dedicated Kconfig flag |
Sure, but instead of conditional test at build time, if I can make |
ok, that should be fine too indeed |
Looking at the code, the buffer itself is only 8K, it's the buffers used printing the diff that take up too much memory, and for a large buffer it's not that useful, so, I guess we can just remove the display part for large buffer and it should run on all platforms? If there is a fundamental issue then small buffer's diff can be used for debugging. @ttmut can you please share a build command or board name that reproduces the build overflow? |
It's an out-of-tree board but you can check the resource usage summary to get an idea. I have not tested on another board.
Below is the memory usage summary of another out-of-tree board that has enough RAM:
If I eliminate print buffers, RAM usage becomes ~26KB:
This would be enough to solve my case. However, if there are boards with less than ~26KB memory it could still be an issue. I am not sure if there are though. |
Well, let's start with that as its a simple fix, and even the last time CI had passed, and having extra 8K buffer for a test is reasonable. Will raise a PR, thanks. |
Thanks for looking into this, @krish2718 |
Display diff of contents for large buffers is not quite helpful and takes up huge RAM, and if a board has less RAM then this causes the test module build failures. So, disable display of diff and just log a failure, small buffer tests can be used to debug such basic issues and large buffer tests can act as a smoke test for debugging other issues. This saves about 80K of RAM. Fixes zephyrproject-rtos#72792. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Display diff of contents for large buffers is not quite helpful and takes up huge RAM, and if a board has less RAM then this causes the test module build failures. So, disable display of diff and just log a failure, small buffer tests can be used to debug such basic issues and large buffer tests can act as a smoke test for debugging other issues. This saves about 80K of RAM. Fixes zephyrproject-rtos#72792. Upstream PR: zephyrproject-rtos#72895 Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Display diff of contents for large buffers is not quite helpful and takes up huge RAM, and if a board has less RAM then this causes the test module build failures. So, disable display of diff and just log a failure, small buffer tests can be used to debug such basic issues and large buffer tests can act as a smoke test for debugging other issues. This saves about 80K of RAM. Fixes zephyrproject-rtos#72792. Upstream PR: zephyrproject-rtos#72895 Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Display diff of contents for large buffers is not quite helpful and takes up huge RAM, and if a board has less RAM then this causes the test module build failures. So, disable display of diff and just log a failure, small buffer tests can be used to debug such basic issues and large buffer tests can act as a smoke test for debugging other issues. This saves about 80K of RAM. Fixes zephyrproject-rtos#72792. Upstream PR: zephyrproject-rtos#72895 Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Describe the bug
#69081 increases RAM usage by an extra ~100KB, causing .bss section overflows on devices with small memories. I have encountered this on an out-of-tree Arm Cortex M4 board however I expect similar results with other boards.
The PR adds below buffers that I suspect are the cause of overflows.
Expected behavior
Test should compile successfully.
Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: