How can i make the ffs to be Write-Protected (Read-Only)?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can i make the ffs to be Write-Protected (Read-Only)?

714 Views
naftalir
Contributor III

Hi,

I'm running the MSD example with FFS (Flash File System) and want to enable Read-Only mode

to prevent changes on the MSD. how can it be done?

Thanks.

Labels (2)
0 Kudos
2 Replies

426 Views
soledad
NXP Employee
NXP Employee

Hello Naftalir,

FFS library doesn’t contain any API for Read-Only mode.

For MFS there are the following constant definitions, these can be overridden to customize MFS. To override any of these definitions, simply define the desired value in the /config/<board>/user_config.h file.

#define MFSCFG_READ_ONLY 0

• Set to one to build MFS in read-only mode without create, write, or format capability. This reduces the code size and may be useful in certain applications such as bootloaders. Set to one to enable write functionality.

#define MFSCFG_READ_ONLY_CHECK 1

• This compilation option is obsolete and does not have any effect on resulting code. Runtime read-only checks are integral parts of write support so they are always present unless MFSCFG_READ_ONLY compilation option is set.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

426 Views
naftalir
Contributor III

Up... (No answer yet)

0 Kudos