benchmarks/sd_bench: Fix sd_bench in CMake build system. - #3778
Open
Felix-LJY wants to merge 2 commits into
Open
benchmarks/sd_bench: Fix sd_bench in CMake build system.#3778Felix-LJY wants to merge 2 commits into
Felix-LJY wants to merge 2 commits into
Conversation
This file contains hidden or 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
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.
Summary
The sd_bench application under testing/sd_bench was not built when
using the CMake build system. The application only had a Makefile-
based build path, so users building NuttX with CMake/Ninja could not
find sdbench in the resulting image.
This change adds the missing CMakeLists.txt for sd_bench and registers
it with the applications CMake build system, so the application is
included in the build when CONFIG_BENCHMARK_SD_BENCH is enabled.
Functional areas affected:
benchmarks/sd_bench/CMakeLists.txt (new file)
benchmarks/sd_bench/CMakeLists.txt (registered into apps CMake)
References:
The corresponding nuttx repository PR adds N32H7 support and uses
sdbench for SDMMC performance verification. Without this fix,
sdbench could only be built with the Makefile build system.
Impact
Is new feature added? NO - Fixes an existing application
(sd_bench) that was not available under the CMake build system.
Impact on user? YES - Users building with CMake/Ninja and enabling
CONFIG_BENCHMARK_SD_BENCH will now get the sdbench command in the
final image, as they already did with the Makefile build system.
Impact on build? YES - Adds a new CMakeLists.txt for sd_bench and
registers it. No existing build configuration is modified.
Impact on hardware? NO - No hardware-specific changes.
Impact on documentation? NO - No documentation changes required.
Impact on security? NO - No security-relevant changes.
Impact on compatibility? NO - The Makefile build system is
unaffected. Existing users of the Makefile path see no change.
Testing
Build Host(s):
Target(s):
Verification steps:
cmake -B build -DBOARD_CONFIG=n32h762iil7:nsh -G Ninja
ninja -C build
nsh> sdbench -b 4096
Testing logs after change (summary):
nsh> sdbench -b 4096
Using block size = 4096 bytes, sync = false
Testing Sequential Write Speed...
Run 1: 1321.2 KB/s
Run 2: 1788.0 KB/s
...
Avg : 1423.2 KB/s, 14.891 MB written.
Testing Sequential Read Speed...
Run 1: 4566.0 KB/s
Run 2: 4992.7 KB/s
Avg : 4728.1 KB/s, 14.891 MB and verified
PR verification Self-Check
[x] This PR introduces only one functional change.
[x] I have updated all required description fields above.
[x] My PR adheres to Contributing Guidelines and Documentation.
[ ] My PR is still work in progress (not ready for review).
[x] My PR is ready for review and can be safely merged.