Skip to content

samples: fs: fat_fs: Add RAM disk sample for nrf52840dk #69668

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

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

de-nordic
Copy link
Collaborator

Add configuration for nrf52840dk that allows to create RAM disk; this configuration does not reserve special region in RAM using DTS but uses automatic buffer allocation, by RAM Disk Drivers, according to RAM disk specification in DTS.

@zephyrbot zephyrbot requested review from kartben, Laczen and nashif March 1, 2024 11:50
@nordicjm nordicjm added DNM This PR should not be merged (Do Not Merge) hwmv2-likely-conflict labels Mar 1, 2024
@de-nordic de-nordic marked this pull request as draft March 1, 2024 14:36
@de-nordic
Copy link
Collaborator Author

Converted draft, til the hwmv2 gets merged.

@nordicjm nordicjm removed DNM This PR should not be merged (Do Not Merge) hwmv2-likely-conflict labels Mar 4, 2024
@de-nordic de-nordic force-pushed the nrf52840_ram_fatfs branch from 195e365 to 672e2bb Compare March 18, 2024 19:08
@de-nordic de-nordic marked this pull request as ready for review March 18, 2024 19:08
@de-nordic de-nordic requested a review from nordicjm March 18, 2024 19:08
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Failure in CI is unrelated to change and is an issue with hwmv2, have added it to the issue #70445

@de-nordic de-nordic force-pushed the nrf52840_ram_fatfs branch from 8939652 to 181d017 Compare March 21, 2024 19:30
@nordicjm
Copy link
Collaborator

Needs rebase

Add configuration for nrf52840dk that allows to create RAM
disk; this configuration does not reserve special region
in RAM using DTS but uses automatic buffer allocation, by RAM
Disk Drivers, according to RAM disk specification in DTS.

Signed-off-by: Dominik Ermel <[email protected]>
Add overlay, for nrf52840dk, that reserves RAM in internal
SRAM using the DTS definition.
The sample with such region can be built with the config
file nrf52840dk_nrf52840_ram_disk_region.conf, but, instead
of automatically allocating memory, the Disk driver will
use the pre-defined region provided by the DTS overlay.

Signed-off-by: Dominik Ermel <[email protected]>
@de-nordic de-nordic force-pushed the nrf52840_ram_fatfs branch from 181d017 to 5835b50 Compare April 10, 2024 12:10
@@ -31,6 +31,18 @@ tests:
sample.filesystem.fat_fs.nrf52840dk_nrf52840:
build_only: true
platform_allow: nrf52840dk/nrf52840
sample.filesystem.fat_fs.nrf52840dk_nrf52840_ram_disk:
build_only: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why build only? (other than that the other testcases already have this set)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure why we want to run this every time, but we want to know whether it still builds.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fair enough- I guess the runtime overhead is a concern for testing teams?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, in reality the run should be done by test and verified - that way we will know whether it works internally.
The sample should be just like "Hello world" where we assume that everything works and just show people, in very simplified form, how to do things.
I was asked how do the disk in RAM, several times, and now I can just point to sample.
Building is still taking some CI time, so not perfect anyway.

@nashif nashif merged commit 919baf8 into zephyrproject-rtos:main Apr 25, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants