LittleFS on the External Flash for MIMXRT1062 EVK

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

LittleFS on the External Flash for MIMXRT1062 EVK

2,741 次查看
Desmond_lim
Contributor III

Hi NXP SW experts,

I am running through the SDK sample code for LittleFS and I am having a bit of trouble incorporating it in my code.

Currently, my code is running in external NOR flash and I have partition the external flash to two partition, one for code and one for data. As for the Data, I would like to use the LittleFS in one of the sector on the data partition. I was referring to the SDK but, I noticed that the sample is running in the OC RAM and the Data is stored the internal flash (XIP_EXTERNAL_FLASH is not defined. Am I correct that it is running on the internal flash right?) 

Are there any sample code that I can refer to so that make one of the external sector using the Little FS?

Thanks.

0 项奖励
回复
7 回复数

2,738 次查看
Desmond_lim
Contributor III

Correction on my previous posting.

I just check that the data is stored in 

/* FlexSPI2 AMBA address. */
#define FlexSPI2_AMBA_BASE (0x70000000U)
/* FlexSPI ASFM address. */
#define FlexSPI2_ASFM_BASE (0x70000000U)
/* Base Address of AHB address space mapped to IP RX FIFO. */
#define FlexSPI2_ARDF_BASE (0x7F400000U)
/* Base Address of AHB address space mapped to IP TX FIFO. */
#define FlexSPI2_ATDF_BASE (0x7F000000U)

I think this is the external Flash too. Am I right on this?

0 项奖励
回复

2,732 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) I think this is the external Flash too. Am I right on this?
-- Yes, you're right, meanwhile, the FlexSPI driver is executed in the RAM to manipulate the QSPI flash such as read, write, etc.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,723 次查看
Desmond_lim
Contributor III

Hi Jeremy,

Thank you for your quick response.

I understand that littleFS_shell is all running in RAM area and I also understand that FlexSPI driver needs to be running in the RAM area. 

One question still remains that is does littleFS code needs to be in the RAM area as well.

In my own code, I have tired to configure the cfg in the littleFS in the flash and it crashed. At the moment, I am trying to study and understand the littleFS code and yet to try to change it to RAM. Just want to understand from your point of view if that is possible??

0 项奖励
回复

2,721 次查看
Desmond_lim
Contributor III

Hi Jeremy,

Another question on littleFS. What is the minimum RAM space and external flash space needed to implement the littleFS. Just out of my curiosity that if I reserved one sector of the flash space for the littleFS, when the space is full, will it do the erasing or do I have to handle that my own??

 

0 项奖励
回复

2,705 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) What is the minimum RAM space and external flash space needed to implement the littleFS. Just out of my curiosity that if I reserved one sector of the flash space for the littleFS when the space is full, will it do the erasing, or do I have to handle that my own??
-- Please refer to the link to learn the minimum requirement of flash and RAM space to deploy the LittleFS, regarding the second question,
I don't think the file system will indicate the space is full when it can't afford to occupy enough size to store the writing file, however, you'd better review to the guider of LittleFS for confirmation.
Have a great day,
TIC

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,686 次查看
Desmond_lim
Contributor III

Hi Jeremy,

Jeremy Response>> Please refer to the link to learn the minimum requirement of flash and RAM space to deploy the LittleFS,

-- Sorry, what link are your referring to? I could not find any link regarding this matter.

regarding the second question,
I don't think the file system will indicate the space is full when it can't afford to occupy enough size to store the writing file, however, you'd better review to the guider of LittleFS for confirmation.

-- I searched the guider of LittleFS and it is quite generic. Anyway, this guider that you mentioned here, is it the generic guider for LittleFS on the web or some guiders that NXP created. Just wondering.

0 项奖励
回复

2,682 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) The link is https://os.mbed.com/blog/entry/littlefs-high-integrity-embedded-fs/
2) I make a typo in the previous reply, the real sentence is 'I think the file system will indicate the space is full when it can't afford to occupy enough size to store the writing file, however, you'd better review to the guider of LittleFS for confirmation.'
In another word, the write API will fail if the space is full.
Have a great day,
TIC

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

0 项奖励
回复