This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RLFlash-FS: EFS fdelete issue

Hello,

I'm using an LPC1788 with RTX and RL-FlashFS with a EFS configured on a NOR chip.

I have setup a flash device description file to use 4KB sectors instead of 64kB blocks.

Here is a snippet:

#define FLASH_DEVICE                               \ 
    DFB(0x1000, 0x300000),    /* Block Size 4kB */ \ 
    DFB(0x1000, 0x301000),    /* Block Size 4kB */ \ 
    DFB(0x1000, 0x302000),    /* Block Size 4kB */ \ 
    DFB(0x1000, 0x303000),    /* Block Size 4kB */ \ 
    DFB(0x1000, 0x304000),    /* Block Size 4kB */ \ 

....


#define FL_NSECT    256

My issue is that sometimes when I delete a file using fdelete(file) several files are deleted.

(depends what files are on the file system and in what order they were added)

Now I started tracing the NOR function calls and this is what I observed:


fdelete: f:\\bar_button_double.png
norflash_program_page: 80300ff8
norflash_program_page: 80300ff0

fdelete: f:\\INDEX.HTM
norflash_program_page: 80322ff0
norflash_program_page: 80322fe8


fdelete: f:\\waterdrop.png
norflash_program_page: 8031eff8
norflash_program_page: 8031eff0
norflash_erase_sector: 8031e000

The 3rd fdelete (waterdrop.png) actually deleted several other files. The obvious difference is the erase call.

  • Does anyone know what is going on?

  • Are samller block/sector sizes better or worse for EFS?

Thanks.

M

Parents
  • To give this a bump up the list, I too would be interested in the response to the second section of Marc's question;

    - Are smaller block/sector sizes better or worse for EFS?

    In the guidelines for sector layout for EFS ( www.keil.com/.../rlarm_fs_spiflashdev_h.htm ) it notes at the bottom of the page;

    It is not optimal to define lots of small sectors (256 bytes or smaller). A more optimal solution for the RL-FlashFS is to join several physical sectors into bigger virtual sectors. In this case, the function EraseSector must be modified to erase a virtual sector, not a single physical sector.

    However no further guidance is given.
    As Marc has asked, are smaller or large block/sector sizes better/worse for EFS?
    If it depends on the proposed use of the file system then what factors contribute to the decision?
    256 byte sectors are bad, but should I be looking at 4kB, 32kB, or 64kB and how do I make the decision?

    Thanks,

    Phil

Reply
  • To give this a bump up the list, I too would be interested in the response to the second section of Marc's question;

    - Are smaller block/sector sizes better or worse for EFS?

    In the guidelines for sector layout for EFS ( www.keil.com/.../rlarm_fs_spiflashdev_h.htm ) it notes at the bottom of the page;

    It is not optimal to define lots of small sectors (256 bytes or smaller). A more optimal solution for the RL-FlashFS is to join several physical sectors into bigger virtual sectors. In this case, the function EraseSector must be modified to erase a virtual sector, not a single physical sector.

    However no further guidance is given.
    As Marc has asked, are smaller or large block/sector sizes better/worse for EFS?
    If it depends on the proposed use of the file system then what factors contribute to the decision?
    256 byte sectors are bad, but should I be looking at 4kB, 32kB, or 64kB and how do I make the decision?

    Thanks,

    Phil

Children
No data