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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,603 次查看
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.

标签 (2)
0 项奖励
回复
2 回复数

1,315 次查看
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 项奖励
回复

1,315 次查看
naftalir
Contributor III

Up... (No answer yet)

0 项奖励
回复